Lead Image © neyro2008, 123rf.com

Lead Image © neyro2008, 123rf.com

How vector databases work and when they're used

Vectors

Article from ADMIN 84/2024
By
Vector databases are one of the critical components for AI-based applications such as ChatGPT that rely on vector search queries to extract knowledge context from vast amounts of data.

Vector databases store data in a numerical format as vectors. If you look at an arbitrary group of words, such as "A blue striped cotton shirt," the vector mapping would look something like:

[0.1, -0.2, 0.91, 0.7, -0.21, 0.1 -0.7, 0.4]

This numerical expression contains the coordinates of the words in a multidimensional space. When a sentence, an image, or a video is converted into a vector, the numerical values stand for the meaning of the statement in question. In the example, the vectors of the word groups "A blue striped cotton shirt" and "A nautical cotton shirt" would point to locations close to each other in multidimensional space. The interesting thing here is that the vector database's search algorithm processes the query and computes the distance between the two vectors that are connected in this way by measuring the similarity between vectors, which in turn generates meaning in many modern AI systems.

As a critical software infrastructure, a vector database is designed to store high-dimensional vectors in an efficient way. A traditional online transaction processing (OLTP) or online analytical processing (OLAP) database (Figure 1) organizes data in rows and columns. Queries relate to the values stored in these rows and columns. Some AI applications are based on such databases and attempt to store and retrieve data quickly. However, in some applications, such as those for image recognition or natural language processing and recommendation systems, the data is represented by vectors in a multidimensional space. A vector database stores collections of these vectors that are noted as spatial coordinates with an ID and an optional payload, which usually contains metadata that can be used to further filter the vector search for a more precise query.

...
Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus