← AI glossary

AI glossary · Basic · Language models

Semantic search

Semantic search is a search method that finds results by measuring how close the meaning of a query is to the meaning of a document, rather than checking whether the words in the query appear in the document as written.

About this term
Level
Basic · Technical terms you often meet in AI news
Added
2026-10-07
In plain words If you ask a librarian for "a calm novel that's good to read on a rainy day," the librarian picks books that match the mood, not books with the word "rain" in the title. Semantic search also looks at meaning when it searches. However, it does not understand the situation deeply the way a person does; it calculates a "degree of similarity in meaning" learned from its training data.

How it works

First, sentences or documents are converted into a set of numbers (a vector) called an "embedding." An embedding is a kind of coordinate designed so that texts with similar meanings sit close to each other. When a user enters a query, the query is converted into coordinates the same way, and the documents closest to those coordinates are found. This "finding the closest points" is called nearest neighbor search, and when there are many documents, a vector DB is often used alongside it to handle this quickly.

How search by meaning flows"My laptop battery drains fast" → Embedding model; Documents → Embedding model; Embedding model → Find the closest documents(Query vector); Embedding model → Document vector(Document vector); Document vector → Find the closest documents; Find the closest documents → "How to reduce power consumption""My laptop batterydrains fast"DocumentsEmbedding modelFind the closestdocumentsNearest neighborsearchDocument vectorStored in advance in avector DB"How to reducepower consumption"Different words, closemeaningQuery vectorDocument vector
How search by meaning flows The query and documents are converted into coordinates (vectors) with the same embedding model, and then the documents closest to the query coordinates are found. The document side is done in advance (dashed line).

How it developed

Earlier search was based mainly on "lexical search," such as TF-IDF or BM25, which counts how often and how distinctively the query words appear in a document. In 2019, the Sentence-BERT paper (Reimers and Gurevych) presented a way to modify the language model BERT so that each sentence is turned into an embedding that can be compared. The paper reported that it cut the task of finding the most similar pair among 10,000 sentences from about 65 hours with the original BERT to about 5 seconds while maintaining accuracy. Then in 2020, the Dense Passage Retrieval paper (Karpukhin et al.) trained two encoders that turn questions and passages into separate embeddings, and showed that embeddings alone could find relevant passages better than BM25-based search. These developments made "searching by meaning" a practical technology.

Why it matters

People often search using wording different from what is written in documents. For example, if someone searches "my laptop battery drains fast" but the document says "how to reduce power consumption," a search that only looks for matching words can easily miss it. Semantic search bridges these differences in wording and matches the intent. It is used especially as a core component of RAG, where relevant material is retrieved before an LLM answers.

Things to keep in mind

While it is good at finding texts with similar meanings, it can be weaker for searches where the characters must match exactly, such as product numbers or proper nouns. That is why real services often use hybrid search, which combines lexical search like BM25 with semantic search, and sometimes re-sort the results with a reranker. Result quality depends heavily on which embedding model is used and how documents are split into pieces (chunking). The term "semantic search" is also sometimes used for search that uses structured knowledge such as ontologies or knowledge graphs, so its meaning can vary slightly with context.

Example

An internal document assistant chatbot is a typical example. When an employee asks, "How much can I spend on lodging for a business trip?", the chatbot uses semantic search to find a policy document that matches in meaning even though the wording differs, such as "Domestic and international business travel expense standards," and then the LLM builds an answer based on its contents. The same principle is used in shopping sites that find suitable products from descriptive queries such as "cool work pants for summer."

Related terms

References