PGVector
PGVector Embedding Store
yaml
type: "io.kestra.plugin.ai.embeddings.PGVector"
Examples
Ingest documents into a PGVector embedding store
yaml
id: document_ingestion
namespace: company.ai
tasks:
- id: ingest
type: io.kestra.plugin.ai.rag.IngestDocument
provider:
type: io.kestra.plugin.ai.provider.GoogleGemini
modelName: gemini-embedding-exp-03-07
apiKey: "{{ kv('GEMINI_API_KEY') }}"
embeddings:
type: io.kestra.plugin.ai.embeddings.PGVector
host: localhost
port: 5432
user: "{{ kv('POSTGRES_USER') }}"
password: "{{ kv('POSTGRES_PASSWORD') }}"
database: postgres
table: embeddings
fromExternalURLs:
- https://raw.githubusercontent.com/kestra-io/docs/refs/heads/main/content/blogs/release-0-24.md
Properties
database *Requiredstring
The database name
host *Requiredstring
The database server host
password *Requiredstring
The database password
port *Requiredintegerstring
The database server port
table *Requiredstring
The table to store embeddings in
user *Requiredstring
The database user
useIndex booleanstring
Default
false
Whether to use use an IVFFlat index
An IVFFlat index divides vectors into lists, and then searches a subset of those lists closest to the query vector. It has faster build times and uses less memory than HNSW but has lower query performance (in terms of speed-recall tradeoff).