Flash Cards · Retrieval

Flash Card: Why Hybrid Search Finds ERR-4021

July 17, 2026 · 3 min read

Exam-style

A support assistant backed by a Bedrock Knowledge Base answers paraphrased questions well, but when an engineer pastes an error code such as ERR-4021 it returns unrelated troubleshooting pages. The reference page for that code is definitely in the corpus. What fixes it?

Reveal the answer

C. Set the Knowledge Base search type to HYBRID so keyword scoring runs alongside the vector search

Dense embeddings smear rare exact tokens together, so ERR-4021 and ERR-4012 end up neighbours and neither scores distinctly. Hybrid search runs sparse BM25 retrieval alongside the vector search and fuses the scores, and BM25 weights a rare literal token heavily, which is precisely what is missing. Reranking only reorders what the first stage already returned, so it cannot help when the right page never makes the candidate list, and a bigger embedding model has the same blind spot as the current one.

Generative AI Development · part of The Exam Room

Q. Semantic search keeps missing exact tokens like an error code. What retrieval change fixes it?

A. Hybrid search: run dense (vector) and sparse (BM25 keyword) retrieval together and fuse the scores. BM25 weights the rare exact token while the embedding still handles paraphrase. In Bedrock Knowledge Bases it is a HYBRID search type.

Why? Pure vector search smears rare exact tokens together; hybrid is the direct fix.

These posts are LLM-aided. Backbone, original writing, and structure by Craig. Research and editing by Craig + LLM. Proof-reading by Craig.