Zenaique
Part ofFresher / New Grad·Week 1: Core ConceptsView roadmap →

What is the primary purpose of embeddings in modern NLP?

MCQ·Easy·4.3 · 95·~1 min·Asked atAmazonPerplexitySpotify·Relevant atAnthropicAppleCohereOpenAI
Attempt it
TL;DR

Embeddings map discrete text into a continuous vector space where geometric distance corresponds to semantic similarity, turning meaning into math.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Imagine giving every sentence a spot on a giant map, where sentences that mean similar things end up near each other. "My dog is barking" and "the puppy is loud" would sit close by. "The cake is tasty" would sit far away on a different part of the map. Once every sentence has a spot, comparing meanings becomes as easy as measuring how far apart two pins are. That is what this idea does for text. It turns words into numbers a computer can line up on a map. You can sort, search, group, and pair up sentences by simple map distance. The trick is the program that picks the spots. It has read tons of text and learned how to place new sentences in a place that respects meaning. That way the math done on top matches what humans think feels close.

Key concepts

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

The abstract definition of embeddings (dense vectors in a learned space) has concrete consequences (retrieval becomes geometry, RAG becomes possible, similarity becomes measurable).

What embeddings are, concretely

An embedding is a vector. For a typical text embedding model, the vector has between 256 and 3072 floating-point components, depending on the model. Each component is just a number. The components together describe a position in a high-dimensional space.

That position is not random. An embedding model computes it. The model has been trained on huge amounts of text, usually with a contrastive objective. That objective pushes semantically related text pairs toward similar positions and pushes unrelated pairs apart. The model has learned a map: input text in, position in vector space out.

The map has a key property. Two pieces of text with similar meaning end up at nearby positions. Two unrelated pieces end up far apart. This property is what makes the embedding useful. It also means embeddings are lossy: the vector is built for similarity comparisons, not for reconstruction. Even so, inversion attacks such as Vec2Text can recover much of a short input, so an embedding does not hide the text.

Why the geometry matters
Why each wrong option is a different concept
The production stack
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • OpenAI's text-embedding-3-large produces 3072-dimensional vectors and is the default embedding for many RAG stacks.
  • Voyage AI offers separate domain models for code, finance, and law (voyage-code-3, voyage-finance-2, voyage-law-2) where general embeddings can underperform.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QWhat is the difference between word embeddings (Word2Vec, GloVe) and modern sentence embeddings?
A

Word embeddings produce one fixed vector per word regardless of context. Sentence embeddings produce one vector per sentence or document, computed from a contextual encoder that handles polysemy and longer-range meaning. Word embeddings are static; sentence embeddings are contextual.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Confusing embeddings with compression, encryption, or translation. Compression is lossless; encryption is reversible by key; translation produces text. Embeddings produce dense vectors organised by meaning, not by any of those properties.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Which metric best measures whether a RAG answer is grounded in the retrieved context?
MCQ·Medium