What is a Vector Database? Vector DB Basics
A vector database stores embeddings and finds the items most similar in meaning to a query. Learn how vector search works and its role in RAG.
What is Vector Database?
A vector database stores data as embeddings, lists of numbers that represent the meaning of a piece of text, an image or another item, and retrieves the stored items most similar to a query. Instead of matching exact keywords, it compares positions in a high-dimensional space, so a search for "refund policy" can find a passage about returning a purchase. It is the usual retrieval layer behind RAG and semantic search.
- Stores embeddings alongside the original content and its metadata
- Finds nearest neighbors by a similarity measure such as cosine similarity
- Uses approximate indexes such as HNSW to search quickly
- Combines vector similarity with metadata filters, and often keyword search
- Available as dedicated databases or as extensions such as pgvector for PostgreSQL
How Vector Database Works
Content is split into chunks and passed through an embedding model, which turns each chunk into a vector. The database stores the vectors with their text and metadata and builds an index for fast similarity search. At query time the question is embedded with the same model, and the database returns the closest vectors, usually filtered by fields such as tenant, source or date.
Chunk and embed
Documents or records are split into passages and converted into vectors by an embedding model. The same model must be used later for queries.
Store and index
Vectors are written with their source text and metadata. An approximate nearest neighbor index, such as HNSW or IVF, makes search fast without comparing every vector.
Query by similarity
The query is embedded and the database returns the top matches by similarity, often combined with metadata filters or keyword scores in a hybrid search.
Keep it current
When source data changes, the affected chunks are re-embedded and replaced, and deleted content is removed so answers do not rely on stale text.
Common Vector Database Use Cases
Retrieval-augmented generation
An assistant retrieves the passages most relevant to a question and passes them to the model, so the answer is grounded in your own documents.
Semantic and vector search
Employees search policies, tickets or contracts by meaning, finding relevant results even when their wording differs from the source.
Recommendations and deduplication
Similar products, support cases or records are found by comparing their vectors, which helps suggest related items or spot near-duplicates.
Vector Database in FlowGenX AI
FlowGenX AI includes a managed Knowledge Base, so most teams never run a vector database themselves. You upload documents into collections; the platform chunks them, creates embeddings and retrieves the most semantically similar passages, citing the sources. Agents and workflows query it through the Knowledge Base node, and each tenant's data is logically isolated from others.
Frequently Asked Questions
See It In FlowGenX
Related Terms