Appearance
A Guide to Semantic Search with pgvector
Tags: guide, feature Author: AgentBrain Team Published: 2026-02-20 Read time: 8 minutes
Source note: the canonical article body is in active drafting on agentbrain.sh and currently exists as a stub. The summary below captures the topic; this page will be updated with the full body when it lands.
What is Semantic Search?
Semantic search retrieves results based on the meaning of a query rather than exact keyword match. A user asking "how do we handle customer refunds" should surface the refund policy document even if that doc never uses the word "refunds" verbatim.
How AgentBrain Uses pgvector
AgentBrain's Knowledge Vault is backed by PostgreSQL with the pgvector extension:
- Connected sources are chunked into passages
- Each passage is embedded with the configured embedding model
- Embeddings are stored in a
vector(N)column - Queries embed the question and run a similarity search against the column
Why pgvector vs. a Specialized Vector DB
- Same Postgres your team already operates
- Joins between embeddings and metadata are SQL-native
- Backup, replication, point-in-time-recovery all use familiar tools
- One less data store to harden, audit, and patch
Performance Notes
The 2026-02-01 release (v0.8.5) shipped a 2x search-speed improvement by tuning the pgvector index strategy. Most workloads will not need additional tuning, but the engineering team is happy to advise on index strategy for large collections.
Practical Steps
- Configure a connector via Knowledge Vault Setup
- Pick an embedding model (default is fine for most use cases)
- Run the initial ingest
- Test queries from the agent console
- Tune top-k retrieval per agent (default 5 is a good starting point)
Related
- Platform: Knowledge Vault
- SOPs: Knowledge Vault Setup
- Changelog for the v0.8.5 performance improvement