What it is used for

Embeddings work behind many features that feel ordinary. Search engines use them to find results by meaning rather than by exact matching words. Online shops use them to recommend items related to what a shopper is viewing. Note and document apps use them to group similar contents without a human reading everything one by one.

The fastest growing use is fetching material for a language model. A system stores embeddings of document chunks, and when a question arrives, it looks for the chunks whose numbers are closest to the numbers of the question. The chosen chunks are then handed to the language model to compose an answer. This pattern lets AI answer from your own documents, such as an office archive or a body of regulations.

How to use it

Ordinary users generally do not create embeddings by hand. We feel them through search features that still find results when the typed words differ from the words in the document, for example searching “how to return an item” and finding a page titled “returns policy”.

For developers, the steps are clear. Text is sent to an embedding model, an AI model whose only job is turning text into numbers, and the returned list of numbers is stored in a vector database, a database designed to search for numerical similarity quickly. When a user asks something, the question is converted with the same model, and the system retrieves the texts whose numbers are closest.

One rule must be kept: texts and questions have to be converted with the same embedding model. Numbers from two different models cannot be compared, like comparing Celsius with Fahrenheit without conversion.

Practitioner level

According to OpenAI's official documentation, an embedding is a vector, a list of floating point numbers, and the distance between two vectors measures their relatedness: small distances suggest high relatedness and large distances suggest low relatedness. OpenAI's newest models for this purpose are text-embedding-3-small, with a vector 1,536 numbers long, and text-embedding-3-large, with 3,072 numbers.

A longer vector generally captures finer shades of meaning, but it takes more storage and costs more. OpenAI's third generation models offer a dimensions parameter, which lets developers shorten the vector without losing much of its ability to represent concepts. Usage is billed by the number of tokens in the input text, not by the number of later questions.

An embedding model differs from a chat model. A chat model produces words as an answer, while an embedding model only produces numbers as raw material for other systems to process.

Expert level

At the advanced level, system quality is decided by the choice of embedding model and by how text is cut before conversion. Long documents are usually split into chunks small enough for their meaning to stay sharp, yet large enough for context not to be lost. A common similarity measure is cosine similarity, which compares the direction of two vectors.

Another key decision is when embeddings must be rebuilt. If a document collection changes its embedding model, the whole collection has to be converted again with the new model, because old and new numbers do not live in the same space. Serious teams therefore record which model version produced each collection and test search quality with real questions instead of trusting general benchmark scores alone.

Limits and risks

Embeddings capture statistical similarity, not truth. Two sentences that sound alike but state opposite facts can sit close together numerically, so a search system still needs to check content, not just distance.

There is also a representation risk. An embedding model learns from the text it was trained on; languages, regional terms, or specialist fields that rarely appear in the training data may be mapped less well. For collections in Indonesian or with distinctive technical vocabulary, result quality should be tested directly on your own data.

Finally, these lists of numbers cannot be read directly by humans and are hard to audit. If text is sent to a third party embedding service, that text leaves your own devices, so confidential documents should be processed under a clear policy or with a model running on your own infrastructure.