Search used to be mostly about exact words.
Type:
cheap laptop
and the system looks for documents containing cheap and laptop.
That is still useful. It is fast, predictable, and great for names, IDs, error codes, function names, and exact phrases.
The weak spot is obvious:
cheap laptop
affordable notebook computerSame idea. Different words. A basic keyword system may miss it.
Keyword search
Keyword search treats words like symbols.
document contains the word -> match
document does not contain the word -> no matchThis is why old search systems can feel weirdly literal. They can find exact text, but they do not really know that cheap and affordable are close.
Still, keyword search is not dead. It is often the right layer for:
- IDs
- names
- logs
- code symbols
- exact product terms
- legal or policy wording
The useful framing is simple: exact matching is limited, not useless.
Semantic search
Semantic search tries to search by meaning.
Instead of comparing raw words, it turns text into vectors.
coffee
espresso
cappuccinoThose should land close together because the meaning is close.
So a query like:
best coffee machine
can still find:
espresso maker
even if the exact phrase is different.
That is the big shift:
keyword search = same words
semantic search = similar meaningRAG
Then LLMs made retrieval feel more important again.
LLMs can write fluent answers, but they do not automatically know private docs, fresh product changes, internal policies, or company-specific data.
RAG is the basic pattern:
question
-> retrieve relevant context
-> give context to the model
-> generate answerFor example:
What is our refund policy?
The system searches the docs, finds the relevant policy, and sends that context to the model.
RAG is less about making the model smarter and more about giving it the right evidence at the right time.
Better RAG
Basic RAG is usually not enough for production.
The first retrieved chunks are often not the best chunks. Queries are messy. Documents are duplicated. Users use words that do not match the docs.
Common fixes:
- Reranking: retrieve a broad set, then reorder by relevance.
- Query expansion: search related versions of the same question.
- Hybrid retrieval: combine keyword and semantic search.
- Metadata filters: narrow by version, customer, region, product, or permissions.
Hybrid retrieval is usually the most practical baseline.
keyword search -> exact things
semantic search -> meaning
reranker -> final orderingAgentic retrieval
Traditional RAG is a fixed pipeline.
question -> retrieve -> answerAgentic retrieval is more like a loop.
understand goal
-> search
-> inspect results
-> notice missing context
-> search again
-> call tools
-> verify
-> answerThis matters when the task is not a simple lookup.
Example:
Compare our current pricing with competitors and suggest changes.
A fixed RAG pipeline might search once and answer too early.
An agent can:
- Search internal pricing.
- Search competitor pricing.
- Compare feature tiers.
- Notice missing data.
- Search again.
- Use a spreadsheet or calculator.
- Produce a recommendation.
The important difference is not that the answer sounds better.
The difference is that the system can decide what information is missing.
The map
Keyword search
= exact words
Semantic search
= similar meaning
RAG
= retrieve context before answering
Better RAG
= rerank, expand, filter, combine retrieval methods
Agentic AI
= decide what to search and verify before answeringThe hard part has moved.
Generating text is not the main bottleneck anymore. The harder question is usually:
What evidence should the system collect before it says anything?
That is why retrieval, memory, tools, and agents end up in the same conversation.