Keyword search finds matching words. Semantic search finds matching meanings.

Clear example

Stored document:

Employees may work remotely during severe weather.

User search:

Can I work from home during heavy rain?

Keyword search may struggle because the exact words are different.

Semantic search uses embeddings and can understand that:

Comparison

Keyword search Semantic search
Matches words and phrases Matches meaning
Good for exact IDs and names Good for natural-language questions
Fast and easy to explain Understands synonyms and related concepts
May miss different wording May retrieve conceptually related but incorrect results

When keyword search is better

Use keyword search for:

Embeddings may treat similar IDs as related even though only one exact ID is correct.

When semantic search is better

Use semantic search for:

Hybrid search

Production systems often combine both:

Final results =
keyword matches + semantic matches + metadata filters

Example query:

Find documents related to "payment failed"
AND product = "mobile app"
AND version = "4.2"

Reranking

A search system may retrieve several possible results and then use another scoring step to reorder them.

Retrieve candidates โ†’ rerank by relevance โ†’ send best chunks to LLM

You only need reranking when basic retrieval quality is not good enough.

Common mistakes

Use keyword search for exactness, semantic search for meaning, and hybrid search when you need both.