A vector is an ordered list of numbers that represents a point in a multidimensional space. In artificial intelligence, vectors are how models represent data: a text, an image or a sound becomes a vector of hundreds or thousands of numbers, where each number captures some characteristic of the original data.
How it works
When an embedding model processes text, it generates a vector. Each position in the vector corresponds to a dimension of meaning space. Texts with similar meaning generate nearby vectors in that space; different texts generate distant vectors.
Comparison between vectors uses mathematical metrics such as cosine similarity or Euclidean distance. These metrics allow searching for similar items, grouping data and powering recommendation systems and RAG. Vector databases are optimized to store and search vectors at scale.
Practical example
The phrase "gato dormindo no sofá" and the phrase "felino descansando no divã" generate close vectors, because the meaning is similar. The phrase "receita de bolo de chocolate" generates a distant vector. A vector search system finds the first one when the user searches for "animal descansando", even without common words.
What it's for
Vectors are the foundation of semantic search, RAG and recommendation systems. At bridgecode, agents use vectors to find relevant information in knowledge bases, enabling more accurate and contextualized responses.