Definition
An embedding model converts an input, such as text, an image, or audio, into a fixed-length vector. During training, it learns to place inputs with relevant shared patterns near each other in a vector space.
The model performs the conversion. The vector it returns is the embedding. A search system can then compare or rank those vectors, but that work happens outside the embedding model.
An embedding model has a usage contract. That can include a tokenizer or media processor, a maximum input size, expected query and document prefixes, the output vector dimensions, and a recommended similarity measure.
Simple example
Suppose a documentation search contains a passage about cancelling a .NET BackgroundService. The application sends that passage to a text embedding model and stores the returned vector.
Later, it sends the query “stop a worker cleanly” through the same model, using the query format the model expects. The two vectors may be close even though the text uses different words. The search system performs the comparison. The embedding model only produced the representations used in that comparison.
Why it matters
The embedding model defines the vector space in which an application compares inputs. Its training data and objective affect which similarities it captures. Supported languages, output dimensions, and input limits constrain where the model fits. Latency and cost depend on how and where it is served.
Changing the model usually means migrating data. If the replacement produces a different embedding space, re-embed stored content before comparing its vectors with new query embeddings. Then evaluate retrieval quality again with representative queries. A model that performs well on a public benchmark may still be a poor fit for a specific codebase, language, or product catalog.
One important nuance
Two embedding models can return vectors with the same number of dimensions and still produce incompatible representations. Vector length alone does not define the space. Model version and input preparation are part of the contract too.
Some models also distinguish between query and document inputs. Using the wrong mode can reduce retrieval quality even when every request succeeds and every vector has the expected shape.