AI Glossary / Data engineering and architecture / Advanced
Vector Database
Definition
A vector database stores and retrieves data using numerical vectors, with facilities designed for similarity search and management of the associated records. In AI applications, vectors often come from embedding models that represent text, images or other inputs. The database helps find nearby representations according to a chosen metric. It does not establish that the retrieved content is true, relevant to every purpose or sufficient to answer a question.
What it means
A user can search for related material even when its wording differs from the query. The usefulness of that search depends on the representations, the similarity measure and the collection being searched. In an original learning-library example, a question about organizing tasks might retrieve a lesson titled Planning Your Week. That could be helpful, but a nearby vector is evidence of similarity within the chosen representation, not proof that the lesson answers the exact request. The application still needs to inspect content, enforce access rules and decide what to present.
How it works
A typical workflow converts source items into vectors, stores them with identifiers and relevant metadata, and compares a query vector against the collection. Qdrant documents collections of points, vector dimensions, distance metrics, payload filtering and indexes for retrieval. Implementations can use approximate search to reduce the work needed to find useful neighbors, introducing a tradeoff that should be evaluated. In an original catalog, the stored representations and query representation must be compatible. Changing the embedding model without a planned migration can invalidate comparisons even when the vectors happen to have the same length.
Three practical examples
- A learning website retrieves lessons related to a user's question using embeddings of the lessons and query.
- An image catalog finds visually related assets while filtering results to material available for the intended project.
- An AI assistant retrieves candidate reference passages, then checks their content and presents source links with its answer.
Think of it this way
Imagine a map on which nearby locations represent related topics rather than physical places. Searching starts at the query's location and finds neighboring items. The map's design determines what nearby means. Two points can be close without either containing the exact fact you need. The analogy helps explain similarity ranking, but real embeddings can use many dimensions that do not correspond to simple, human-labeled directions.
Worked example
Consider an original toy collection using two-dimensional vectors and Euclidean distance. The query is q = (1, 0). Candidate A has vector (1, 0), B has (0.8, 0.6), and C has (0, 1). Distances from q are 0 for A, the square root of 0.4, approximately 0.6325, for B, and the square root of 2, approximately 1.4142, for C. An exact top-two search without filters returns A followed by B. Now suppose A is marked unavailable for this catalog view. Searching among eligible items instead returns B followed by C. Retrieving only A and B first and then dropping A leaves just one result; it does not produce the same two-item eligible result. This calculation illustrates ranking and the importance of filtering behavior. The coordinates are invented for teaching and do not represent actual semantic embeddings. A production approximate search may require separate evaluation against exact-search results.
Illustrative case study
In a fictional AI learning portal, a search prototype retrieves relevant-looking passages but sometimes includes retired lessons. Reviewers discover that retirement status was not being applied consistently in retrieval. They add explicit eligibility handling and test the three-candidate example before evaluating a representative set of real queries. They also review whether retrieved passages actually support the assistant's answers. When an embedding model changes, they plan how stored and query representations will remain compatible. The scenario illustrates treating retrieval as a maintained information service. It does not claim that adding a vector database alone resolves outdated content, factual errors or access-control requirements.
Common misconceptions and mistakes
A vector database is not the same thing as the embedding model that creates representations. Some products integrate both capabilities, but the roles remain distinct. Another mistake is treating similarity scores as universal confidence probabilities; their interpretation depends on the metric and configuration. Approximate nearest-neighbor retrieval does not promise the exact closest items in every search. High similarity also does not make a document authoritative. Finally, a collection of embeddings needs updating when source material changes, and removing a visible document requires checking the associated retrieval records and application behavior as well.
Business use
For an AI knowledge feature, evaluate retrieval against the tasks users actually perform. In the fictional learning portal, check whether useful eligible lessons appear, whether outdated material is excluded and whether cited passages support the answer. Measure relevance separately from search speed and compare approximate results with a suitable baseline when needed. Document the embedding model, source identifiers and update process so results can be investigated. Include metadata and access requirements in the design. This makes the database one component of a reliable retrieval workflow, rather than treating numerical closeness as the final measure of business usefulness.
People also ask
Does a vector database generate every embedding itself?
Not necessarily. Embeddings can be produced separately, although some products integrate generation services.
Are the closest vectors guaranteed to contain the right answer?
No. Their content must still be assessed against the question and evidence requirements.
Can metadata affect retrieval?
Yes. Supported filtering can restrict which records are eligible, with behavior depending on the implementation.
Check your understanding
Which toy candidate is closest to q?
Answer: A, with distance zero.
Which is next?
Answer: B, at approximately 0.6325.
What are the exact top two among eligible items when A is excluded?
Answer: B and C.
Why does dropping A after retrieving only two candidates leave a different result count?
Answer: C was never retrieved.
What additional question matters after ranking?
Answer: Whether the returned content supports the user's actual information need.
Related terms
- Embedding
- Nearest neighbor search
- Retrieval-augmented generation
- vector index
- similarity metric
- metadata filtering
Learn next
Create three small vectors and calculate their distances from a query by hand. Add an eligibility condition and compare searching eligible items with filtering a short result list afterward. Then describe how a real document's source identifier, version and permissions would stay connected to its stored representation.
More in Data engineering and architecture
- User modeling - User modeling is the process of building and maintaining a representation of a user's characteristics for a system's purposes.
- User profile - A user profile is an organized representation of information associated with a user or user account for an application's purposes.
- Value-Based Identity - Value-based identity distinguishes entities using selected attribute values that carry meaning in the modeled domain.
- Vector-field consistency - Vector-field consistency, or VFC, is a research consistency model for replicated data that varies permitted replica divergence according to locality.
- Verifiable computing - Verifiable computing enables a client to delegate a computation and check evidence that the returned result matches the specified computation on the...
- Very large database - A very large database, or VLDB, is a database whose scale creates significant challenges for processing, administration and maintenance.
Sources
Qdrant documentation, Overview, including retrieval process, data structure and filtering: https://qdrant.tech/documentation/overview/ The vector coordinates, distance arithmetic, topic-map analogy and AI learning-portal scenario are original educational illustrations. The example uses exact Euclidean ranking; no universal product-performance or factual-accuracy guarantee is implied.
Previous: Vector Autoregression Next: Vector-field consistency