How it works · 2 of 37 Foundation

What are embeddings in AI?

Meaning as a position on a map

Embeddings: Text becomes a list of numbers so that similar meanings land close together.

Loading the animation…

Say it like this An embedding turns text into a list of numbers — a position on a map of meaning — so related ideas sit close together even when they share no words.

Under the hood — for builders
Directions carry meaning: Word2Vec (Google, 2013)
Take the numbers for “king”, subtract “man”, add “woman”: the nearest word is “queen”. Learned from text alone.
Real sizes
The scene draws 2 numbers per word. Real models give each piece of text hundreds or thousands. Drawn to scale:
How “close” is measured
Cosine similarity: the angle between two lists of numbers, up to 1. Where real scores tend to fall:
Pick a model
MTEB, a public benchmark, ranks embedding models. Shortlist three, then compare recall@k on your own questions.
Store them
A vector index finds the nearest among millions in milliseconds: pgvector (inside Postgres), FAISS (a library), or hosted.
Watch out
Same model for documents and questions. Exact codes (“E-4012”) blur: add keyword search.
Sources
Mikolov et al., Word2Vec (Google, 2013) · all-MiniLM-L6-v2 and text-embedding-3-large model cards · MTEB.

What happens in the embeddings animation, step by step?

  1. Computers can't compare meanings directly. So we give every word a position on a map of meaning.
  2. An embedding model gives each word a position: a list of numbers called its embedding. (Real ones have hundreds; we draw two.)
  3. It's a second, smaller AI: it learned these positions from huge amounts of text, and it only places text. It never writes answers.
  4. Similar meanings land close together — "puppy" and "dog" share no letters, yet they're neighbours.
  5. Close means related, far means unrelated. Whole sentences and pages get positions too: that's how RAG knew "Returns" belongs with a refund question.
  6. Your turn — drag a word onto the map, or tap it, and see where it lands.

What everyday example explains embeddings?

A supermarket map: apples near pears, far from detergent, though the words "apple" and "pear" look nothing alike.

Why should a team care about embeddings?

Finding relevant text without exact keywords.