Search systems find relevant documents in two fundamentally different ways.
Keyword Search
Matches the words in the query against words in documents, typically ranking with algorithms such as BM25, which weigh how often a term appears and how rare it is overall.
Strengths: exact names, product codes, error messages, legal terms; predictable and explainable; fast and cheap. Weaknesses: misses synonyms and paraphrases — "can't sign in" won't match "login failure".
Semantic Search
Converts queries and documents to embeddings and finds those with the closest meaning.
Strengths: handles synonyms, paraphrases and natural-language questions; works across phrasing styles. Weaknesses: can miss exact identifiers and rare terms; results are harder to explain; needs an embedding model and index.
Hybrid Search
Run both and combine the results, for example with reciprocal rank fusion. Hybrid search usually outperforms either alone, especially in RAG systems where both exact terms and meaning matter.
Re-Ranking
A second-stage model (a cross-encoder or an LLM) can re-score the top candidates more precisely than either first-stage method.
Evaluate With Real Queries
Collect real search queries with the documents that should be found, and measure how often the right result appears in the top few. The best approach depends on your content and users.