Learn AI /Search, Embeddings and RAG /Vector database
Vector database
- Intermediate
- Search, Embeddings and RAG
- Technical readers
- Programme & data teams
Also called: vector store, vector index.
Back to the milestone you came from
In five seconds
What it is
A specialised system stores numerical meaning-representations of content and quickly finds the closest matches to a query by semantic similarity.
In plain words
It is a system that helps computers find content that means something similar, even when the words are different.
An everyday example
Imagine cards spread across a large table so that cards expressing similar ideas sit close together. A request for "ways to keep a room cool without electricity" lands near cards about shade, airflow and opening windows at night, even when none repeats those exact words. A helper checks the nearest cards, removes any that do not meet a requested condition, such as language, and presents the best few. A vector database performs a numerical version of that search, using stored coordinates rather than a physical table.
A real vector database does not place documents on physical shelves, and closeness is not judged by a human librarian reading every page. It relies on numerical representations produced by a model, so matches can reflect model biases or miss important context. Also, unlike a library shelf, the same item can be filtered and searched in many ways at once.
Remember thisA vector database retrieves content by semantic proximity rather than exact wording. Its usefulness still depends on compatible embeddings, reliable metadata, appropriate filters and source verification.
Understand it
Understand it
Why it matters
For non-specialists, the main value is better retrieval. If a system can find passages by meaning rather than exact wording, staff spend less time hunting through documents and are more likely to see relevant evidence. This matters in decision-making because missed context can lead to weak briefings, incomplete answers or poor automation choices. It also matters for governance: a vector database is part of the retrieval layer, not a guarantee of truth. You still need source quality checks, permissions, filtering and human judgement about whether the returned material is appropriate, current and safe to use.
How a vector database retrieves relevant passages
After viewing this, a reader should be able to describe what is stored, how a query is compared, and what the system returns.
01
1. Prepare content
Split source documents into passages and keep useful metadata such as title, date, language or source.
Show a stack of document cards on the left. Each card has a short text snippet and small metadata tags below it.
02
2. Convert to vectors
An embedding model turns each passage into a list of numbers that captures semantic patterns.
Show arrows from document cards to compact number bars or dot clusters labelled 'vector'.
03
3. Store and index
The system stores the original passage, its vector and metadata, then builds an index for fast similarity lookup.
Show a database cylinder containing paired text snippets and vectors, with a side label 'index' as a branching lookup structure.
04
4. Search with a query
A user question is converted into a vector, then compared with stored vectors to find nearest neighbours, optionally with filters.
Show a search box above feeding into a query vector, then lines to a few highlighted nearby vectors in the database; add optional filter chips like date or language.
05
5. Return grounded results
The system outputs the most similar passages and their source information, which can be shown directly or sent to a language model.
Show a results panel on the right with ranked passages, similarity scores and source labels.
A left-to-right flow diagram with five boxes. It starts with source passages, shows conversion into vectors, storage with metadata and an index, then a query taking the same path into a vector, and finally nearest-match results returned with source details. Read it from left to right as a retrieval process.
Hovering over each stage reveals the data present at that stage: text, vector, metadata, index, query, and ranked results.
Describe this without the diagram
This diagram explains a retrieval workflow. First, source documents are split into smaller passages and labelled with metadata such as title, date and language. Second, each passage is converted into a vector, meaning a list of numbers that captures semantic patterns. Third, the system stores the passage, its vector and metadata, and builds an index so it can search quickly. Fourth, a user question is also converted into a vector and compared with the stored vectors, with optional filters such as date or language. Fifth, the system returns the closest passages with their source details, which can then be displayed to a user or passed to a language model for a grounded answer.
With reduced motion: A static left-to-right five-step diagram with labelled boxes and arrows showing documents, vectors, indexed storage, query comparison and ranked results.
A vector database stores items such as document passages, images or support tickets in a form that computers can compare by meaning. Each item is converted into a vector: a list of numbers that represents patterns in the item. Similar items tend to have vectors that are close together in that numerical space.
What goes in is usually the original content, some metadata such as source or date, and its vector. The database builds an index, which is a structure for fast lookup. When a user asks a question, the question is also turned into a vector.
What happens next is nearest-neighbour search. The system compares the query vector with many stored vectors and returns the closest ones, often with filters such as language, document type or date. Some systems then rerank the results using another model or rule set.
What comes out is usually a short list of passages or items most related in meaning to the query, not just the same words. This makes vector databases useful for semantic search and retrieval-augmented generation. They are not the same as embeddings, which are the number lists themselves, and they are not the same as a knowledge base, which is the underlying collection of source material.
How “A map of nearby ideas” maps onto the real thing
| In the story | In the AI system |
|---|---|
| Documents grouped by topic closeness on shelves | Vectors stored so similar items are near one another in vector space |
| The librarian using the request to choose a shelf area | The query is converted into a vector and used to search for nearest neighbours |
| Nearby shelves checked first | An index speeds up approximate nearest-neighbour search |
| Recent publications section filter | Metadata filters such as date, language or source |
A worked example
A desk officer at Headquarters is finalising talking points for informals and needs previously cleared language on affordable internet access.
Starting from: Query: "How can affordable internet access support participation in public life?"
- Cleared statements, briefing notes and non-papers have been divided into passages. Each passage is stored as an embedding with its document title, clearance status, language and source link.
- The query is converted into an embedding using the same or a compatible model.
- The database runs nearest-neighbour search using cosine similarity and filters the results to cleared material in the required language.
- Hybrid keyword search also checks for exact terms such as "digital inclusion". A reranker then reorders the strongest candidates according to their relevance to the full query.
- The system returns the highest-ranked passages with their titles and source links for the desk officer to verify.
Result: The officer finds cleared wording that discusses participation and connectivity without using the query's exact phrase. The talking points still go through the usual clearance process.
In a United Nations workplace
An evaluation officer in a Headquarters department is preparing a note for the file before close of business on which evaluation records should be retained. In the approved records system, the officer searches for earlier evaluation products and supporting files that address the same recommendations, even where titles and terminology differ.
A vector database can retrieve semantically related records, then narrow them using metadata such as record type, business owner and access category. This helps the officer identify connected material and possible duplicates. The applicable retention schedule and human review still determine what stays on the file.
Before you try thisDo not embed or upload interview notes, personal data, HR material or procurement-sensitive records into a tool that has not been approved for them. Embeddings and retrieved passages can expose confidential information. Apply access controls and data minimisation, and never use similarity alone to make retention or disposal decisions.
Where you may hear it
- An ICT governance board reviewing an enterprise search proposal
- A vendor demo during a procurement unit's technical evaluation
- A design session for a retrieval-augmented generation tool
- A records management meeting on searching archived files
Avoid confusion
Avoid confusion
Often confused with
Embedding
A list of numbers that places a token or other item in a mathematical space so a model can compare patterns, relationships and context.
Knowledge base
An organised set of trusted documents that a search system can look through to find relevant passages for an answer.
Keyword search
A search method that finds documents by matching query words to indexed text and ranking the matches, often with scoring methods such as BM25.
Common misconceptions
Common misconception: A vector database is just a normal database with a new name.
Correction: Some systems build vector search on top of a general database, but the important difference is that vectors and similarity search need special indexing and nearest-neighbour retrieval methods. Traditional exact-match lookup alone is not enough when you want meaning-based search at scale.
Common misconception: If you use a vector database, the system will understand the documents correctly.
Correction: The database does not interpret documents on its own. It stores vectors produced by a model and retrieves nearby matches based on those representations. If the embedding model captures the topic poorly, or if the source text is weak, retrieval quality will also be weak.
Common misconception: A vector database replaces a knowledge base.
Correction: A knowledge base is the body of source material and related structure. A vector database is one way to index and search representations of that material. You can have a knowledge base without vector search, and you can use vector search over only part of a knowledge base.
Common misconception: The closest vector result is always the best answer.
Correction: Similarity score only measures closeness in the chosen representation. A highly similar passage may still be outdated, from the wrong source, or incomplete for the user's task. Metadata filters, reranking and human review still matter.
Quick check
What does a vector database mainly add to a document system?
Its core role is efficient similarity retrieval over vectors. It helps find relevant passages by meaning, but it does not guarantee factual accuracy, replace governance controls, or remove the value of metadata and keyword methods.
Go deeper
Go deeper
The simple version
It is a system that helps computers find content that means something similar, even when the words are different.
The technical version
A vector database stores embeddings, often with identifiers, source content or metadata, then uses an index to run efficient nearest-neighbour search in vector space. At query time, the input is embedded with the same or a compatible model, compared against stored vectors using a similarity measure such as cosine similarity or inner product, and the top candidates are returned. Many implementations support metadata filtering, hybrid search with keywords, and reranking. In retrieval-augmented generation, the retrieved passages are then passed to a language model so the answer can be grounded in specific sources.
Reviewed external resources
EncyclopaediaVector database (opens in a new tab)Wikipedia
This gives a general overview of the term and related concepts, and suits readers who want a quick orientation before going deeper.
Intermediatelink checked 2026-07-31
CourseEmbeddings (opens in a new tab)Google
This explains embeddings, which helps readers understand what kind of data a vector database stores, and suits learners who need the prerequisite concept.
Intermediatelink checked 2026-07-31
InteractiveEmbedding Projector (opens in a new tab)TensorFlow
This lets readers explore how vectors cluster in space, and suits people who learn best by interactive visual inspection.
Starterlink checked 2026-07-31
VideoVideo explanations: Vector database (opens in a new tab)YouTube search
This is a search results page for multiple video explanations, not one authoritative source, and suits readers who prefer to compare several teaching styles.
search results, not one pagelink checked 2026-07-31
DiscussionCommunity discussion: Vector database (opens in a new tab)Reddit search
This is a search results page for community discussion, not one vetted explanation, and suits readers who want practical questions, opinions and examples from practitioners.
search results, not one pagelink checked 2026-07-31
Where this came from
Drafted with a language model through an offline pipeline, checked against this site's schema, and every external link above fetched to see whether it answers. Treat it as a starting point and check anything that matters against the primary sources. How this site is built and what that means.
The one thing to remember
A vector database retrieves content by semantic proximity rather than exact wording. Its usefulness still depends on compatible embeddings, reliable metadata, appropriate filters and source verification.