When people talk about how modern search and AI answer tools find information, three terms keep appearing: keyword search, vector search and hybrid search. They are often presented as rivals, with vector search described as the future and keyword search as the past. In practice they solve different problems, and many real systems use both together. Knowing the difference helps you judge claims about “semantic” tools, understand why exact wording still matters, and explain to clients why good content has to work for both kinds of retrieval.
This guide defines each approach, explains how they work in plain terms, compares them side by side and shows you how to run a small, fair test on your own computer using free, open-source tools. We are careful throughout to separate general information retrieval from what any specific search engine does, because the details of commercial systems are not public.
Key takeaways
- Keyword (lexical) search matches the words in a query to the words in documents. It is precise for exact terms, names, codes and phrases, and weak when people use different words for the same idea.
- Vector (semantic) search compares the meaning of a query and a passage using embeddings. It handles paraphrases well and can be weak on exact identifiers and rare terms.
- Hybrid search combines both and usually outperforms either alone on mixed query types, which is why it is common in production systems.
- None of these is a ranking factor for you to target. They are retrieval methods. The writing habit that serves all three is clear, specific, well-named content.
- You can test the differences yourself with a 20-minute script, a small set of passages and a set of realistic questions.
How to read the evidence in this guide
Keyword scoring such as BM25, vector retrieval with embeddings and rank fusion are established technical concepts in information retrieval. Google has publicly said it uses language-understanding systems such as BERT in Search, which is official documentation, but it has not published how its ranking blends lexical and semantic signals. Any statement about the exact mix inside a named product is a hypothesis unless the vendor documents it.
What Are Keyword, Vector and Hybrid Search?
Keyword (lexical) search
Keyword search finds documents that contain the words in the query. Underneath, most implementations build an inverted index, which lists for every word the documents where it appears, and then score matches with a formula that rewards rare words and penalises overly long documents. A widely used scoring function is BM25. (Established concept.)
Strengths: fast, transparent, excellent for exact matches such as product codes, error messages, names and quoted phrases. Weakness: it does not know that “car” and “automobile” mean the same thing unless something like a synonym list is added.
Vector (semantic) search
Vector search converts the query and each passage into embeddings, which are lists of numbers capturing meaning, and returns the passages whose vectors are closest to the query’s. (Established concept.)
Strengths: matches meaning across different wording, handles natural-language questions and works across paraphrases and sometimes languages. Weaknesses: it can miss exact identifiers, may rank loosely related passages highly and is harder to explain, because “the vectors were close” is not an easy reason to inspect.
Hybrid search
Hybrid search runs both methods and merges the results. One common merging technique is reciprocal rank fusion, which gives each document a score based on its position in each ranked list and adds them up. Another is a weighted blend of normalised scores. (Established concept.)
The idea is that keyword search catches what vectors miss and vectors catch what keywords miss, so the combination is more robust than either alone.
Why SEO professionals should care
- It explains why exact terminology still matters even in a world of semantic matching. Names, model numbers, legal terms and specific phrases are best matched lexically.
- It explains why clear, natural-language explanations also matter. Questions asked in full sentences benefit from semantic matching.
- It helps you evaluate tools. A vendor claiming “semantic search” should be able to say whether it uses vectors, keywords or both, and how results are merged.
How They Work, Side by Side
| Feature | Keyword search | Vector search | Hybrid search |
|---|---|---|---|
| Matches on | Words and phrases | Meaning | Both |
| Core technique | Inverted index with scoring such as BM25 | Embeddings with nearest-neighbour search | Both, with rank fusion or score blending |
| Handles synonyms and paraphrase | Poorly without extra work | Well | Well |
| Handles exact codes and rare names | Very well | Inconsistently | Well |
| Explainability | High: you can see matched terms | Lower | Medium |
| Cost and complexity | Low | Needs a model and vector index | Highest |
| Typical failure | Misses relevant text with different wording | Returns plausible but wrong passages | Needs tuning to balance the two |
A closer look at rank fusion
Suppose a passage is ranked first by keyword search and fourth by vector search. Reciprocal rank fusion gives it a score of 1 divided by a constant plus its rank in each list, and sums the two. A passage that appears near the top of both lists rises. A passage that appears in only one list can still surface but is less likely to take first place. The constant (60 is a common default) controls how much the top positions dominate. You do not need to memorise this; you need to know that hybrid merging exists and that the weighting is a design choice.
Where does Google sit?
Google has said publicly that it uses neural language models to understand queries and content, including BERT, which it announced for Search in 2019. (Official: Google’s BERT announcement.) It has not described a simple lexical-versus-vector split, and it uses many other signals. So “Google uses hybrid search” is a loose shorthand at best. For content planning, the safe conclusion is that both exact wording and clear meaning matter.
A Real-World Example
This example is illustrative. The passages and queries are invented to show behaviour. They are not results from any search engine or client.
Imagine a small help centre with these passages:
- “Error E-4021 appears when the API key is missing from the request header.”
- “To change who can see your reports, edit the sharing settings for each workspace.”
- “Invoices are emailed on the first working day of each month.”
Now consider three user questions and a plausible outcome for each method. These outcomes are what we would expect in principle; run the test below to see real behaviour with your own data.
| Question | Likely best method | Why |
|---|---|---|
| What does E-4021 mean? | Keyword | The exact code appears in passage 1. A vector model may not treat a rare code as meaningful. |
| How do I stop my colleagues seeing my dashboards? | Vector | “Colleagues” and “dashboards” do not appear in passage 2, but the meaning is close to sharing settings for reports. |
| When will I get billed? | Vector or hybrid | The question says “billed” and the passage says “invoices are emailed”. Related, but few shared words. |
The lesson is that neither method wins every time, and the combination is a safer default than either alone. For content owners, it also shows why a page should use the exact names of things (the error code, the product, the setting) while explaining them in natural language.
Implementation Steps: Run Your Own Comparison
This experiment uses only free, open-source tools and runs on a laptop. It teaches you how the approaches differ on your kind of content.
- Set up Python. Install Python 3.9 or later and create a virtual environment.
- Install the libraries.
pip install rank-bm25 sentence-transformers numpy. The first run downloads a small embedding model. Check current documentation for versions and licences. - Create a passage set. Take 15 to 30 passages from your own site, each a self-contained section. Number them.
- Write test questions. Create 20 or more realistic questions and note which passage should answer each. Use real wording from Search Console queries and customer emails, and include three kinds: exact-term questions (names, codes), paraphrased questions and natural-language questions.
- Run the script. It ranks passages three ways and reports how often the correct passage appears in the top three.
- Review failures. For every miss, look at why. Was the wording different? Was the passage vague?
- Record the results by question type, not only overall.
import numpy as np
from rank_bm25 import BM25Okapi
from sentence_transformers import SentenceTransformer
docs = [
'Error E-4021 appears when the API key is missing from the request header.',
'To change who can see your reports, edit the sharing settings for each workspace.',
'Invoices are emailed on the first working day of each month.',
]
# (question, index of the passage that should answer it)
tests = [
('What does E-4021 mean?', 0),
('How do I stop my colleagues seeing my dashboards?', 1),
('When will I get billed?', 2),
]
bm25 = BM25Okapi([d.lower().split() for d in docs])
model = SentenceTransformer('all-MiniLM-L6-v2')
doc_vecs = model.encode(docs, normalize_embeddings=True)
def rank_keyword(q):
return list(np.argsort(-bm25.get_scores(q.lower().split())))
def rank_vector(q):
qv = model.encode([q], normalize_embeddings=True)[0]
return list(np.argsort(-(doc_vecs @ qv)))
def rank_hybrid(q, k=60):
fused = {}
for ranking in (rank_keyword(q), rank_vector(q)):
for pos, d in enumerate(ranking):
fused[d] = fused.get(d, 0) + 1 / (k + pos + 1)
return sorted(fused, key=fused.get, reverse=True)
for name, fn in [('keyword', rank_keyword), ('vector', rank_vector), ('hybrid', rank_hybrid)]:
hits = sum(1 for q, correct in tests if correct in fn(q)[:3])
print(name, hits, 'of', len(tests), 'in top 3')
With only three passages every method will find everything in the top three, so use a realistic number of passages (at least 15) or compare the top one instead of the top three. Treat the script as a scaffold to extend, and note that simple whitespace splitting in the keyword step ignores punctuation and stemming, which a production system would handle.
Free Tools
| Tool | Use | Limits and checks |
|---|---|---|
| Python with rank-bm25 and sentence-transformers | Run keyword, vector and hybrid retrieval locally | Needs basic command-line skills; downloads a model on first run; check licences and versions |
| Google Sheets | Store passages, questions, expected answers and results | Manual; needs a consistent protocol |
| Google Search Console | Source realistic questions from queries your pages already earn | Not every query is shown; export data before it ages out |
| Open-source search engines with hybrid features | Try hybrid retrieval at larger scale | Setup and hosting require technical skill; check each project’s documentation and costs |
| Hosted embedding services | Alternative to local models | May require an account and payment. Do not assume free access, and do not send confidential content without checking terms. |
Limitations
- Your test is not Google. It uses a small model and a tiny corpus. It illustrates the behaviour of the methods, not the behaviour of any commercial search engine.
- Small samples mislead. Twenty questions give a rough picture. Do not report percentages as if they were precise.
- Results depend on the model and the tokeniser. A different embedding model or a stemmed keyword index can change the ranking.
- The test reflects your writing. If your passages are vague, every method will struggle. That is itself a finding.
- Hybrid is not automatically better. It needs tuning, and a badly weighted blend can be worse than either alone.
- Relevance judgments are subjective. A passage marked “wrong” may be perfectly acceptable. Decide your criteria in advance.
A Measurable Experiment
Hypothesis (unverified): On a set of questions that includes exact-term and paraphrased queries, hybrid retrieval will place the correct passage in the top three more often than either keyword or vector retrieval alone, and rewriting vague passages will improve all three.
- Dataset. Use 20 to 30 passages and at least 30 questions: roughly ten exact-term, ten paraphrased and ten natural-language.
- Baseline. Run keyword, vector and hybrid retrieval and record the number of questions where the correct passage is in the top three, and the average rank of the correct passage.
- Segment the results by question type. This is where the differences appear.
- Intervention. Rewrite the five passages that were missed most often so each names its subject, gives a direct answer and includes the exact terms people use. Change nothing else.
- Re-run with the same questions and the same settings.
- Compare before and after, per method and per question type.
Metrics: top-three hit rate and mean reciprocal rank (the average of 1 divided by the rank of the correct passage) per method and question type. Guardrails: read the rewrites to check they remain accurate and natural. Confounders and limits: you may unconsciously write the rewrite to fit the questions, the sample is small and a single model is not representative of production systems. A result favouring hybrid would support using both exact terminology and clear natural explanations. It would not prove how any search engine works.
A Worked Reciprocal Rank Fusion Calculation
Seeing the arithmetic once removes the mystery. Use the common constant of 60, and imagine two passages, A and B, ranked by two retrieval methods.
| Passage | Keyword rank | Vector rank | Calculation | Fused score |
|---|---|---|---|---|
| A | 1 | 4 | 1/(60+1) + 1/(60+4) = 0.01639 + 0.01563 | 0.03202 |
| B | 2 | 1 | 1/(60+2) + 1/(60+1) = 0.01613 + 0.01639 | 0.03252 |
Passage B wins even though A was first in the keyword list, because B performs consistently well in both. This is the intuition behind hybrid search: agreement between methods is rewarded. The constant and the weighting between methods are design choices, so two hybrid systems can behave differently.
Which Approach Fits Which Content?
The right mix depends on what people search for on your site. The table is a planning aid based on general retrieval behaviour, not a finding about any search engine.
| Content type | Typical queries | Retrieval that helps most | Writing implication |
|---|---|---|---|
| Technical documentation | Error codes, function names, settings | Keyword matching is essential | Use exact names and show them in text, not only in images |
| Advice and guides | How-to questions in everyday language | Semantic matching matters | Explain in natural language and state the answer directly |
| Product and service pages | Brand, model, feature and price questions | Both | Name the product precisely and describe the benefit plainly |
| Comparison content | X vs Y and best-for questions | Both | Use both options’ exact names and explain the decision criteria |
| Legal and regulatory content | Specific clauses, defined terms | Keyword matching is important | Keep defined terms consistent and explain them in plain words |
Practical Writing Rules That Serve All Three
- Use the precise term once, near the top of the relevant section. Names, codes and defined terms are matched lexically.
- Explain the term in plain language straight after. This gives semantic retrieval something to match when the user does not know the term.
- Keep terminology consistent. Calling the same thing three different names makes lexical matching unreliable and confuses readers.
- Put the answer in text. Facts that only appear in images, scripts or tables that render poorly may not be retrieved.
- Write sections that stand alone. Retrieval often works on passages, not whole pages.
- Do not stuff variants into the text. Listing synonyms unnaturally makes the writing worse and does not reliably help.
Questions to Ask When a Vendor Says “Semantic”
- Does the product use keyword retrieval, vector retrieval or both?
- How are the results merged, and can the weighting be changed?
- Which embedding model does it use, and can it be changed?
- How does it handle exact identifiers, product codes and names?
- How was it evaluated, on what data and with what measures?
- Can I see why a result was returned?
Clear answers to these questions are a good sign. Vague answers, or a single impressive-looking score with no method behind it, are a reason to ask for evidence before relying on the tool.
A Worked Reciprocal Rank Fusion Calculation
Seeing the arithmetic once removes the mystery. Use the common constant of 60, and imagine two passages, A and B, ranked by two retrieval methods.
| Passage | Keyword rank | Vector rank | Calculation | Fused score |
|---|---|---|---|---|
| A | 1 | 4 | 1/(60+1) + 1/(60+4) = 0.01639 + 0.01563 | 0.03202 |
| B | 2 | 1 | 1/(60+2) + 1/(60+1) = 0.01613 + 0.01639 | 0.03252 |
Passage B wins even though A was first in the keyword list, because B performs consistently well in both. This is the intuition behind hybrid search: agreement between methods is rewarded. The constant and the weighting between methods are design choices, so two hybrid systems can behave differently.
Which Approach Fits Which Content?
The right mix depends on what people search for on your site. The table is a planning aid based on general retrieval behaviour, not a finding about any search engine.
| Content type | Typical queries | Retrieval that helps most | Writing implication |
|---|---|---|---|
| Technical documentation | Error codes, function names, settings | Keyword matching is essential | Use exact names and show them in text, not only in images |
| Advice and guides | How-to questions in everyday language | Semantic matching matters | Explain in natural language and state the answer directly |
| Product and service pages | Brand, model, feature and price questions | Both | Name the product precisely and describe the benefit plainly |
| Comparison content | X vs Y and best-for questions | Both | Use both options’ exact names and explain the decision criteria |
| Legal and regulatory content | Specific clauses, defined terms | Keyword matching is important | Keep defined terms consistent and explain them in plain words |
Practical Writing Rules That Serve All Three
- Use the precise term once, near the top of the relevant section. Names, codes and defined terms are matched lexically.
- Explain the term in plain language straight after. This gives semantic retrieval something to match when the user does not know the term.
- Keep terminology consistent. Calling the same thing three different names makes lexical matching unreliable and confuses readers.
- Put the answer in text. Facts that only appear in images, scripts or tables that render poorly may not be retrieved.
- Write sections that stand alone. Retrieval often works on passages, not whole pages.
- Do not stuff variants into the text. Listing synonyms unnaturally makes the writing worse and does not reliably help.
Questions to Ask When a Vendor Says “Semantic”
- Does the product use keyword retrieval, vector retrieval or both?
- How are the results merged, and can the weighting be changed?
- Which embedding model does it use, and can it be changed?
- How does it handle exact identifiers, product codes and names?
- How was it evaluated, on what data and with what measures?
- Can I see why a result was returned?
Clear answers to these questions are a good sign. Vague answers, or a single impressive-looking score with no method behind it, are a reason to ask for evidence before relying on the tool.
What Google Says About Keywords and Long-Tail Variations
Google’s guide to generative AI features says its systems understand synonyms and general meanings, so you do not need to worry that you have not captured every variation of how someone might search. That fits the semantic half of hybrid retrieval. It does not mean exact terms stop mattering: names, product codes and defined terms are still best matched literally, which is why the writing advice here is to use the precise term and explain it plainly. (Source: Google’s guide.)
Common Mistakes
- Treating vector search as a replacement for keywords. Exact terms, identifiers and names still matter.
- Writing only in jargon or only in plain language. Use the precise term and explain it. That serves both retrieval styles and readers.
- Believing a vendor’s “semantic” claim without asking how it works. Ask whether it uses vectors, keywords or both, and how results are merged.
- Over-trusting a single test. Run more questions and report the variation.
- Optimising copy to match a model. The aim is clarity for people. Models change, readers remain.
Frequently Asked Questions
Is keyword search obsolete?
No. It remains essential for exact matches and is a core part of many hybrid systems.
Does Google use vector search?
Google has said it uses neural language models to understand queries and content, but it has not published a description of how lexical and semantic signals are combined. We avoid claiming specifics.
What is BM25?
BM25 is a widely used scoring function for keyword search. It ranks documents by how often query terms appear, giving more weight to rare terms and adjusting for document length.
What is reciprocal rank fusion?
It is a simple way to merge several ranked lists. Each document earns a score based on its position in each list, and the scores are added.
Should I rewrite content for semantic search?
Write for the reader first: precise terms, clear explanations and direct answers. That works for keyword, vector and hybrid retrieval.
Do I need a vector database?
Not for small experiments. At scale, a vector index helps find nearest neighbours quickly.
Sources and Further Reading
- Robertson and Zaragoza, “The Probabilistic Relevance Framework: BM25 and Beyond” (2009), Foundations and Trends in Information Retrieval
- Cormack, Clarke and Buettcher, “Reciprocal Rank Fusion outperforms Condorcet and individual rank learning methods” (2009), SIGIR
- Google, announcement of BERT in Search (2019)
- Google Search Central: AI features and your website
Related reading
- Embeddings and vectors explained
- What is RAG? A guide for SEO professionals
- What is passage ranking?
Next Step
If you want your site reviewed for exact-term coverage and clear natural-language answers, request a free SEO audit. We will show you where your content depends on a single style of matching and how to make it more robust.



