Retrieval: chunking, embeddings and hybrid keyword search

Without retrieval, a model asked about facts it has never seen can only guess plausibly, which is how made-up answers happen. RAG has two halves that fail separately: retrieval, did the right note reach the prompt, and generation, did the model answer from it. Measure them separately or you will not know which to fix.

In Daveth Pro (AI Engineering)

What this page answers

Why does RAG fail?

Either retrieval failed and the right passage never reached the prompt, or generation failed and the model did not answer from it. Measure the two separately. Read it in “Why retrieve at all”

What is BM25?

A classic keyword search score: rank each document by the question's words it contains, weighting rare words more. Read it in “Finding the right note”

Why retrieve at all

The handbook for this track is 12 short notes I wrote for a made-up company: expense rules, office hours, holiday policy, who approves flights. The questions are the kind staff ask: “Which room is the IT desk in?” No model has seen these facts, so without retrieval the best a model can do is guess plausibly, which is exactly how made-up answers happen (Track E, lesson E2).

RAG has two halves that fail separately: retrieval (did the right note make it into the prompt?) and generation (given the right note, did the model answer from it?). Measure them separately or you won't know which to fix.