
AI PGVector
CertifiedStore embeddings with pgvector
AI PGVector
Store embeddings with pgvector
Uses the PostgreSQL pgvector extension to persist embeddings in the given table. drop=true recreates the table; optional IVF index (useIndex) defaults to false. Ensure pgvector extension is installed and the user can create tables/indexes.
type: io.kestra.plugin.ai.embeddings.PGVectorExamples
Ingest documents into a PGVector embedding store
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-001
apiKey: "{{ secret('GEMINI_API_KEY') }}"
embeddings:
type: io.kestra.plugin.ai.embeddings.PGVector
host: localhost
port: 5432
user: "{{ secret('POSTGRES_USER') }}"
password: "{{ secret('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 *string
Database name
Name of the PostgreSQL database holding the embeddings table. No default: this property is required.
host *string
Database server host
Hostname or IP address of the PostgreSQL server running the pgvector extension. No default: this property is required.
password *string
Database password
Password of the database user. Store it as a Kestra secret rather than inline. No default: this property is required.
port *integerstring
Database server port
TCP port the PostgreSQL server listens on. No default: this property is required.
table *string
Table name
Table that stores the embeddings. No default: this property is required. When drop is requested by the ingestion task, the table is recreated.
user *string
Database user
User connecting to the PostgreSQL database. No default: this property is required.
useIndex booleanstring
falseUse an IVFFlat index
If true, build an IVFFlat index on the embedding column. IVFFlat divides vectors into lists and searches only the lists closest to the query vector: it builds faster and uses less memory than HNSW, at the cost of a worse speed-recall tradeoff. Defaults to false.