Rag.VectorStore.Pgvector (rag v0.3.4)
View SourcePostgreSQL pgvector implementation of VectorStore.Store.
Uses pgvector extension for efficient vector similarity search with L2 distance.
Usage
# Create a store with your Repo
store = %Rag.VectorStore.Pgvector{repo: MyApp.Repo}
# Insert documents
{:ok, count} = Rag.VectorStore.Store.insert(store, documents)
# Search by embedding
{:ok, results} = Rag.VectorStore.Store.search(store, embedding, limit: 10)Requirements
- PostgreSQL with pgvector extension
- The
rag_chunkstable (see migrations in README)
Summary
Types
@type t() :: %Rag.VectorStore.Pgvector{repo: module()}