# What Is Embedding? A Plain-English Definition

> An embedding is a list of numbers that a model produces from a piece of text, placed so that texts with similar meaning end up close together. AI agents use embeddings to find relevant documents; they do not use them to write answers.

Canonical URL: https://www.ruebstudio.de/en/glossary/embeddings  
Author: Dr.-Ing. Marcus Rüb, CEO  
Published: 2026-10-29

An embedding is a vector of floating-point numbers that represents a piece of text (or an image) so that similar content gets similar numbers. [Google's Machine Learning Crash Course](https://developers.google.com/machine-learning/crash-course/embeddings) describes embeddings as dense vector representations that capture semantic relationships. For a business, this is what lets software search manuals, support tickets or contracts by meaning rather than by exact wording.

## How do embeddings work?

An embedding model reads a text and returns a fixed number of values. To compare two texts, you measure the distance between their vectors, usually with cosine similarity. A small distance means related content, even when the two texts share no words: "the pump is leaking" and "fluid escaping from the unit" can land close together.

Vector size depends on the model. According to the [OpenAI documentation](https://developers.openai.com/api/docs/guides/embeddings), `text-embedding-3-small` returns 1,536 values by default and `text-embedding-3-large` returns 3,072, and both accept a `dimensions` parameter for shorter vectors. The open model [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) produces 384 values and truncates input after 256 word pieces. The [Sentence Transformers library](https://sbert.net/docs/sentence_transformer/usage/semantic_textual_similarity.html) uses cosine similarity as its default comparison.

In practice, the workflow looks like this:

1. Split documents into chunks, such as one section of a service manual.
2. Embed each chunk once and store the vector.
3. When a question comes in, embed it with the same model.
4. Return the chunks whose vectors are closest.

## What embeddings are not

Embeddings do not generate text or answer questions. They only measure similarity. A [large language model (LLM)](https://www.ruebstudio.de/en/glossary/large-language-model-llm) writes the answer using the retrieved chunks as context, a pattern known as [retrieval-augmented generation (RAG)](https://www.ruebstudio.de/en/glossary/retrieval-augmented-generation-rag).

Related terms are easy to mix up:

- **Vector database:** stores and searches the vectors efficiently. The embedding is the data; the database is where it lives.
- **Semantic search:** the application built on embeddings, searching by meaning instead of keywords.
- **Keyword search:** often more reliable for exact strings such as part numbers or invoice IDs. Many systems run both side by side.

## What to watch out for

Result quality usually depends more on the model you pick and how you chunk documents than on the database. Three issues come up repeatedly.

- **Language coverage:** the all-MiniLM-L6-v2 model card lists English training data. If your documents are in German, French or Spanish, choose a multilingual model and test it with real queries.
- **One model per collection:** vectors from different models are not compatible, so a model change means re-embedding everything.
- **Data flow:** a hosted embedding API receives every chunk you index. A model running on your own servers, as with an [on-premise LLM](https://www.ruebstudio.de/en/glossary/on-premise-llm), keeps the collection in-house.

To see how embeddings fit into [AI agents for knowledge work, service and sales](https://www.ruebstudio.de/en/ai-agents), look at the [knowledge management agent](https://www.ruebstudio.de/en/ai-agents/knowledge-management). More terms are explained in the [AI glossary](https://www.ruebstudio.de/en/glossary).

## Frequently asked questions

### Is an embedding model the same as a large language model?

No. An embedding model turns text into vectors for comparison, while a language model generates new text. Agents usually combine the two, each with its own job.

### Can I compare embeddings from two different models?

No. Each model has its own vector space, so its numbers only make sense next to vectors from the same model. Switching models means re-embedding your whole collection.

### Do embeddings have to be created in the cloud?

No. Open embedding models can run on your own servers, which keeps documents inside your network during indexing.

## Sources

- [OpenAI API Docs: Vector embeddings](https://developers.openai.com/api/docs/guides/embeddings)
- [Sentence Transformers: Semantic Textual Similarity](https://sbert.net/docs/sentence_transformer/usage/semantic_textual_similarity.html)
- [Hugging Face: sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
- [Google Machine Learning Crash Course: Embeddings](https://developers.google.com/machine-learning/crash-course/embeddings)
