Vector Representation

Vector Representation


A vector representation is a word, sentence or document converted into a list of numbers. Models cannot work on text directly, so every piece of text corresponds to a point in a high-dimensional space. Texts close in meaning land close together in that space.

Early methods encoded a word by its position in a vocabulary and carried no relationship between meanings. Word2vec and its relatives turned words into dense vectors learned from the company they keep. In current models the representation shifts with context: the same word gets a different vector in different sentences, because its meaning is different.

This representation underpins a lot of work. Semantic search, recommendation systems, duplicate content detection, clustering and document retrieval in a RAG pipeline all run on vectors. Comparison is usually done with cosine similarity.

A concrete case: a help centre receives the query "I forgot my password". The knowledge base has an article titled "Steps to reset your credentials" that never uses the words in that query. Keyword matching misses it, while vector representations place the two phrasings near each other and the article surfaces.

Vectors are not interpretable. Nobody knows what an individual dimension corresponds to, so explaining why a particular result came back requires separate techniques.

From generative AI strategy to custom agent development and retrieval architectures, we help you scale AI responsibly.
Discuss your AI project