Skip to content

What is an embedding?

An embedding is a list of numbers that represents the meaning of a piece of data, such as a word, sentence, image, or product. Items with similar meanings get similar numbers, which lets software compare them by meaning instead of exact wording.

Last reviewed .

How embeddings work

An embedding model reads an item and produces a vector, which is a long list of numbers. Two pieces of text that mean similar things end up with vectors that sit close together.

Software can then measure the distance between vectors to find the closest matches.

What embeddings are used for

Embeddings power semantic search, recommendations, content grouping, and duplicate detection. They are also a core part of retrieval-augmented generation, where they help find relevant passages to give a language model.

They are usually stored in a vector database so that similar items can be found quickly.

Limits to keep in mind

An embedding reflects the data and model that created it. If your content changes or you switch models, you will need to create the embeddings again.

Common questions

What's the difference between an embedding and a token?

A token is a small piece of text a model reads. An embedding is a set of numbers that represents meaning, and it can describe a token, a sentence, or a whole document.

Why are embeddings useful for search?

They let a search match meaning rather than exact words. A query about cheap flights can find a page about low-cost airfare even if the words differ.

Where are embeddings stored?

They're commonly stored in a vector database, which is built to find similar vectors quickly. Smaller projects may use other storage that supports vector search.

Do embeddings only work with text?

No. Embeddings can also represent images, audio, and other data types, depending on the model.

Want help putting this to work?

Tell us where your marketing stands today, and we'll show you what to do first.