{"id":70507,"date":"2025-05-19T08:15:44","date_gmt":"2025-05-19T08:15:44","guid":{"rendered":"https:\/\/www.arimetrics.com\/glosario-digital\/vector-database"},"modified":"2026-09-14T10:48:51","modified_gmt":"2026-09-14T10:48:51","slug":"vector-database","status":"publish","type":"encyclopedia","link":"https:\/\/www.arimetrics.com\/en\/digital-glossary\/vector-database","title":{"rendered":"Vector Database"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.arimetrics.com\/wp-content\/uploads\/2026\/09\/vector-database-square-en.jpg\" alt=\"Vector Database\" class=\"boxpad alignright\" style=\"margin-top:0\" width=\"300\" height=\"300\" \/><strong>Definition:<\/strong><\/p>\n<p>A <strong>vector database<\/strong> is a system that stores and indexes numerical vectors and retrieves items through similarity searches. These vectors can represent features of text, images, audio or other data.<\/p>\n<p>Alongside vectors, it can store identifiers, metadata and references to the original content. It is used in semantic search, recommendation systems and artificial intelligence applications that need to locate information related to a query.<\/p>\n\n<h2>Vectors, embeddings and original content<\/h2>\n<p>A vector is a list of numerical values. In many applications, an embedding model transforms content into vectors whose relationships allow certain features of the data to be compared.<\/p>\n<p>The model and the database perform different functions: the former generates the representation; the latter stores it and makes it searchable. Some products integrate both steps, but not all vector databases generate embeddings themselves.<\/p>\n<p>The vector does not necessarily replace the original document either. A system can store the text alongside the vector or keep a reference to retrieve it from another storage system. Metadata allows information such as language, date, category or source to be associated with it.<\/p>\n<h2>How vector search works<\/h2>\n<p>The query is represented by a vector compatible with those stored. In semantic text search, this usually requires using the same embedding model or models designed to work in a shared space.<\/p>\n<p>The system compares vectors using a distance or similarity measure, such as Euclidean distance, cosine similarity or the dot product. The choice depends on the representation and configuration in use.<\/p>\n<p>It then returns the closest items according to that criterion. For example, a query about recovering a password may locate a document about resetting credentials even if it does not repeat exactly the same words.<\/p>\n<p>Mathematical proximity does not by itself imply relevance, truthfulness or freshness. Results depend on the model, the indexed content and how the query is formulated.<\/p>\n<h2>Exact search, approximate search and filters<\/h2>\n<p>An exact search identifies the nearest neighbors according to the chosen metric. As the number of vectors grows, comparing the query with all of them can become costly.<\/p>\n<p>Approximate search indexes, such as HNSW, can speed up retrieval at the cost of potentially leaving some relevant neighbors out of the results. Their parameters influence speed, memory consumption and the ability to retrieve the closest items.<\/p>\n<p>Metadata filters add conditions, such as searching only documents in a particular language or category. Their combination with approximate indexes depends on the implementation and can affect results.<\/p>\n<p>Vector search can also be combined with term-based lexical search. This hybrid search makes use of both semantic relationships and matches for specific names, codes or expressions.<\/p>\n<h2>Difference from a relational database<\/h2>\n<p>A relational <a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/database\">database<\/a> organizes information through tables and relationships. A vector database focuses on storing vectors and retrieving them by similarity. These capabilities are not mutually exclusive.<\/p>\n<p>There are specialized vector systems and general-purpose databases that incorporate vector capabilities. For example, PostgreSQL can store vectors and perform nearest-neighbor searches through the <a href=\"https:\/\/github.com\/pgvector\/pgvector\" target=\"_blank\" rel=\"noopener\">pgvector<\/a> extension.<\/p>\n<p>It is therefore incorrect to say that relational databases only allow exact matches or cannot work with unstructured information. The choice depends on the queries, data and requirements of each application.<\/p>\n<h2>Applications in search, recommendations and RAG<\/h2>\n<p>Vector databases can locate documents related to a question, products with similar features or images close to a reference.<\/p>\n<p>In a <a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/rag\">RAG<\/a> system, they can help retrieve passages that are provided as context to a language model. Retrieval and generation are different stages: the database does not necessarily write the answer or retrain the model.<\/p>\n<p>RAG does not always require a vector database either; it can use lexical, hybrid or other retrieval mechanisms.<\/p>\n<p>The usefulness of the system depends on keeping content up to date, retaining references to its sources and applying appropriate permissions. Storing embeddings does not automatically anonymize information or guarantee privacy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What a vector database is, how similarity search works and how it relates to embeddings, relational databases and RAG systems.<\/p>\n","protected":false},"author":28,"featured_media":79503,"template":"","encyclopedia-tag":[1386],"class_list":["post-70507","encyclopedia","type-encyclopedia","status-publish","has-post-thumbnail","hentry","encyclopedia-tag-ai-retrieval"],"_links":{"self":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/encyclopedia\/70507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/encyclopedia"}],"about":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/types\/encyclopedia"}],"author":[{"embeddable":true,"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/users\/28"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/media\/79503"}],"wp:attachment":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/media?parent=70507"}],"wp:term":[{"taxonomy":"encyclopedia-tag","embeddable":true,"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/encyclopedia-tag?post=70507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}