New · France 2027 presidential election: what the candidates propose on AI, quoted and sourced. Explore the tracker →

Last reviewed:

What is an embedding? Definition and business implications

An embedding is the numerical representation of a word, a sentence, or a document, in the form of a vector in a space of several hundred or thousand dimensions. Two texts semantically close have geometrically close embeddings, which enables search by meaning rather than by keywords.

An embedding model is a specialised neural network, distinct from the LLM, that takes a text as input and produces a fixed numerical vector as output. The dimension of this vector varies by model: 1,536 for OpenAI text-embedding-3-small, 3,072 for text-embedding-3-large, 1,024 by default for Voyage 4 (adjustable from 256 to 2,048), as for Mistral Embed. The higher the dimension, the more semantic nuance the vector can capture, at the cost of proportionally higher storage and compute cost. The fundamental property of an embedding is that the distance between two vectors (measured by dot product or cosine similarity) reflects the semantic proximity of the corresponding texts. “Defence lawyer” and “legal counsel” are distant in the dictionary but close in the embedding space. That is what allows, in a RAG, the retrieval of relevant passages even when the query uses different words from those of the target document.

Concrete example

Illustrative case. A 30-employee legal SME indexes 5,000 internal contracts to enable its lawyers to search by meaning. Using OpenAI text-embedding-3-small (1,536 dimensions, 0.02 dollar per million tokens), initial indexing of a 50-million-token corpus (about 10,000 per contract) costs in the order of 1 dollar, and each search query a fraction of a cent. Vector storage (5,000 documents × 1,536 dimensions × 4 bytes) fits in 30 MB. With text-embedding-3-large (3,072 dimensions), quality rises by about 2 points on the public MTEB benchmarks, for a cost 6.5 times higher. The choice depends on business sensitivity to semantic recall.

FAQ

What is an embedding?

It is the numerical representation of a word, sentence, or document as a vector, in a space of several hundred or thousand dimensions. Two texts close in meaning have geometrically close embeddings. That is what makes search by meaning, rather than by keyword, possible.

How does an embedding model differ from an LLM?

It is a specialised neural network, distinct from the LLM: it takes text as input and produces a fixed numerical vector as output, rather than generating text. The distance between two vectors (dot product or cosine similarity) reflects their semantic proximity. That mechanism is what lets a RAG retrieve a relevant passage even when the query uses different words from the document.

Should you pick the highest dimension?

Not as a rule. The higher the dimension, the more nuance the vector captures, but the more storage and compute cost, proportionally. A 3,072-dimension model stores twice as much as a 1,536-dimension one; for corpora under 100,000 documents, the lower dimension is amply sufficient.

What is the classic pitfall to know before starting?

Changing embedding model after going to production requires re-indexing the entire corpus, an expensive and slow operation. The initial choice is therefore a multi-year decision, not a parameter to adjust on the fly. Bear this in mind all the more if your corpus is in French or Spanish: many models are trained mainly in English and lose performance on those languages.

What does it actually cost?

For illustration, indexing 5,000 internal contracts with OpenAI text-embedding-3-small (1,536 dimensions) costs in the order of 1 dollar for a 50-million-token corpus, and the vector storage fits in 30 MB. The larger 3,072-dimension model gains about 2 points on the public MTEB benchmarks, at 6.5 times the cost. The trade-off depends on how sensitive the business is to semantic recall.

See also

Further reading

OpenAI documentation, Embeddings guide (external resource)

Sources

  1. OpenAI Embeddings documentation. https://developers.openai.com/api/docs/guides/embeddings (accessed 2026-05-24)
  2. Massive Text Embedding Benchmark (MTEB) leaderboard, Hugging Face. https://huggingface.co/spaces/mteb/leaderboard (accessed 2026-05-24)
  3. Voyage AI, Text Embeddings, documentation (voyage-4 series, January 2026). https://docs.voyageai.com/docs/embeddings (accessed 2026-09-29)
  4. Mistral AI, Embeddings, documentation. https://docs.mistral.ai/capabilities/embeddings/ (accessed 2026-09-29)

Editorial methodCorrections log

← Back to glossary

Address copied