Embedding
Definition
An embedding is a list of numbers that represents the meaning of a piece of text, so a computer can measure how similar two texts are. Texts about the same idea get similar numbers even when they use different words.
By Ronan Liedmeier, fractional head of growth and course author · Published 17 October 2026 · Last updated 17 October 2026
Also called: vector embedding, text embedding
Embeddings let a search match "refund" with "money back" and "cancel my plan" with "end subscription". They power semantic search and the search step in RAG systems.
How it works
An embedding model reads a piece of text and returns a long list of numbers, called a vector. Texts with similar meaning end up with vectors that sit close together, and a similarity score measures how close. To search, you embed every document chunk once and store the vectors, usually in a vector database. At question time you embed the question with the same model and fetch the chunks whose vectors are nearest.
Documents and questions must go through the same embedding model, so switching models means re-embedding everything.
Example
An online shop's help bot gets the message "my parcel never showed up". None of those words appear in the article titled "Lost or missing deliveries", yet the embedding search ranks that article first because the two texts mean nearly the same thing. A keyword search would likely have returned nothing.
Common mistake
Relying on embeddings alone when people search for exact identifiers. A support agent who types an SKU or an error code may get back chunks that are similar in topic but about the wrong product. Combine embedding search with keyword search, called hybrid search, so exact matches still come first.
Learn it in AI Academy
- RAG: When It's the Right AnswerExpert · 9 min
- RAG for One Document SetAdvanced · 16 minFree
Related terms
- Vector database
- A vector database is a database built to store embeddings, the number lists that represent the meaning of text, and to quickly find the ones closest to a new question. In many RAG systems it is the place where the search step happens.
- Semantic search
- Semantic search is a way of searching by meaning instead of exact words, so it finds passages that say what you asked even when they use different wording. It usually works by comparing embeddings, which are lists of numbers that capture what a piece of text means.
- Retrieval-augmented generation (RAG)
- Retrieval-augmented generation (RAG) is a way of getting an AI model to answer from your own documents. A search step first finds the passages that match the question, then the model writes its answer using those passages.
- Chunking
- Chunking is splitting long documents into smaller pieces before they go into a RAG system, so a search can find and return just the relevant part. Where you cut the text decides whether each piece still makes sense on its own.