GLOSSARY

Vector database

By Sygnet Research. Written by Sygnet, sourced, checked before publication.

A vector database stores documents as numerical embeddings and lets systems search by meaning rather than exact keywords. Instead of matching text strings, it finds passages, clauses, or records that are semantically close to a query. In document processing, it underpins retrieval steps that feed context to language models before they answer a question or extract a value.

How it works

When a document is processed, its text is broken into chunks (paragraphs, clauses, table rows) and each chunk is converted into a vector, a list of numbers that captures its meaning, using an embedding model. These vectors get stored in a database built for similarity search, not for exact row lookups like a traditional SQL system. The database indexes vectors using structures such as HNSW or IVF, which let it find the closest matches among millions of entries in milliseconds rather than scanning everything.

When a user or an application submits a query, that query also gets embedded into a vector. The database compares this query vector against stored vectors using a distance measure (cosine similarity is common) and returns the closest matches. Those matches, usually the original text chunks plus metadata like document ID or page number, get passed to a language model as context. This is the retrieval half of Retrieval-Augmented Generation.

Most vector databases also support filtering: you can combine semantic search with hard constraints, like "only search invoices from this vendor" or "only contracts signed after 2022." That combination of semantic ranking and structured filtering is what makes them useful in production rather than just in demos.

Why it matters for document processing

Vector databases matter because raw keyword search fails on real documents. A clause about "termination for convenience" might be worded a dozen different ways across contracts, and keyword search misses most of them. Semantic retrieval finds the relevant clause regardless of phrasing, which is why it sits underneath contract analysis, claims review, and compliance search tools.

They also reduce the amount of text a language model has to read. Feeding an entire contract library into a model's context window is slow and expensive. A vector database narrows that down to the handful of relevant chunks, which cuts cost and reduces the chance of the model losing track of details. This directly affects accuracy: poor retrieval is one of the leading causes of wrong answers in document AI systems, independent of how good the underlying model is.

FAQ

Is a vector database the same thing as RAG?

No. A vector database is one component of a RAG (Retrieval-Augmented Generation) pipeline. RAG describes the overall pattern: retrieve relevant text, then generate an answer. The vector database handles the retrieval part specifically, storing and searching embeddings. You still need chunking, an embedding model, and a language model to complete a working RAG system.

Do I need a vector database for document extraction?

Not always. For structured extraction from known form types, template-based or key-value extraction often works without one. Vector databases earn their place when you need semantic search across large, varied document sets, such as finding relevant contract clauses or answering open-ended questions over a document archive, where exact templates do not apply.

NEXT STEP

See it on your own documents

One email when we publish something worth your time.