Research Careers Contact

GlossaryVector database

Vector database

A vector database stores embeddings, the numeric vectors that represent the meaning of text, images or other data, and finds the stored vectors closest to a query vector. It is the usual search engine behind retrieval-augmented generation systems and semantic search tools.

How it works

Each item, such as a paragraph from a datasheet, is passed through an embedding model and stored as a vector along with its text and metadata. At query time, the question is embedded the same way, and the database returns the stored vectors nearest to it by a distance measure such as cosine similarity or dot product.

Comparing a query against every stored vector is exact but slow at scale, so vector databases use approximate nearest neighbor indexes. Graph-based indexes, such as hierarchical navigable small world graphs, link each vector to its neighbors in layers and search by walking the graph from coarse to fine. Other indexes cluster vectors or compress them, trading a small loss in accuracy for large gains in speed and memory. Research libraries for similarity search showed how these methods scale to very large collections on GPUs.

Vector databases commonly filter by metadata, such as document type, revision or date, and many combine vector search with keyword search.

Vector database vs relational database

A relational database finds rows by exact values: this part number, this date range. A vector database finds items by similarity of meaning: passages about thermal limits, whatever words they use. Many systems use both, with relational tables holding the authoritative records and a vector index pointing to the text that explains them.

Why it matters

Retrieval quality limits answer quality. If the vector database returns the wrong passages, the model answers from the wrong facts, however capable it is. Index choice, metadata and how documents are split all decide whether the right passage comes back.

How to get it right

  • Use the same embedding model for documents and queries.
  • Store source, revision and date as metadata, and filter on them.
  • Re-embed the collection when the embedding model changes.
  • Combine vector search with keyword search for part numbers and codes.
  • Test retrieval on real questions and check what comes back.
  • Delete or replace vectors when the source document changes.

Vector databases in robotics and drone hardware

Hardware teams search datasheets, application notes, test reports and design reviews. A vector index over those documents finds the passage on a sensor's power-up sequence or a connector's current rating from a plain question. Tagging each passage with the part number and revision keeps the search from returning a superseded datasheet. The same index can hold past DFM comments and rework notes tagged by package, so a question about voiding under a QFN thermal pad returns what happened on earlier boards and what fixed it.

Learn more