Setting up the knowledge base
Provision retrieval grounding: a pgvector collection the agent searches directly, or your own HTTP search endpoint. Includes indexing contract and verification steps.
Choosing an implementation
Option A: pgvector
1. Provision Postgres with pgvector
CREATE EXTENSION IF NOT EXISTS vector;
CREATE TABLE support_articles (
id text PRIMARY KEY,
vec vector(1536), -- must equal embedding_dimensions
metadata jsonb NOT NULL
);
CREATE INDEX ON support_articles
USING hnsw (vec vector_cosine_ops);2. Index your documents
3. Declare it in the manifest
4. Optional: tune the query rewrite
Option B: external search endpoint
1. Implement the endpoint
2. Declare it
Verifying grounding (both options)
Operational notes
Last updated
Was this helpful?

