Meriem B.
·Retrieval·5 min

From keyword search to agentic AI

A compact map of how retrieval moved from exact keyword matching to agents that decide what to search, inspect, and verify.

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 computer

Same idea. Different words. A basic keyword system may miss it.

Keyword search treats words like symbols.

document contains the word -> match
document does not contain the word -> no match

This 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 tries to search by meaning.

Instead of comparing raw words, it turns text into vectors.

coffee
espresso
cappuccino

Those 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 meaning

RAG

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 answer

For 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 ordering

Agentic retrieval

Traditional RAG is a fixed pipeline.

question -> retrieve -> answer

Agentic retrieval is more like a loop.

understand goal
-> search
-> inspect results
-> notice missing context
-> search again
-> call tools
-> verify
-> answer

This 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:

  1. Search internal pricing.
  2. Search competitor pricing.
  3. Compare feature tiers.
  4. Notice missing data.
  5. Search again.
  6. Use a spreadsheet or calculator.
  7. 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 answering

The 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.