Glossary

Embeddings

Embeddings turn words, images and documents into lists of numbers that capture meaning. Here is how they work and why search and chatbots depend on them.

Embeddings are lists of numbers that represent the meaning of a piece of data, such as a word, a sentence, a photo or a product. Items with similar meanings get similar numbers, so a computer can measure how close two ideas are by measuring the distance between their embeddings.

They are one of the quiet workhorses of modern AI. Search engines, recommendation feeds and chatbots that answer questions about your own files all rely on them.

Key takeaways

  • An embedding is a vector: a long list of numbers, often hundreds or thousands of them.
  • Closeness between vectors stands in for closeness in meaning.
  • Embeddings make "semantic search" possible, where you find things by meaning instead of exact keywords.

How do embeddings work?

A trained model, called an embedding model, reads an input and outputs a fixed-length list of numbers. You can picture each number as a position along one hidden dimension of meaning. No single number has a neat label, but together they place the input somewhere on a vast map.

On that map, "doctor" and "physician" land near each other. "Doctor" and "banana" land far apart. To compare two texts, software calculates how close their points are, usually with a measure called cosine similarity, which checks whether two vectors point in roughly the same direction.

The model learns this map during training by seeing which words and sentences appear in similar contexts. Early, famous examples such as word2vec, published by Google researchers in 2013, showed that simple math on word vectors could capture relationships like "king is to queen as man is to woman."

An example

Imagine an online bookshop. A customer types "books about surviving on Mars." No title contains those exact words, but the embedding for the query sits close to the embedding for a novel about a stranded astronaut. Semantic search finds it anyway. The same idea powers many recommendation engines, which suggest items whose embeddings sit near things you already liked.

Why do embeddings show up in the news?

Embeddings are the first step in retrieval-augmented generation, the popular method for grounding chatbots in a company's own documents. Text is chopped into chunks, each chunk is embedded, and the vectors go into a vector database. When a question arrives, the system finds the closest chunks and hands them to the model. Announcements of new "embedding models" from AI labs usually promise better accuracy across languages or cheaper storage.

Why It Matters

Whenever a workplace chatbot answers questions from your company's files, embeddings decide which passages it gets to see. If the wrong chunks come back, even an excellent model will give a weak or wrong answer. That makes embedding quality a practical buying question for any business adopting AI search, especially in multilingual markets like India, where a question typed in one language should still find a document written in another. It also explains why shopping feeds can seem to read your tastes so closely.

Frequently asked questions

Are embeddings the same as tokens?

No. Tokens are the chunks text is split into. Embeddings are the numerical representations of meaning, which can be made for a single token or for a whole sentence, paragraph or image.

Can embeddings work across languages and images?

Yes. Multilingual embedding models place a sentence in Hindi and its English translation near each other. Multimodal models can place a photo of a dog near the text "a dog," which lets you search images with words.

Researched and written by The AI Telegraph staff and checked against primary sources. See our editorial policy. Spotted an error? Tell us.