1.8 Text embeddings

NCA-GENL · Core Machine Learning and AI Knowledge (30% of the exam) · Official objective: “Select and use models to create text embeddings.”

What embeddings are, how similarity is measured, and how to choose a model.

Key points

  1. 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.”

    — RAG 101: Demystifying Retrieval-Augmented Generation Pipelines

    “The system identifies relevant information by comparing the query vector with the stored vectors in the vector DBs.”

    — RAG 101: Demystifying Retrieval-Augmented Generation Pipelines

  2. 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.”

    — What is a Vector Database and How Does it Work?

    “Cosine similarity: Focuses on the angle between vectors.”

    — What is a Vector Database and How Does it Work?

  3. 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.”

    — What is a Vector Database and How Does it Work?

Key terms

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.”

— RAG 101: Demystifying Retrieval-Augmented Generation Pipelines

“The system identifies relevant information by comparing the query vector with the stored vectors in the vector DBs.”

— RAG 101: Demystifying Retrieval-Augmented Generation Pipelines

Practice 1.8 (3 questions) Full Core Machine Learning and AI Knowledge guide

← 1.7 Reading research and spotting trends · 1.9 Prompt engineering →