A8gent
GlossaryAgent concepts

What is embedding?

Also called: vector embedding, text embedding

An embedding is a list of numbers representing a piece of text's meaning, arranged so that texts with similar meanings sit close together in the same numeric space.

Written by A8gent
Contents
  1. At a glance
  2. What an embedding is
  3. What they are used for
  4. Rules, limits and cost
  5. What you should know
  6. FAQ
  7. Related terms

At a glance

Category
Agent concept - retrieval
What it is
A fixed-length numeric vector whose position encodes meaning
Similarity measure
Usually cosine similarity - the angle between two vectors
Hard rule
Index and query with the same model; vectors from different models are incomparable
Changing model
Requires re-embedding the entire corpus
Weak at
Exact identifiers - part numbers, references, surnames. Use hybrid search

What an embedding is

An embedding is a fixed-length list of numbers - a vector - produced by a model that has been trained so that semantically similar inputs land near each other. "Cancel my appointment" and "I need to reschedule" contain almost no shared words but produce nearby vectors, because the model encodes meaning rather than spelling. That property is what makes semantic search possible.

Concretely, an embedding model takes text up to some input limit and returns a vector of several hundred to a few thousand numbers. The numbers themselves mean nothing individually; only the geometry matters. Similarity is measured with cosine similarity - the angle between two vectors - which is why every vector database talks about distance metrics.

What they are used for

Three jobs cover almost all business use. Retrieval: embed your document chunks once, embed each question at query time, and return the nearest chunks - this is the search half of RAG. Classification: embed a new item and see which labelled examples it sits nearest, which is a cheap and surprisingly strong alternative to prompting for routing tasks. Deduplication and clustering: find the near-identical support tickets, group enquiries by theme without deciding the themes in advance.

Embeddings are also far cheaper than generation. Providers price them per million tokens at a small fraction of chat rates, and there is no expensive output side, so embedding a corpus is a small one-off cost rather than a project line item.

Rules, limits and cost

Three constraints matter in practice. First, you must use the same model for indexing and querying - vectors from different models are not comparable, and mixing them produces silently meaningless results rather than an error. Second, changing embedding models means re-embedding everything, so treat the choice as a migration, not a setting. Third, each model has an input limit; text beyond it is truncated, which is another argument for sensible chunk sizes.

Dimension count is a cost and quality trade: larger vectors capture more nuance and cost more to store and search. Several current models support shortening the vector at the cost of some accuracy, which is worth using at scale. Check the specific model's documentation for its limit, dimensions and price before you index a corpus.

What you should know

Embeddings are weak exactly where business queries are often strongest: exact identifiers. A part number, an invoice reference or a person's surname is a token-level match problem, and semantic similarity handles it badly. This is why production retrieval is usually hybrid - keyword search and vector search combined, then reranked.

They also inherit whatever the training data contained, including its biases, and they are language-sensitive: a multilingual model is required if your documents and your customers do not share a language. Test on your own material before committing, because embedding quality varies far more by domain than the benchmark tables suggest.

Embedding FAQ

What is an embedding in AI?

A list of numbers representing a piece of text, produced by a model trained so that similar meanings produce nearby vectors. It lets a computer measure how related two pieces of text are even when they share no words at all.

What are embeddings used for?

Semantic search and the retrieval half of RAG, classification by nearest labelled example, and clustering or deduplication of things like support tickets. They are much cheaper than generation, so they are the right tool whenever the job is comparing rather than writing.

Can I mix embedding models?

No. Vectors from different models live in different spaces and comparing them produces nonsense without raising any error, which makes it a nasty bug to find. If you change models you have to re-embed the whole corpus, so treat the choice as a migration decision.

How much do embeddings cost?

A small fraction of chat model rates, priced per million input tokens with no output side. Embedding a few thousand pages is typically a one-off cost of a few dollars on current models. Storage and query costs in a vector database usually exceed the embedding bill at scale.

Why does semantic search miss my product codes?

Because embeddings encode meaning and a product code has almost none - it is a token-level string match. This is the classic case for hybrid retrieval: run keyword search alongside vector search, merge the results, and rerank. Pure semantic search will keep disappointing you on identifiers.

Do embeddings work across languages?

Only if the model is multilingual. A model trained mainly on English will place a French question and its English answer far apart. If your documents and customers do not share a language, choose a multilingual model explicitly and test retrieval on real cross-language pairs.

Primary source

OpenAI - embeddings guide

Checked August 2026. Anything priced or rate-limited moves, so verify against the source before you budget.

Want this built rather than explained?

Knowing what embedding means is one thing; having it running in your business is another. We scope one workflow at a time, quote a fixed price in writing after a free consult, build it, and hand it over with documentation you own.