What is semantic search and how does it differ from keyword search?
Semantic search matches the meaning of a query, often with vector embeddings. Keyword search matches its words. Hybrid search runs both and merges the results.
In short. Semantic search is search that matches the meaning of a query with the meaning of each document. Most systems turn the query and each document into vector embeddings and return the documents whose vectors are closest. Keyword search matches the exact terms. Google, Bing and many retrieval systems for AI answers use both, because exact terms such as product codes still need a keyword match.
On this page 11 sections
The evidence
Google says its synonym system finds relevant documents that do not contain the exact words of a query, and that keyword matches are still the most basic relevance signal.1
1Google SearchGoogle, How Search works: ranking results. Checked Nov 20, 2026.Google introduced neural matching in 2018 to match representations of concepts in queries and pages, and says it is a critical part of how Google retrieves documents.8
8GoogleGoogle, Feb 3, 2022.In 2019, Microsoft said Bing had turned more than 150 billion pieces of indexed data into vectors and used vector search to find results by concept.11
11Microsoft SourceMicrosoft, May 15, 2019.In Anthropic's tests, combining contextual embeddings with contextual BM25 keyword retrieval cut the top-20 retrieval failure rate by 49%, from 5.7% to 2.9%. Contextual embeddings alone cut it by 35%.6
6AnthropicAnthropic, Sep 19, 2024. Tests across codebases, fiction, arXiv papers and science papers.Google says sites do not need to write long-tail keyword variations for its generative AI features, because AI systems understand synonyms and general meaning.13
13Google Search CentralGoogle Search Central, guide revised Jul 10, 2026.Google tells site owners that a page does not need every long-tail keyword variation, because its AI systems understand synonyms and general meaning. Exact product codes, model numbers and names still belong on the page, because keyword matching finds them.
Semantic search is search that matches the meaning of a query with the meaning of a document. Keyword search, also called lexical search, matches the words. Google gives an example in its page on how it ranks results: a search for "change laptop brightness" should find a manufacturer's page that says "adjust laptop brightness". Google's synonym system finds such documents even when they do not contain the exact words of the query.1
#Keyword search
Exact words on a page still count in web search. A keyword search engine keeps an inverted index, which lists the documents that contain each word. At query time, it looks up the words of the query and ranks the documents that contain them.
BM25 is a common ranking function for keyword search. Anthropic's post on Contextual Retrieval describes it as an extension of TF-IDF, which measures how important a word is to a document in a collection. BM25 also accounts for document length and limits the weight of a word that repeats many times.6
Google calls keyword matching the most basic signal of relevance: content that contains the same keywords as the search query, for example in headings or body text.1
#Semantic search with embeddings
Semantic search lets a page match questions phrased in words the page never uses. Most semantic search systems use vector embeddings. An embedding model turns a piece of text into a list of numbers called a vector. Texts with similar meanings get vectors that sit close together. OpenAI's embeddings guide lists search, clustering, recommendations and classification as uses. Its text-embedding-3-small model returns a vector of 1,536 numbers by default.3
A semantic search runs in two stages:
- Before any query arrives, the system embeds each document or passage and stores the vectors.
- At query time, it embeds the query with the same model and returns the stored vectors closest to it.
Closeness is usually measured by cosine similarity, the angle between two vectors. OpenAI recommends cosine similarity for its embeddings.3 What are vector embeddings? covers dimensions, similarity measures and vector databases in more detail.
Bing used this method for web search, as it described in a 2018 post on deep learning for query semantics. Each query becomes a query vector and each web page a document vector. A model scores the match between the query and a page's title, URL and text with a distance metric such as cosine similarity.2
#Semantic search vs keyword search
The two methods fail in different ways. Keyword search misses a relevant page that uses other words. Semantic search can miss an exact string. Anthropic gives the example of a support query for "Error code TS-999": an embedding model can return pages about error codes in general and miss the page about TS-999, which BM25 finds by its exact text.6
The BEIR benchmark tested 10 retrieval systems on 18 datasets. BM25 held up well as a baseline across those datasets. Dense retrieval models, which search by embeddings, were more efficient to run than re-ranking models. But they often did worse on data they were not trained for.7
| | Keyword (lexical) search | Semantic (vector) search |
|---|---|---|
| What it matches | The words of the query | The meaning of the query |
| Index | Inverted index of words | Vector index of embeddings |
| Common scoring | BM25 | Cosine similarity between vectors |
| Finds pages that use other words | Only through synonym expansion | Yes |
| Exact codes, names and dates | Precise | Can miss them |
#Hybrid search
Hybrid search favors a page that explains a topic in plain words and also states its exact terms. It runs a keyword query and a vector query at the same time and merges the results. Microsoft's documentation of hybrid search in Azure AI Search describes one request that runs full-text search and vector search in parallel. The full-text side ranks with BM25. Microsoft says queries over product codes, specialized jargon, dates and people's names perform better with keyword search, because it identifies exact matches.4
The two result lists score on different scales, so the system merges them by rank. Azure AI Search uses Reciprocal Rank Fusion (RRF). Microsoft's page on RRF scoring gives each document a score of 1/(rank + k) in each list, with k set to a small constant such as 60. The scores from each list are added, so a document near the top of both lists ranks highest.5
Anthropic describes the same pattern for retrieval-augmented generation. Documents are split into chunks of a few hundred tokens. The top chunks are retrieved with BM25 and with embeddings, and rank fusion combines the two lists. In Anthropic's tests, contextual embeddings alone cut the top-20 retrieval failure rate by 35%, from 5.7% to 3.7%. Combining them with contextual BM25 cut it by 49%, to 2.9%.6
#Semantic search in Google Search
Google has matched meaning in Search since at least 2015, so advice to write for synonyms predates Google's AI features. Google documents several systems that match meaning. Google's post on how AI powers its search results, published February 3, 2022, describes three of them:8
- RankBrain launched in 2015 as Google's first deep learning system in Search. It relates the words of a query to concepts and helps rank results.
- Neural matching arrived in 2018. It looks at an entire query or page and matches representations of the concepts in each. Google calls it a critical part of how it retrieves relevant documents.
- BERT launched in 2019. It reads how combinations of words express meaning. Google said in 2022 that BERT plays a critical role in almost every English query, in both ranking and retrieval.
Google's guide to its ranking systems, last updated December 10, 2025, still lists RankBrain, neural matching and BERT. It also lists passage ranking, a system that identifies individual sections of a page to judge how relevant the page is to a search.9 Google announced passage ranking on October 15, 2020, in its Search On post, and said it would improve 7% of search queries across all languages.10
Google does not say whether these systems compare stored vectors, as a vector database does. Its descriptions speak of concepts and representations.
#Semantic search in Bing
Meaning-based retrieval in Bing matters for AI answers, because Microsoft Copilot sends its web queries to Bing. Microsoft has said more about vectors in Bing than Google has about its own systems. In May 2019, it open-sourced SPTAG, the vector search algorithm used in Bing. Microsoft's announcement of SPTAG said Bing had turned more than 150 billion pieces of indexed data into vectors, including words, page snippets and full queries. Microsoft gave the example of the query "How tall is the tower in Paris?", which Bing can answer with the height of the Eiffel Tower although the query does not contain "Eiffel".11
In November 2019, Microsoft's post on Bing's largest improvement in search experience said Bing had used large Transformer models since April 2019 and applied them to every Bing query worldwide.12 How retrieval-augmented generation works describes how Copilot uses those results.
#Semantic search in AI answers
In Google's AI answers, both keyword relevance and meaning feed retrieval, because Google retrieves with its core ranking systems. AI search products retrieve documents before they write an answer, a method called retrieval-augmented generation. Semantic search is one way to run that retrieval step. The paper Dense Passage Retrieval for Open-Domain Question Answering showed in 2020 that a retriever using only embeddings outperformed a Lucene BM25 system by 9 to 19 percentage points in top-20 passage retrieval accuracy.14
Google says its generative AI features retrieve pages with its core Search ranking systems, from its Search index. Google's guide to generative AI features in Search, revised July 10, 2026, calls this retrieval-augmented generation, or grounding.13 Google's own descriptions of those ranking systems cover both keyword relevance and the meaning-based systems above.19 The same guide describes query fan-out, in which the model runs several related searches for one question.
#Writing pages for semantic search
Google's guide makes two statements about how to write for its generative AI features:13
- A page does not need every long-tail keyword variation. The guide says AI systems understand synonyms and general meaning and can connect a search with content that does not use the same words.
- A page does not need to be split into small chunks. The guide says Google's systems understand several topics on one page and show the relevant part.
Two more points follow from the documentation above. First, write exact strings such as product codes, model numbers and names in the page text. Systems that combine keyword and vector search match those strings through the keyword side, so the page can be found by them.4 Second, give each section one specific question to answer. Google's passage ranking judges individual sections of a page, so one strong section can make the whole page relevant to that question.9 No search engine has published a test of either point.
A page must be crawlable and indexed before any of these systems can retrieve it. How Google AI Overviews and AI Mode select sources covers the requirements for Google's AI features. To see whether your robots.txt blocks AI search crawlers, run it through the AI crawler checker.
Read next
AI search
What is retrieval-augmented generation (RAG)?
RAG retrieves documents at query time and gives them to a language model to write a cited answer. How ChatGPT, Claude, Google, Bing and Perplexity use it.
AI search
What is query fan-out?
Query fan-out turns one question into several related searches and builds one answer from the results. Google says AI Overviews and AI Mode may use it.
Platforms
How Google AI Overviews and AI Mode select sources
AI Overview sources are pages from Google's Search index. AI Overviews began rolling out in the US on May 14, 2024, after testing as SGE in Search Labs.
Questions
What is the difference between semantic search and keyword search?
Keyword search returns documents that contain the words of the query and ranks them with a formula such as BM25. Semantic search compares the meaning of the query with the meaning of each document, usually by comparing vector embeddings. Semantic search can find a page that uses other words; keyword search is more precise for exact terms.
Is Google a semantic search engine?
Google documents several systems that match meaning: RankBrain, neural matching, BERT and a synonym system. It also says that a page containing the query's keywords is the most basic signal of relevance. Google Search uses both kinds of matching.
Do I need to add keyword variations for semantic search?
Google says no for its generative AI features. Its guide says AI systems understand synonyms and general meaning, so a page does not need every variation of a query. Exact strings such as product codes and names are still matched by keyword search in hybrid systems.
What is hybrid search?
Hybrid search runs a keyword query and a vector query at the same time and merges the two ranked lists into one, often with Reciprocal Rank Fusion. Microsoft documents this for Azure AI Search, and Anthropic describes the same pattern for retrieval in RAG systems.
Notes
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
About this page
Researched and reviewed by Promptly Found. Reviewed Nov 20, 2026. Next review due Feb 2027.
Cite this page
Promptly Found. (2026, November 20). What is semantic search and how does it differ from keyword search? https://promptlyfound.com/ai-search/semantic-search
Revisions 1
- First published.