What is an embedding?

An embedding is a list of numbers that represents the meaning of a piece of text, so that software can compare texts by meaning and not only by exact words.

Key takeaways

  • Texts with similar meaning get similar numbers.
  • Embeddings power search by meaning, recommendations and RAG.
  • You rarely see them, but they sit behind most document chat features.

How it works

A model reads a passage and outputs a long list of numbers. Passages about the same idea land close together in that number space, even when they share no words. To search, the tool turns your question into an embedding and finds the stored passages that sit closest to it.

Example

You search a help center for "money back". A keyword search finds nothing, because the article says "refund policy". A search built on embeddings finds the article, because the meanings match.

Why it matters

When a product claims semantic search or says it understands your documents, embeddings do that work. They also explain why such a search sometimes returns a related but wrong passage.

Common mistake

Close in meaning is not the same as correct. An embedding search returns the nearest text, and that text can miss the point of your question.

Related terms

See all terms in the AI Encyclopedia, the numbers on the AI statistics pages, or build a prompt with the prompt builder.