Why embeddings matter for business search
Embeddings turn text into vectors so search matches meaning, not keywords. Pair them with keyword search and a reranker, and test models on your own queries.
Embeddings turn text into vectors so search matches meaning, not keywords. Pair them with keyword search and a reranker, and test models on your own queries.
In-house generative search answers staff questions from your documents with citations, using RAG. How it works and how it differs from AI answer engines.
Use classic RAG when the evidence sits in one place; add an agent loop when it is spread across documents or needs tools. Most systems route between the two.
A recurring report. A slow review. A prototype that needs to work in the real world.
Embeddings turn a passage of text (or an image, or a clip of audio) into a fixed-length list of numbers so a system can match by meaning rather than keywords. Passages that mean similar things land close together in that space, so a search for "loud music next door" finds records filed as "noise complaint" even though they don't share a single word. It's the retrieval layer sitting underneath semantic search, recommendations, clustering and retrieval-augmented generation (RAG).
Most teams start by arguing over which embedding model tops the leaderboard. In practice, picking a model in November 2026 matters far less than the engineering around it: how you chunk documents, pairing vectors with keyword search and a reranker, enforcing permissions at query time, and knowing where your text actually goes.
Key takeaways
An embedding model reads a passage and outputs a vector with a fixed number of dimensions: 1,536 by default for OpenAI's text-embedding-3-small and 3,072 for text-embedding-3-large. No single dimension means anything you can name. What matters is the geometry: the model was trained so related passages end up near each other and unrelated ones far apart.
To search, you embed every chunk of your documents once and store the vectors. At query time you embed the question and look for the stored vectors closest to it. The usual measure of closeness is cosine similarity, the angle between two vectors:
# Cosine similarity ranges from -1 to 1:# 1 = same direction, 0 = unrelated, -1 = opposite direction.# In practice, text embeddings rarely score below 0. from numpy import dotfrom numpy.linalg import norm def cosine_similarity(a, b): return dot(a, b) / (norm(a) * norm(b)) # Illustrative scores, not from a specific model:# "How do I return an item?" vs "What's your refund policy?" -> high, around 0.8# "How do I return an item?" vs "What's the weather today?" -> low, around 0.1Scores are only comparable within one model; a "good" score for one model can be a poor one for another. Set any threshold by testing on your own data.
Embedding is cheap. OpenAI lists text-embedding-3-small at about $0.02 and text-embedding-3-large at about $0.13 per million tokens (check the current pricing page). Some models also let you shorten the vector (OpenAI's dimensions setting is one example), which cuts storage and search time for a small dip in accuracy.
Keyword search matches words, and people don't use the same words for the same thing. In a council case archive built up over years, officers will have logged the same kind of incident as "anti-social behaviour", "ASB", "nuisance" or "noise complaint", depending on who filed it and when. A keyword search for one term misses the others, and synonym lists and Boolean queries only patch the cases someone thought to add. An embedding search places all of them near each other, so one query finds the lot.
The reverse holds too. Embeddings are weak on exact matches: case references, postcodes, product codes, rare surnames and legislation numbers. A vector search for "HA-2024-0613" returns things that look like case references rather than that case. Keyword search nails those every time, which is why most production search combines the two.
Hybrid search runs a keyword search (usually BM25) and a vector search over the same documents and merges the two result lists, often with reciprocal rank fusion. Each side catches what the other misses: keywords handle identifiers and exact phrases, vectors handle paraphrase and concept.
A reranker then re-scores the merged shortlist. Where an embedding model encodes the query and each passage separately, a reranker reads them together, much more accurate, and far too slow to run over a whole index. So you retrieve fifty to a hundred candidates cheaply and rerank them down to the handful the model will actually read.
The gains are measurable. Anthropic tested this stack across several datasets and reported that, against plain embeddings, prepending a short line of document context to each chunk cut failed top-20 retrievals by 35%; adding BM25 took that to 49%; adding a reranker took it to 67%. Your numbers will differ, but the direction is consistent enough to make hybrid search with reranking the default for business documents.
Model comparison, November 2026
Start from your constraints (where data can go, which languages and media you hold, your volume), shortlist two or three models that fit, then measure them on your own queries.
General-purpose retrieval and a quick start
Search-focused retrieval with a matching reranker
Specialist terminology in legal, finance and code
Teams on Google Cloud, and mixed media
Strict data control and very high volumes
Public benchmarks such as the MTEB leaderboard are handy for building a shortlist, including open-weight models you can host yourself. They're a poor way to make the final call, because your documents, vocabulary and questions aren't theirs. Here's the test that actually decides:
| Option | When to use | Trade-offs |
|---|---|---|
| General hosted model | General business text, quick start, data can be processed by the provider | Per-token cost (small); data leaves your infrastructure; generic handling of specialist terms |
| Domain model | Legal, financial or code-heavy content where general models miss distinctions | Another model to evaluate; only worth it if recall on your test set improves |
| Open-weight, self-hosted | Data must stay on your infrastructure, or volumes are very high | You run the hosting, scaling and upgrades |
General models are trained on broad text, so specialist vocabulary can trip them up: "consideration" in contract law, a "positive" test result in medicine, "short" in trading, or the acronyms and product names only your organisation uses. Voyage offers domain models for law, finance and code; fine-tuning an open-weight model on your own corpus is the other route.
Whether either helps is an empirical question with a cheap answer: run your test set through a general model and a domain model and compare recall. More often than not, hybrid search fixes terminology problems on its own because the keyword half catches the exact terms.
Retrieval quality depends as much on what you embed as on the model you embed it with.
For storage, if you already run PostgreSQL, the pgvector extension is usually plenty to start and keeps vectors right next to the metadata and permissions you need to filter on. Dedicated vector databases (Qdrant, Weaviate, Milvus, Pinecone and others) earn their place when volume, filtering complexity or latency outgrow it.
Vectors from different models live in different spaces, so changing models means re-embedding the whole corpus. That can apply even inside one provider: Google's gemini-embedding-2 and gemini-embedding-001 spaces aren't compatible. The API bill is usually the small part:
| text-embedding-3-small | text-embedding-3-large | |
|---|---|---|
| Corpus | 1 million chunks of about 1,000 tokens | 1 million chunks of about 1,000 tokens |
| Tokens to embed | About 1 billion | About 1 billion |
| API cost at list price | About $20 | About $130 |
| Vector size per chunk | 1,536 dimensions | 3,072 dimensions |
List prices per million tokens as published by OpenAI on 11 November 2026. Storage, indexing time and re-running your test set are the larger costs.
The real costs are the re-indexing run, storage for a second index while you compare, and the evaluation to prove the new model is actually better. Build the pipeline so re-embedding is a routine job rather than a migration project.
A hosted embedding API receives the full text of everything you index and every query. For public sector and regulated work, check where that processing happens before you commit. Some providers offer regional processing (OpenAI offers it in Europe on approval, and Google offers gemini-embedding-001 in its London region on Google Cloud), though options vary by model and shift often. Where text can't leave your environment, an open-weight model on your own infrastructure is the straightforward answer.
Treat the vectors themselves as sensitive too. Research has shown that the original text can be largely reconstructed from its embedding (Morris et al., 2023), so an index of embedded case notes deserves the same protection as the case notes themselves.
Embedding implementation checklist
Start with the test set: fifty real queries and the documents that answer them. Build structure-aware chunking with headings and permissions attached, then hybrid search with a reranker, using a general hosted model that meets your residency needs. Measure recall@10.
Only then try alternatives: a second general model, a domain model, contextual chunk headers, different chunk sizes. Change one thing at a time and keep what the numbers support. Most of the gains we see come from chunking, hybrid search and reranking rather than the choice of embedding model.
The Company Twin indexes your live systems with permission-filtered search, so every AI tool your team uses draws from current records and each person sees only what they're allowed to. See how the Company Twin handles retrieval →
Further reading