Semantic Search Explained: Meaning-Based Search vs Keyword Search
Semantic search finds results based on meaning rather than exact words, using embeddings to match a query's intent with similar concepts in a document even when the vocabulary is completely different. Unlike keyword search, it can surface a passage about "termination of employment" when someone searches for "getting fired," and it generally works across languages too. It is not magic, though: it can miss exact codes, SKUs or legal citations that plain keyword search would catch instantly. The strongest systems combine both approaches instead of picking one.
What Semantic Search Actually Does
Semantic search converts text into numerical vectors called embeddings, where pieces of text with similar meaning end up close together in a high-dimensional space, regardless of the exact words used. A search engine then compares the embedding of your query to the embeddings of every indexed chunk of text and ranks results by how close they are, usually with cosine similarity. If you want the mechanics in more detail, Embeddings Explained for Non-Specialists walks through how text becomes numbers, and What Is a Vector Database? covers how those vectors get stored and searched at scale.
The practical effect is that semantic search understands paraphrase, synonyms and related concepts without anyone having to maintain a synonym dictionary. A support search for "cancel my plan" can match a document titled "Ending Your Subscription" even though the two phrases share no words at all.
Semantic Search vs Keyword Search
Keyword search (often implemented with an algorithm called BM25) matches literal terms and their common variants, weighting rare words more heavily than common ones. It is fast, cheap, exact and very good at finding specific identifiers. Semantic search trades some of that precision for flexibility: it tolerates different phrasing but can struggle with exact strings.
Semantic search vs keyword search
| Aspect | Keyword search (BM25 / full-text) | Semantic search (embeddings) |
|---|---|---|
| Matching logic | Exact terms and stems | Vector similarity by meaning |
| Handles paraphrase/synonyms | Poorly, unless manually mapped | Well, out of the box |
| Handles exact codes, SKUs, citations | Very well | Often poorly |
| Works across languages | No, unless translated first | Often yes, with a multilingual embedding model |
| Explainability of a match | Easy to show which words matched | Harder to explain why two texts are "close" |
| Typical failure mode | Misses a rephrased question | Returns a plausible but wrong document |
How Query Expansion Powers Semantic Search
Query expansion is the step where a search system adds related terms, synonyms or rephrasings to your original query before matching it against the index. In a pure keyword system, this might mean expanding "car" to also search "automobile" and "vehicle" using a thesaurus. In a semantic system, the embedding itself already captures a lot of that relatedness, but many production systems still add an explicit expansion step: generating a few alternate phrasings of the query, or pulling in related keywords, before running retrieval. This is part of why hybrid systems that combine full-text matching with semantic keyword expansion tend to outperform either method alone. See Hybrid Search: Why BM25 + Vectors Beats Either Alone for RAG for a deeper comparison of the two retrieval families.
Dense Retrieval vs Sparse Retrieval
Practitioners often call keyword search "sparse retrieval" (because most words in a vocabulary are absent from any given document, producing a sparse representation) and embedding search "dense retrieval" (because every dimension of the vector carries some signal). Query expansion applies to both: you can expand the keyword side with synonyms, and you can expand the semantic side by generating several query variants and averaging or pooling their embeddings before searching.
Multilingual Semantic Search
A well-trained multilingual embedding model maps sentences with the same meaning into nearby vectors regardless of the source language. That means a French query like "resiliation du contrat" can retrieve an English document about "contract termination" without any translation step, because both phrases land close together in vector space. This is genuinely useful for global support teams, multinational compliance documents, or a knowledge base serving customers in several markets from a single set of source files.
The caveat is domain vocabulary. General-purpose multilingual models handle everyday language well but can lose precision on specialized jargon, brand names or technical acronyms that barely appear in their training data. If your documents are full of internal codenames or regulatory shorthand, test multilingual queries specifically rather than assuming cross-language matching will just work.
When Semantic Search Fails
Semantic search has predictable blind spots. Knowing them helps you decide when to fall back on exact matching or add a verification step.
- Exact identifiers: part numbers, invoice numbers, case citations, error codes. A vector for "ERR-4471" is not meaningfully closer to the right document than to a random nearby code.
- Negation: "not approved for pediatric use" can score as similar to "approved for pediatric use" because the surrounding words dominate the embedding.
- Numbers and dates: thresholds like "under 50 employees" or "before January 1, 2027" are often treated as just more words, not as comparable quantities.
- Rare acronyms and brand-new terminology: anything coined after the embedding model was trained, or specific to a narrow industry, may not have a meaningful vector representation.
- Very short, ambiguous queries: a two-word query like "return policy" has little context to anchor the embedding, so results can vary more than expected.
- Adversarial or oddly phrased queries: typos are usually fine, but unusual word order or heavy abbreviation can shift the embedding further than you'd expect.
The fix is usually hybrid, not "better embeddings"
Most of these failures are solved more reliably by combining semantic search with keyword matching and re-ranking than by swapping in a bigger embedding model. An exact-match boost for strings that look like codes, dates or citations catches the cases embeddings miss.
Hybrid Search: Why You Usually Need Both
In practice, production-grade retrieval rarely relies on semantic search alone. A hybrid pipeline runs a keyword search and a semantic search in parallel, merges the candidate results, and re-ranks them, often giving a strong boost to exact matches on anything that looks like a code, number or proper noun. This gets you the recall benefits of embeddings (catching paraphrase and cross-language queries) without losing the precision of keyword search on identifiers and rare terms. If you're building or evaluating a retrieval-augmented generation (RAG) system, this is also directly relevant: see What Is RAG (Retrieval-Augmented Generation)? A Practical Guide for how retrieval feeds into generated answers, and How to Evaluate a RAG System for metrics that catch exactly these retrieval blind spots before they show up as wrong answers.
How you split documents before indexing also affects semantic search quality. Chunks that are too short lose context; chunks that are too long dilute the embedding with unrelated content. Chunking Strategies for RAG covers fixed-size, semantic and structure-aware splitting if you're setting this up yourself.
Building Semantic Search Without Managing Infrastructure
Running your own semantic search stack means choosing an embedding model, a vector store, a keyword index, a re-ranker, and gluing them together, then maintaining all of it as documents change. For many teams that is more infrastructure than the problem justifies. Kopik runs hybrid search (full-text plus semantic keyword expansion) automatically on every knowledge base: upload PDF, Word, text or Markdown files to a base at /dashboard/bases/new, and the extraction, chunking and indexing happen for you. You can browse existing public knowledge bases in the catalogue, or query your own through the website, a REST API, or an MCP server for clients like Claude, Cursor or ChatGPT, details are in the developer docs.
See hybrid semantic search in action
Create a free knowledge base, upload a few documents, and compare how keyword and semantic matching handle the same question.
A Quick Mental Model
If you remember one thing, make it this: keyword search answers "does this text contain these words," and semantic search answers "is this text about the same thing as this query." Neither question is strictly better, they are just different, and most real search problems need both answers at once. For a broader map of related terms like embeddings, chunking and retrieval, the AI and LLM Glossary for Professionals is a useful reference.
Frequently asked questions
Is semantic search the same thing as RAG?
No. Semantic search is a retrieval technique, one way of finding relevant passages. RAG (retrieval-augmented generation) is a broader pattern that uses retrieval, often semantic plus keyword search, to feed relevant passages into a language model that generates a grounded answer with citations.
Does semantic search replace keyword search entirely?
Rarely in production systems. Keyword search still wins on exact identifiers, codes and rare terms, so most reliable systems run both and merge or re-rank the results rather than relying on embeddings alone.
Can semantic search handle typos?
Usually yes, better than strict keyword matching, because embeddings are somewhat robust to small spelling variations. Severe typos or unusual abbreviations can still shift the embedding enough to hurt results, so a fuzzy keyword fallback is still worth having.
How do I know if my semantic search is actually accurate?
Test with a representative set of real user questions and check whether the retrieved passages actually support the expected answer, not just whether they look topically related. Retrieval metrics like precision, recall and faithfulness are covered in How to Evaluate a RAG System.
Does semantic search work well across different languages?
With a multilingual embedding model, yes, queries in one language can retrieve documents written in another because similar meanings land near each other in vector space. Accuracy drops for highly technical or niche vocabulary that the model saw rarely during training.
What is query expansion in semantic search?
Query expansion adds related terms or alternate phrasings to a search query before matching, either through a synonym list (keyword search) or by generating related query variants (semantic search), to improve the chance of matching relevant text that uses different wording.
Get the Kopik newsletter
New knowledge bases, RAG guides and product news. One email every week or two, unsubscribe in one click.
By subscribing you agree to receive our newsletter. We never share your address.