How does a vector database work?
Each record holds an embedding, usually with the original text and metadata such as a document ID. A query arrives as an embedding too, and the database returns the nearest stored vectors by a distance measure such as cosine distance, Euclidean (L2) distance or inner product. Google Cloud describes a vector database as any database that lets you store, index and query vector embeddings.
Comparing a query with every stored vector gives exact results but slows down as the collection grows, so vector databases add approximate nearest neighbour indexes. pgvector’s documentation states the trade-off plainly: its default exact search gives perfect recall, while an HNSW or IVFFlat index trades some recall for speed, so the same query can return different results once an index is added.
A help centre with thousands of articles might split each one into chunks and store an embedding for every chunk. Each question is embedded, the index returns the closest chunks, and those go to the language model.
Does a voice agent need a vector database?
Only if its knowledge calls for semantic search at scale. A voice agent answering from a large, varied documentation set benefits from finding passages by meaning. One answering from a few dozen focused FAQs can search them directly.
A vector database adds work as well as capability: an embedding pipeline, re-embedding when documents change, decisions about chunk size, and one more system that holds copies of your content and needs access controls.
How does Kawl Now store and search knowledge?
Kawl Now doesn’t use a vector database. Knowledge is stored as plain text in Postgres on Supabase in London, in a private schema with row-level security on every table, alongside the rest of the workspace’s data.
Each workspace holds up to 100 sources. When the agent searches, the approved sources for the call’s channel are read and matched by keyword, and up to four excerpts go back to the agent. There is no separate index to keep in step, so the next search picks up an approved change.
The trade-off is that matching is by words, not meaning, so write sources in the words your customers use.
Common questions
What is the difference between a vector database and a regular database?
A regular database looks records up by their stored values, such as an ID, a date or a word. A vector database finds the records whose vectors are closest to a query vector, which suits searching by meaning. Extensions such as pgvector add vector search to an existing database, so one system can do both.
Can PostgreSQL be a vector database?
Yes, with an extension. pgvector adds a vector type, distance operators and approximate indexes such as HNSW to PostgreSQL, so embeddings can be stored with the rest of your data.