Vector database
| Machine learning and data mining |
|---|
A vector database, vector store or vector search engine is a database that uses the vector space model to store vectors (fixed-length lists of numbers) along with other data items. Vector databases typically implement one or more approximate nearest neighbor algorithms,[1][2] so that one can search the database with a query vector to retrieve the closest matching database records.
Vectors are mathematical representations of data in a high-dimensional space. In this space, each dimension corresponds to a feature of the data, with the number of dimensions ranging from a few hundred to tens of thousands, depending on the complexity of the data being represented. A vector's position in this space represents its characteristics. Words, phrases, or entire documents, as well as images, audio, and other types of data, can all be vectorized.[3]
These feature vectors may be computed from the raw data using machine learning methods such as feature extraction algorithms, word embeddings[4] or deep learning networks. The goal is that semantically similar data items receive feature vectors close to each other.
Vector databases can be used for similarity search, semantic search, multi-modal search, recommendations engines, large language models (LLMs), object detection, etc.[3]
Vector databases are also often used to implement retrieval-augmented generation (RAG), a method to improve domain-specific responses of large language models. The retrieval component of a RAG can be any search system, but is most often implemented as a vector database. Text documents describing the domain of interest are collected, and for each document or document section, a feature vector (known as an "embedding") is computed, typically using a deep learning network, and stored in a vector database. Given a user prompt, the feature vector of the prompt is computed, and the database is queried to retrieve the most relevant documents. These are then automatically added into the context window of the large language model, and the large language model proceeds to create a response to the prompt given this context.[5]
Techniques
The most important techniques for similarity search on high-dimensional vectors include:
- Hierarchical Navigable Small World (HNSW) graphs
- Locality-sensitive Hashing (LSH) and Sketching
- Product Quantization (PQ)
- Inverted Files
In recent benchmarks, HNSW-based implementations have been among the best performers.[6][7] Conferences such as the International Conference on Similarity Search and Applications, SISAP and the Conference on Neural Information Processing Systems (NeurIPS) host competitions on vector search in large databases.
Implementations
See also
- Curse of dimensionality – Difficulties arising when analyzing data with many aspects ("dimensions")
- Machine learning – Study of algorithms that improve automatically through experience
- Nearest neighbor search – Optimization problem in computer science
- Recommender system – System to predict users' preferences
References
- ↑ "What is a Vector Database & How Does it Work". Pinecone. https://www.pinecone.io/learn/vector-database/.
- ↑ "What is a vector database". Elastic. https://www.elastic.co/what-is/vector-database.
- ↑ 3.0 3.1 "Vector database". 2023-12-26. https://learn.microsoft.com/en-us/azure/cosmos-db/vector-database.
- ↑ Evan Chaki (2023-07-31). "What is a vector database?". Microsoft. https://learn.microsoft.com/en-us/semantic-kernel/memories/vector-db. "A vector database is a type of database that stores data as high-dimensional vectors, which are mathematical representations of features or attributes."
- ↑ Lewis, Patrick; Perez, Ethan; Piktus, Aleksandra; Petroni, Fabio; Karpukhin, Vladimir; Goyal, Naman; Küttler, Heinrich (2020). "Retrieval-augmented generation for knowledge-intensive NLP tasks". Advances in Neural Information Processing Systems 33: 9459–9474.
- ↑ Aumüller, Martin; Bernhardsson, Erik; Faithfull, Alexander (2017), Beecks, Christian; Borutta, Felix; Kröger, Peer et al., eds., "ANN-Benchmarks: A Benchmarking Tool for Approximate Nearest Neighbor Algorithms", Similarity Search and Applications (Cham: Springer International Publishing) 10609: pp. 34–49, doi:10.1007/978-3-319-68474-1_3, ISBN 978-3-319-68473-4, http://link.springer.com/10.1007/978-3-319-68474-1_3, retrieved 2024-03-19
- ↑ Aumüller, Martin; Bernhardsson, Erik; Faithfull, Alexander (2017). "ANN-Benchmarks: A Benchmarking Tool for Approximate Nearest Neighbor Algorithms". in Beecks, Christian; Borutta, Felix; Kröger, Peer et al. (in en). Similarity Search and Applications. Lecture Notes in Computer Science. 10609. Cham: Springer International Publishing. pp. 34–49. doi:10.1007/978-3-319-68474-1_3. ISBN 978-3-319-68474-1. https://link.springer.com/chapter/10.1007/978-3-319-68474-1_3.
- ↑ "Aerospike Recognized by Independent Research Firm Among Notable Vendors in Vector Databases Report" (in en-US). 2024-05-07. https://www.morningstar.com/news/globe-newswire/9111790/aerospike-recognized-by-independent-research-firm-among-notable-vendors-in-vector-databases-report.
- ↑ "Aerospike raises $109M for its real-time database platform to capitalize on the AI boom" (in en-US). 2024-04-04. https://techcrunch.com/2024/04/04/aerospike-raises-100m-for-its-real-time-database-platform-to-capitalize-on-the-ai-boom/.
- ↑ "AllegroGraph 8.0 Incorporates Neuro-Symbolic AI, a Pathway to AGI" (in en-US). 2023-12-29. https://thenewstack.io/allegrograph-8-0-incorporates-neuro-symbolic-ai-a-pathway-to-agi/.
- ↑ "Franz Inc. Introduces AllegroGraph Cloud: A Managed Service for Neuro-Symbolic AI Knowledge Graphs" (in en-US). 2024-01-18. https://www.datanami.com/this-just-in/franz-inc-introduces-allegrograph-cloud-a-managed-service-for-neuro-symbolic-ai-knowledge-graphs/.
- ↑ "AlloyDB AI". https://cloud.google.com/alloydb/ai.
- ↑ "5 Hard Problems in Vector Search, and How Cassandra Solves Them" (in en-US). 2023-09-22. https://thenewstack.io/5-hard-problems-in-vector-search-and-how-cassandra-solves-them/.
- ↑ "Vector Search quickstart". https://cassandra.apache.org/doc/latest/cassandra/vector-search/overview.html.
- ↑ "Vector database". 26 December 2023. https://learn.microsoft.com/azure/cosmos-db/vector-database.
- ↑ Palazzolo, Stephanie. "Vector database Chroma scored $18 million in seed funding at a $75 million valuation. Here's why its technology is key to helping generative AI startups." (in en-US). https://www.businessinsider.com/vector-database-startup-chroma-raises-seed-funding-generative-artificial-intelligence-2023-4.
- ↑ MSV, Janakiram (2023-07-28). "Exploring Chroma: The Open Source Vector Database for LLMs" (in en-US). https://thenewstack.io/exploring-chroma-the-open-source-vector-database-for-llms/.
- ↑ "chroma/LICENSE at main · chroma-core/chroma" (in en). https://github.com/chroma-core/chroma/blob/main/LICENSE.
- ↑ "Can you use ClickHouse for vector search? | ClickHouse Docs" (in en). 2023-10-26. https://clickhouse.com/docs/knowledgebase/vector-search.
- ↑ "Couchbase aims to boost developer database productivity with Capella IQ AI tool" (in en-US). 2023-08-30. https://venturebeat.com/ai/couchbase-aims-to-boost-developer-database-productivity-with-capella-iq-ai-tool/#h-next-on-the-roadmap-for-couchbase-is-vector-support.
- ↑ "Investor Presentation Third Quarter Fiscal 2024" (in en-US). 2023-12-06. https://investors.couchbase.com/static-files/551e5b96-5307-4119-b225-19cfd8540242.
- ↑ Anderson, Scott (2021-03-26). "Couchbase Adopts BSL License" (in en-US). https://www.couchbase.com/blog/couchbase-adopts-bsl-license/.
- ↑ "Open Source Vector Database". 16 November 2023. https://cratedb.com/blog/open-source-vector-database.
- ↑ "Introducing CyborgDB". 15 April 2025. https://www.cyborg.co/blog/introducing-cyborgdb.
- ↑ Sean Michael Kerner (18 July 2023). "DataStax brings vector database search to multicloud with Astra DB". Venture Beat. https://venturebeat.com/data-infrastructure/datastax-brings-vector-database-search-to-multicloud-with-astra-db/.
- ↑ Kerner, Sean (23 May 2023). "Elasticsearch Relevance Engine brings new vectors to generative AI". VentureBeat. https://venturebeat.com/ai/elasticsearch-relevance-engine-brings-new-vectors-to-generative-ai/.
- ↑ "elasticsearch/LICENSE.txt at main · elastic/elasticsearch" (in en). https://github.com/elastic/elasticsearch/blob/main/LICENSE.txt.
- ↑ "HAKES | Efficient Data Search with Embedding Vectors at Scale" (in en). https://www.comp.nus.edu.sg/~dbsystem/hakes.
- ↑ "HAKES/LICENSE at main · nusdbsystem/HAKES" (in en). https://github.com/nusdbsystem/HAKES/blob/main/LICENSE.
- ↑ "HDF5 Query Indexing". 27 Sep 2019. https://github.com/HDFGroup/hdf5doc/tree/master/RFCs/HDF5/Query-Indexing.
- ↑ "HDFGroup/COPYING at master · HDFGroup/hdf5" (in en). https://github.com/HDFGroup/hdf5/blob/master/COPYING.
- ↑ "JaguarDB Homepage" (in en-US). http://jaguardb.com/.
- ↑ "Vector DBMS" (in en-US). 2023-07-03. https://db-engines.com/de/ranking/vector+dbms.
- ↑ "LanceDB Homepage" (in en-US). 2024-12-17. https://lancedb.com/.
- ↑ "lancedb/LICENSE at main · lancedb/lancedb" (in en). https://github.com/lancedb/lancedb?tab=Apache-2.0-1-ov-file.
- ↑ "Lantern" (in en-US). 2024-04-05. https://lantern.dev/.
- ↑ "lantern/LICENSE at main /lanterndata/lantern" (in en). https://github.com/lanterndata/lantern/blob/main/LICENSE.
- ↑ Wiggers, Kyle (2023-06-06). "LlamaIndex adds private data to large language models" (in en-US). https://techcrunch.com/2023/06/06/llamaindex-adds-private-data-to-large-language-models/.
- ↑ "llama_index/LICENSE at main · run-llama/llama_index" (in en). https://github.com/run-llama/llama_index/blob/main/LICENSE.
- ↑ "MariaDB Vector" (in en-US). https://mariadb.org/projects/mariadb-vector/.
- ↑ "Vector search in old and modern databases" (in en-us). https://manticoresearch.com/blog/vector-search-in-databases/.
- ↑ "Licensing FAQ". https://mariadb.com/kb/en/licensing-faq/.
- ↑ Sawers, Paul (2023-08-16). "Meet Marqo, an open source vector search engine for AI applications" (in en-US). https://techcrunch.com/2023/08/16/meet-marqo-an-open-source-vector-search-engine-for-ai-applications/.
- ↑ marqo-ai/marqo, Marqo, 2024-08-20, https://github.com/marqo-ai/marqo?tab=Apache-2.0-1-ov-file#readme, retrieved 2024-08-20
- ↑ "Meilisearch Homepage" (in en-US). 2024-10-08. https://meilisearch.com/.
- ↑ "meilisearch/LICENSE at main · meilisearch/meilisearch" (in en). https://github.com/meilisearch/meilisearch/blob/main/LICENSE.
- ↑ "Open Source Vector Database – Milvus – LFAI & DATA". https://milvus.io/.
- ↑ Liao, Ingrid Lunden and Rita (2022-08-24). "Zilliz raises $60M, relocates to SF" (in en-US). https://techcrunch.com/2022/08/24/zilliz-the-startup-behind-the-milvus-open-source-vector-database-for-ai-applications-raises-60m-and-relocates-to-sf/.
- ↑ "Milvus license". https://github.com/milvus-io/milvus/blob/master/LICENSE.
- ↑ "Introducing Atlas Vector Search: Build Intelligent Applications with Semantic Search and AI Over Any Type of Data" (in en-US). 2023-06-22. https://www.mongodb.com/blog/post/introducing-atlas-vector-search-build-intelligent-applications-semantic-search-ai.
- ↑ "Neo4j enhances its graph database with vector search" (in en-AU). 2023-08-22. https://itbrief.com.au/story/neo4j-enhances-its-graph-database-with-vector-search.
- ↑ "Vector search indexes" (in en-US). https://neo4j.com/docs/cypher-manual/current/indexes/semantic-indexes/vector-indexes.
- ↑ "Neo4j Licensing". https://neo4j.com/licensing/.
- ↑ "Top Fifteen Vector Databases" (in en-US). 2024-07-03. https://db-engines.com/de/ranking/vektor+dbms.
- ↑ "ObjectBox Java license". https://github.com/objectbox/objectbox-java/blob/main/LICENSE.txt.
- ↑ "Using OpenSearch as a Vector Database" (in en-US). 2023-08-02. https://opensearch.org/platform/search/vector-database.html.
- ↑ Pan, James Jie; Wang, Jianguo; Li, Guoliang (2023-10-21), Survey of Vector Database Management Systems
- ↑ "AWS debuts new AI-powered data management and analysis tools" (in en-US). 2023-07-26. https://siliconangle.com/2023/07/26/aws-debuts-new-ai-powered-data-management-analysis-tools/.
- ↑ 59.0 59.1 "OpenSearch license". https://github.com/opensearch-project/OpenSearch/blob/main/LICENSE.txt.
- ↑ Hook, Doug; Priyadarshi, Ranjan (May 2, 2024). "Oracle Announces General Availability of AI Vector Search in Oracle Database 23ai". https://blogs.oracle.com/database/post/oracle-announces-general-availability-of-ai-vector-search-in-oracle-database-23ai.
- ↑ "Pinecone leads 'explosion' in vector databases for generative AI" (in en-US). 2023-07-14. https://venturebeat.com/ai/pinecone-leads-explosion-in-vector-databases-for-generative-ai/.
- ↑ "Automatic incremental embedding index" (in en-US). 24 April 2025. https://www.pixeltable.com/blog/pixeltable-incremental-embedding-indexes.
- ↑ "pgvector" (in en-US). https://github.com/pgvector/pgvector.
- ↑ "pgvector/License" (in en-US). https://github.com/pgvector/pgvector/blob/master/LICENSE.
- ↑ Sawers, Paul (2023-04-19). "Qdrant, an open-source vector database startup, wants to help AI developers leverage unstructured data" (in en-US). https://techcrunch.com/2023/04/19/qdrant-an-open-source-vector-database-startup-wants-to-help-ai-developers-leverage-unstructured-data/.
- ↑ "qdrant/LICENSE at master · qdrant/qdrant" (in en). https://github.com/qdrant/qdrant/blob/master/LICENSE.
- ↑ "Using Redis as a Vector Database with OpenAI | OpenAI Cookbook" (in en). https://cookbook.openai.com/examples/vector_databases/redis/getting-started-with-redis-and-openai.
- ↑ "Redis as a vector database quick start guide" (in en). https://redis.io/docs/get-started/vector-database/.
- ↑ "Search and query" (in en). https://redis.io/docs/interact/search-and-query/.
- ↑ "Vector data type and vector similarity functions — General Availability" (in en-US). 2024-05-17. https://docs.snowflake.com/en/release-notes/2024/other/2024-05-16-vector-data-type-ga.
- ↑ Wiggers, Kyle (2023-01-04). "SurrealDB raises $6M for its database-as-a-service offering" (in en-US). https://techcrunch.com/2023/01/04/surrealdb-raises-6m-startup-funding-database-as-a-service/.
- ↑ "SurrealDB | License FAQs | The ultimate multi-model database" (in en). https://surrealdb.com/license.
- ↑ "TiDB Vector Search". https://docs.pingcap.com/tidb/stable/vector-search-overview/.
- ↑ tidb/LICENSE at master · pingcap/tidb, https://github.com/pingcap/tidb/blob/master/LICENSE
- ↑ Martinez, Miguel (2024-06-20). "Typesense Homepage" (in en-US). https://typesense.org/.
- ↑ "Typesense licensing". https://github.com/typesense/typesense/blob/main/LICENSE.txt.
- ↑ "VectorX DB, the world's Most Secure, and High Performance Vector Database" (in en). https://vectorxdb.ai/.
- ↑ Riley, Duncan (4 October 2023). "Yahoo spins off AI scaling engine Vespa as an independent company". siliconANGLE. https://siliconangle.com/2023/10/04/yahoo-spins-off-ai-scaling-engine-vespa-independent-company/.
- ↑ "vespa/LICENSE at master · vespa-engine/vespa" (in en). https://github.com/vespa-engine/vespa/blob/master/LICENSE.
- ↑ "Weaviate reels in $50M for its AI-optimized vector database" (in en-US). 2023-04-21. https://siliconangle.com/2023/04/21/weaviate-reels-50m-ai-optimized-vector-database/.
- ↑ "weaviate/LICENSE at master · weaviate/weaviate" (in en). https://github.com/weaviate/weaviate/blob/master/LICENSE.
- ↑ "Langchain YDB" (in en-US). https://python.langchain.com/docs/integrations/vectorstores/ydb/.
- ↑ "YDB - Vector Search" (in en-US). https://ydb.tech/docs/en/concepts/vector_search.
- ↑ "ydb/LICENSE at master · ydb-platform/ydb" (in en). https://github.com/ydb-platform/ydb/blob/main/LICENSE.
External links
- Sawers, Paul (2024-04-20). "Why vector databases are having a moment as the AI hype cycle peaks". https://techcrunch.com/2024/04/20/why-vector-databases-are-having-a-moment-as-the-ai-hype-cycle-peaks/.
