What are embeddings? Definition and examples
On this page
Embeddings are lists of numbers that represent the meaning of a piece of text, so software can find related content by measuring how close two lists are.
How it works
An embedding model reads a word, sentence or passage and outputs a vector: a fixed-length list of decimal numbers. OpenAI's documentation puts it simply: "An embedding is a vector (list) of floating point numbers," and "small distances suggest high relatedness and large distances suggest low relatedness" (OpenAI).
The numbers themselves mean nothing to a person. What matters is position: texts with similar meaning land near each other, even when they share no words. "How do I cancel my plan?" ends up close to a help article titled "Ending your subscription", and far from "Our office is closed on public holidays".
Vectors are long. The same OpenAI page lists default lengths of 1,536 numbers for text-embedding-3-small and 3,072 for text-embedding-3-large. Similarity is usually measured with cosine similarity or a related distance score.
The guide lists the common uses: search, clustering, recommendations, anomaly detection, diversity measurement and classification.
Why it matters for your website
Embeddings are what let a site assistant or AI search find the right passage when a visitor's words don't match your wording. That matters because visitors rarely use your product vocabulary. They type "can I pay by bank", not "supported payment methods".
A few practical consequences:
- Search by meaning, not keywords. Embeddings power the retrieval step in retrieval-augmented generationRetrieval-augmented generation (RAG) is a technique where an AI system first looks up relevant documents, then writes its answer using what it found..
- Passages, not pages. Long pages are split by chunkingChunking is splitting long documents into smaller passages before indexing, so an AI system can retrieve just the part of a page that answers a question. before embedding, so each vector represents one focused section. Clear headings and self-contained paragraphs embed better.
- One model per index. Vectors from different embedding models are not comparable, so changing models means re-embedding all content.
- Close is not the same as correct. The nearest passage can still be the wrong one, which is why many systems add a rerankingReranking is a second search step in which a model reorders a shortlist of retrieved passages by how well each one actually answers the user's question. step.
Example
The numbers below are made up and shortened to three dimensions, purely to show the idea.
| Text | Toy embedding |
|---|---|
| "Can I pay by bank transfer?" | 0.82, 0.10, 0.31 |
| "We accept wire transfers for annual plans" | 0.79, 0.14, 0.35 |
| "Our team is based in Lisbon" | 0.05, 0.91, 0.12 |
The first two rows sit close together, so a search for the question would return the wire-transfer passage, even though "bank transfer" and "wire transfer" are different words.
Related terms
- Vector database: stores embeddings and finds the nearest ones fast.
- Retrieval-augmented generation (RAG): uses embeddings to fetch passages before answering.
- Chunking: decides what each embedding represents.
- Reranking: rechecks the closest matches for real relevance.
Sources
- Vector embeddings (OpenAI API documentation) — accessed October 20, 2026
Articles that use this term
AI search
AI site search: replacing the search box with answers
How AI site search turns a keyword box into short, sourced answers: how it works, where it goes wrong, and what to measure before and after you switch.
AI search
Site search analytics: what zero-result searches tell you
Zero-result searches show what visitors want and your site does not deliver. How to track them in GA4, read the patterns and fix search, content and pages.
AI support
Train an AI chatbot on your website and keep it accurate
What training a chatbot on your site really means, how to prepare, chunk and test your pages, and the routine that keeps its answers accurate after launch.