AI Engineer Dojo Contents
Chapter 6

Search That Actually Finds It

There are two ways to search your documents, they fail on different questions, and the teams that get RAG right usually use both. You don't need the internals — you need to know why "just embeddings" leaves money on the table.

Semantic search (the "embeddings" or "vector" approach) matches on meaning: ask "how do I get my money back?" and it finds the refund policy even though it never says "money back." It's the reason modern search feels smart. But it has a blind spot: exact terms — error codes, product SKUs, ticket IDs, precise names. Ask for ERR-4021 and semantic search may return passages about other error codes, because it smears the exact string toward similar-looking ones.

Keyword search (the classic approach) is the opposite: great at exact matches, blind to paraphrase. The fix that mature teams reach for is hybrid — run both and combine the results — because the two methods miss different questions, so together they cover far more than either alone. If your team is "just embeddings," and your users search by any kind of code or ID, you're leaving a whole class of questions unanswered.

What good looks like The team knows semantic search misses exact identifiers, uses hybrid (semantic + keyword) when users search by codes/IDs/names, and can show the retrieval improvement it bought on those queries.
Red flags "Embeddings are strictly better, keyword search is legacy." Users search by error codes or SKUs and those queries fail. No awareness of the exact-match blind spot.
Decision Lab

The missing part numbers

Your catalog assistant nails "what fits a garden hose?" but whiffs on exact part numbers like M8-1.25, which is what pros actually type. An engineer says the embedding model just needs upgrading. Do you buy that?

How to think about it

No. This is the classic exact-term blind spot, and it's structural — a better embedding model still smears identifiers toward neighbors. The right move is to add keyword search and combine it with the semantic one, so exact part numbers match directly while conceptual questions still work. Ask the engineer: "for the part-number queries that fail, would keyword matching find them?" The answer is yes — and it's a smaller, cheaper change than chasing a new model that won't fix the actual problem.

Case study

A hardware supplier that couldn't find its own parts

An industrial-parts distributor built a semantic-only catalog assistant. On conceptual questions it was excellent, but its customers overwhelmingly search by exact part number — and there, recall was just 0.62: a query for M8-1.25-A2 returned similar-looking parts, driving wrong-part orders and returns that cost real money. Upgrading the embedding model, which the team tried first, barely moved the number.

Adding keyword search alongside the semantic one and combining the results lifted exact-identifier recall to 0.94, with no loss on conceptual questions — because the two methods covered each other's gaps. The wrong-part returns dropped accordingly. The lesson for the ops lead: match the search method to how customers actually query, and for anything with codes or IDs, that means hybrid.

Running case · Brightline

Brightline notices employees paste exact error codes and internal ticket IDs into the assistant, and semantic-only search keeps missing them. They add keyword search alongside the semantic index; the code-and-ID questions — a surprising share of real traffic — start landing.

Quiz · Chapter 6

  1. Semantic (embedding) search is great at meaning but weak at:
  2. Hybrid search works because:
  3. Users who search by error codes and a semantic-only system will:
  4. "Keyword search is legacy" is:
← Back Continue →

Chat With Your Docs · AI Engineer Dojo · aiengineerdojo.com