Models and training

Embedding

An embedding is a list of numbers that represents the meaning of a piece of text, an image or another item, so that items with similar meanings end up close together and can be compared, searched or grouped by software.

Computers compare words by their spelling, which is why a search for "cancel my plan" can miss a help article titled "ending your subscription". An embedding solves this by turning text into a position in a space of meaning. Two passages about the same idea land near each other even if they share no words. Embeddings sit underneath most AI search, document question-answering, recommendation and duplicate detection, so they appear in many builds even when the buyer never sees them.

How it works

An embedding model reads an input, such as a sentence, a paragraph or an image, and outputs a fixed-length list of numbers, called a vector. The model has been trained so that similar inputs produce similar vectors. Comparing two items then becomes a quick calculation of how close their vectors are.

In a typical document search build:

  1. Documents are split into passages (chunking).
  2. Each passage is sent to an embedding model, and the resulting vectors are stored in a vector database.
  3. When a user asks a question, the question is embedded with the same model.
  4. The database returns the passages whose vectors are closest, which is the core of semantic search and retrieval-augmented generation.

Embeddings are also used to group similar support tickets, find duplicate records, match products to customers in a recommendation system and flag unusual items.

Embedding models are separate from chat models. They are generally smaller and cheaper per use, and they differ in language coverage, domain strength and vector size.

What it means for cost

Creating embeddings is usually a modest part of running cost, because each passage is embedded once and only re-embedded when it changes. The larger cost is in the decisions around them: how to split documents, which embedding model suits your language and subject, how to keep the index in sync as documents change, and how to test that searches return the right passages.

Changing the embedding model later means re-embedding everything, which matters for large collections. Ask a builder which embedding model they chose and why, how updates to documents are handled, and how retrieval quality will be measured.

Common questions

Is an embedding the same as a language model?

No. An embedding model turns input into numbers for comparison; it does not write text. A typical AI search build uses an embedding model to find relevant passages and a separate language model to write the answer.

Can embeddings from different models be mixed?

No. Vectors from different embedding models live in different spaces and cannot be compared meaningfully. Switching models means re-embedding the whole collection.

Do embeddings work across languages?

Multilingual embedding models can place similar meanings close together across languages, so a question in one language can find a passage in another. Quality varies by language pair, so builds serving several languages should test each.

Related terms

Pricing a build that involves Embedding? Send the brief and get a fixed price set next to the market range.Get a quote