The short answer
An embedding is a list of numbers that an AI model produces to represent the meaning of a piece of content, such as a sentence, an image or a page of a PDF. Content with similar meaning gets similar numbers, so software can find related items by measuring how close they are. Google's Gemini Embedding 2, last updated in April 2026, turns text, images, video, audio and PDFs into vectors of up to 3,072 numbers for search, classification and RAG.
| Plain meaning | Meaning turned into a list of numbers (a vector) so a computer can compare it |
|---|---|
| Used for | Search by meaning, RAG, classification, clustering, finding duplicates and anomalies |
| Typical size | Gemini Embedding 2: 128 to 3,072 numbers per item, 3,072 by default |
| Example models | Google Gemini Embedding 2 and gemini-embedding-001, Cohere Embed 5 |
| Main catch | Vectors from different models cannot be mixed; switching model means re-embedding everything |
What an embedding is, in plain English
Computers are good at comparing numbers and bad at comparing meaning. An embedding fixes that. An embedding model reads a piece of content and returns a long list of numbers, called a vector. Each list works like a set of coordinates on an enormous map of meaning. Things that mean similar things land close together on the map, and things that are unrelated land far apart.
Think of a map of a city. "Annual leave policy" and "how many holiday days do I get" share almost no words, yet they ask the same question, so their coordinates sit next to each other. "Leave the building in a fire" shares the word leave but sits in a different district. A keyword search sees the shared word; an embedding search sees the meaning.
The numbers are not readable by people. No single number means "holiday" or "finance". What matters is the distance between two vectors, which software calculates in milliseconds, even across millions of documents.
How embeddings work, step by step
- Embed your content. Each document, paragraph, product description or image is sent to an embedding model once, and the vector that comes back is stored, usually in a database built for vectors.
- Embed the question. When someone searches, their query goes through the same model and becomes a vector too.
- Compare. The system finds the stored vectors closest to the query vector and returns those items, ranked by closeness.
- Optionally rerank and answer. Some systems pass the top results to a reranking model, such as Cohere's Rerank 5, and then to a chat model that writes an answer from them.
The size of the list is called its dimensions. Google's embedding documentation, updated on 29 October 2026, says both of its current models output 3,072 numbers by default and can be cut down to anywhere from 128, with 768, 1,536 and 3,072 recommended. Smaller vectors take less storage and are faster to search, at some cost in precision. Gemini Embedding 2 also accepts images, short audio and video clips and PDFs of up to six pages, and places them on the same map as text, which is what multimodal search relies on. The older gemini-embedding-001 handles text only.
Why embeddings matter at work
You rarely see embeddings, but a lot of the AI you use at work depends on them.
- Search that understands what you meant. An intranet or help centre that finds the right policy when you use different words from the author is often doing embedding search, or mixing it with keyword search.
- Chat with your documents. Retrieval-augmented generation, or RAG, is the first use case Google lists for its embedding models. The system embeds your files, finds the passages closest to your question and hands only those to the chat model. That is how an assistant can answer from a 2,000-page knowledge base that would never fit in its context window.
- Sorting feedback at scale. Clustering similar vectors groups thousands of survey comments or support tickets by theme without anyone writing rules first.
- Classification and routing. A new ticket can be sent to the team whose past tickets sit closest to it.
- Duplicates and oddities. Near-identical vectors flag duplicate records; a vector far from everything else can flag an anomaly worth a human look.
If you are choosing a tool that answers from company files, ask the vendor how it retrieves passages, how it keeps permissions (can an intern's search surface the board pack?) and how often it re-indexes new documents. Those three answers tell you more than the chat model's name. For a ready-made option, Gemini Notebook grounds its answers exclusively in the sources you add, and Cohere sells Embed 5 and Rerank 5 to companies building their own search; see the Cohere guide. For an end-to-end workflow, read how to summarise a PDF with AI and the best AI for research.
An example you can try in five minutes
You do not need code to see the idea. This exercise imitates what an embedding search does, using any chat assistant such as ChatGPT, Claude or Gemini.
- Write down eight short sentences from your own work: three about one topic (say, expenses), three about another (say, hiring) and two that share a keyword with the first group but mean something else, such as "the client expensed our patience".
- Add one search question that uses none of the key words, such as "how do I get paid back for a train ticket?"
- Paste everything into the prompt below and look at the ranking.
A good answer ranks the real expenses sentences first even though they never say "paid back" or "train", and pushes the keyword lookalikes down. That is the behaviour embeddings give a search system, done with numbers instead of a chat model's judgement. If you are technical, the Gemini API and Cohere's API both return real vectors you can compare, and Google's documentation shows how in a few lines.
Related terms worth knowing
- RAG: the method that uses embeddings to fetch relevant passages before a model answers.
- Token: the unit of text models read; embedding models have token limits too (8,192 for Gemini Embedding 2).
- Large language model: the chat model that usually writes the final answer.
- Multimodal AI: models, including some embedding models, that handle images, audio and video as well as text.
- Hallucination: what still happens when retrieval fetches the wrong passage.
- Prompt injection: a risk when retrieved documents contain hidden instructions.
Common misconceptions about embeddings
- "Embeddings mean the AI understands my documents." They capture patterns of similarity learned from training data. Close vectors are a strong hint of related meaning, not a guarantee, which is why many systems add a reranking step and a human check.
- "Any embedding works with any other." They do not. Google's documentation warns that Gemini Embedding 2 and gemini-embedding-001 produce incompatible spaces, so upgrading means re-embedding all existing data. Budget for that when you plan a switch.
- "More dimensions is always better." Larger vectors can be a little more precise, but they cost more to store and search. Google recommends three sizes for a reason: test the smaller one first.
- "Numbers are anonymous, so the vector store is not sensitive." The OWASP Top 10 for LLM applications lists Vector and Embedding Weaknesses as a risk in its own right (LLM08:2025). Protect the vector database with the same access rules as the documents it came from.
- "If it uses embeddings, the answers are grounded and true." Retrieval narrows what the model sees; it does not stop the model misreading it. Always open the cited passage before you repeat a figure. Our guide to checking whether AI is telling the truth shows how.
Prompts to copy
See embedding-style search with a chat assistant
Act like a semantic search engine. Here are eight sentences: [paste sentences, numbered]. Rank them from most to least relevant to this question: [question]. Judge by meaning, not shared words. For each, give a relevance score from 0 to 10 and one line on why. Then tell me which sentences a plain keyword search would have ranked wrongly.
You get: A ranking that shows the difference between matching meaning and matching words
Prepare questions for a document-search vendor
I am evaluating a tool that answers staff questions from our [SharePoint, Google Drive or wiki]. Write 10 sharp questions to ask the vendor about how it retrieves passages, how it respects document permissions, how often it re-indexes, what happens when we change embedding model, and how answers cite sources. Keep each question to one sentence.
You get: A checklist that exposes weak retrieval before you sign