1.8 Text embeddings
What embeddings are, how similarity is measured, and how to choose a model.
Key points
Embedding generation converts data into high-dimensional vectors representing text numerically; the query's vector is compared with stored vectors to find relevant information.
What NVIDIA says (2)
“Generating embeddings involves converting data into high-dimensional vectors, which represent text in a numerical format.”
“The system identifies relevant information by comparing the query vector with the stored vectors in the vector DBs.”
Cosine similarity focuses on the angle between vectors, so it captures semantic similarity by orientation. NVIDIA's glossary calls it ideal for text processing and information retrieval.
What NVIDIA says (2)
“Focuses on the angle between vectors. Ideal for text processing and information retrieval, capturing semantic similarities based on orientation rather than traditional distance.”
“Cosine similarity: Focuses on the angle between vectors.”
NVIDIA's vector-database glossary states the selection among embedding techniques depends on application needs, balancing semantic depth, computational efficiency, data types and dimensionality.
What NVIDIA says (1)
“The selection among embedding techniques depends on application needs, balancing factors like semantic depth, computational efficiency, the types of data to be encoded, and dimensionality.”
Key terms
- Embedding: A list of numbers (a vector) that represents the meaning of text, so similar text gets similar vectors.
- Cosine similarity: A similarity score based on the angle between two vectors.
Try it
Sample question
In a retrieval-augmented generation (RAG) pipeline, what does the embedding model do?
Show the answer
Answer: Converts text such as documents and queries into vectors so semantically similar text can be found
Embedding generation converts data into high-dimensional vectors representing text numerically; the query's vector is compared with stored vectors to find relevant information.
What NVIDIA says (2)
“Generating embeddings involves converting data into high-dimensional vectors, which represent text in a numerical format.”
“The system identifies relevant information by comparing the query vector with the stored vectors in the vector DBs.”
Practice 1.8 (3 questions) Full Core Machine Learning and AI Knowledge guide
← 1.7 Reading research and spotting trends · 1.9 Prompt engineering →