LLM & Transformer Fundamentals·Question 73 of 109Quick-fire

What is an embedding, and how is it used?

Quick-fire answer from the Awesome Generative AI Guide (MIT)

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

An embedding is a dense vector that represents the meaning of a piece of text (or image, audio) so that semantically similar items sit close together in vector space. You compute embeddings for your documents once, store them in a vector index, then embed a query at request time and retrieve the nearest vectors by cosine similarity. Embeddings power semantic search, RAG retrieval, clustering, deduplication, and classification. Choosing an embedding model is a real decision: dimensionality, max input length, domain fit, and cost all matter, and you should evaluate retrieval quality on your own data rather than trusting a leaderboard.

Full worked answer

An embedding is a dense vector that represents the meaning of a piece of text (or image, audio) so that semantically similar items sit close together in vector space. You compute embeddings for your documents once, store them in a vector index, then embed a query at request time and retrieve the nearest vectors by cosine similarity. Embeddings power semantic search, RAG retrieval, clustering, deduplication, and classification. Choosing an embedding model is a real decision: dimensionality, max input length, domain fit, and cost all matter, and you should evaluate retrieval quality on your own data rather than trusting a leaderboard.

Learn more: RAG topic

What a good answer covers

  • An embedding is a dense vector that represents the meaning of a piece of text (or image, audio) so that…
  • You compute embeddings for your documents once, store them in a vector index, then embed a query at…
  • Embeddings power semantic search, RAG retrieval, clustering, deduplication, and classification
  • Choosing an embedding model is a real decision

Key terms: Learn more

Quick-fire answer from the Awesome Generative AI Guide (MIT) · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep