Semantic search finds documents by what they mean rather than which words they contain. Ask “how do I get my money back?” and it can surface a page titled “Refund policy”, even though the two share no keywords. It is the dense-vector branch of information retrieval, and the most common retrieval step in retrieval-augmented generation.
How it works
An embedding model turns each document, or each chunk of a long document, into an embedding: a vector positioned so that texts with similar meanings land close together. Those vectors are stored, usually in a vector database. At query time the query is embedded with the same model, and the system returns the documents whose vectors are nearest, typically by cosine similarity. Approximate nearest-neighbour indexes keep this fast across millions of vectors.
The embedding model does the real work. Sentence-BERT made this practical by training a BERT network to produce sentence vectors that can be compared directly with cosine similarity. That cut finding the most similar pair among 10,000 sentences from about 65 hours with BERT to about 5 seconds. Dense Passage Retrieval then showed that learned dense retrieval could beat the BM25 keyword baseline on open-domain question answering.
The catch
Meaning-matching has blind spots. The same DPR paper notes that keyword methods are better with highly selective terms, and embeddings can blur exact identifiers like product codes, error numbers or rare names. Semantic similarity also isn’t relevance: a passage can be on the right topic and still not answer the question. That’s why production systems often run semantic and keyword search together (“hybrid search”) and re-rank the combined results.