CaseAdvancedQuality, Cost & Token Economics / Eval design for product teams / #10

How would you eval a retrieval system separately from the generation on top of it?

Score retrieval and generation apart, or every wrong answer looks like the model's fault, even on the day it never got the page at all.

The direct answer
Score retrieval and generation with two separate scorecards, never one blended number: retrieval gets recall at five against a golden set of questions mapped to the correct document, and generation gets graded by handing it that document directly and checking only the answer. When a real question comes back wrong, run the one test that tells you which stage broke: force the correct document into generation and see if the answer turns right. If it does, retrieval failed; if it's still wrong, generation failed.
Do this, in order
  1. Build two separate scorecards for retrieval and generation, never one blended number.Why: a blended score can sit almost still while one whole slice of it caves in underneath, which is exactly what happened here.
  2. Score retrieval alone with a golden set, question mapped to the correct document, recall at five.Why: this is the only way to know whether the right page even comes back, before generation ever gets a turn.
  3. Score generation alone by handing it the correct document directly and grading just the answer.Why: this is the only way to know the model can actually use a document once it has one, apart from whether retrieval ever hands it one.
  4. On any real wrong answer, run the force fed test before touching the prompt.Why: retuning the generation prompt on a retrieval bug burns real time and fixes nothing, which is exactly what happened here.
  5. Recut both scores by document category, not just company wide.Why: one category can collapse while the blended number barely moves, the same way a thirty percent average drop is often one segment falling ninety percent.
  6. Run a small, cheap recheck on both scores every time the documents or the index change.Why: it catches a stage specific collapse within a day, for a fraction of the cost of a full audit run less often.

How to answer this, stage by stage

Nobody is grading whether you can define recall and precision. They are grading whether you can tell two different bugs apart without guessing.

1
Scope it to one real product before answering in the abstract
Say it like this
"Let's ground this in one tool. Fernbank is a Slack bot at Aleutia Systems. Employees ask it things like 'what's the torque spec for the X-42 mount,' and it pulls from about four thousand internal pages to answer. Reginald Cobham owns quality on it."
Why this works
An abstract "how do you eval RAG" answer turns into a vocabulary lecture fast. One product makes the two stage split a real decision instead.
2
Say your structure out loud before diving in
Say it like this
"I'm going to score retrieval and generation completely apart, then give you the one test that tells you which stage actually broke on any single wrong answer. That test is the part most teams skip, and skipping it is what costs them a week."
Why this works
Tells the interviewer you have a plan and a payoff, not just a definition to recite.
3
Reframe the question before answering it
Say it like this
"This isn't really asking me to define recall and precision. It's asking whether I know an answer can be wrong for two totally different reasons, and whether I can tell which one apart without guessing."
Why this works
Stops you from giving a metrics glossary instead of a diagnosis.
4
Give the one decision, plainly
Say it like this
"Score retrieval on its own with a golden set, question mapped to the right document, recall at five or ten. Score generation on its own by handing it the correct document directly and grading only the answer. And when a real question comes back wrong, force the correct document in and rerun generation. Right answer means retrieval broke. Still wrong means generation broke."
Why this works
This is the actual answer to the question, in one breath, with the tie breaker included.
5
Prove it with the failure, cut to four sentences
Say it like this
"Here's what happens without this. Fernbank's blended accuracy barely moved after a wiki move, so the team guessed the model was hallucinating and spent a week tightening the prompt. The real bug was that the move silently dropped one whole document category from the index, so the right page was never even in the running. The prompt fix changed nothing, because there was nothing wrong with generation."
Why this works
Shows the real cost of skipping the split, not just the mechanism behind it.
6
Say what you would measure going forward
Say it like this
"I'd track recall at five per document category, not company wide, plus a simple matching check on generation, does the answer actually contain something from the page it was handed. And I'd run both, on a small set, every time the documents or the index change."
Why this works
Shows you're thinking past this one incident, into the thing that catches the next one early.
7
Say what you'd leave alone
Say it like this
"I wouldn't build this same rigor around the HR policy category. Those pages never moved in the migration, and a miss there means someone rereads a leave policy, not the wrong torque spec on real hardware. Spend the audit time where a miss actually costs something."
Why this works
Shows judgment instead of blanket caution applied everywhere at the same cost.
8
Close on the decision, not the story
Say it like this
"So: two scorecards, never one blended number, and one force fed test that tells you which stage actually broke."
Why this works
Ending on the rule, not the anecdote, is what makes this sound like a method you'd actually reuse.

Let's learn

Fernbank is a chat bot on the company Slack at Aleutia Systems. Employees type a question about an internal page, a spec sheet, a safety rule, a hardware manual, and it reads the wiki and answers instead of making them dig for it.

Before Fernbank, employees searched the wiki search box by hand, or messaged the docs team directly. When it worked, it took about eleven minutes on average. About one question in five never got answered at all, because the person asking gave up and just guessed.

Knowledge spark: what's a torque spec? A number that says how tight a bolt needs to be turned. Too loose and a part can shake itself free while it's running. Too tight and you can crack the part you're bolting down. It is not a number anyone should have to guess at.

Fernbank answers in under ten seconds. Checked every week against a three hundred question golden set, a real person's answer key held back and never used to train anything, it gets the right answer about ninety one percent of the time, company wide.

Knowledge spark: what's recall at five? Out of every question in the golden set, how often the correct page actually shows up somewhere in the top five results the search returns. It says nothing about whether the model then used that page correctly. It only says whether the page was even in the room.

Then the company moved its wiki into a new system. The blended accuracy score barely moved, ninety one down to about eighty nine. Nine in ten questions were still landing fine. But one slice, questions about engineering hardware specs, torque values, clearance numbers, wiring limits, quietly fell from ninety percent right to forty three percent right, and the blended number never showed it, because that slice was a small share of the total questions Fernbank answered every day.

Weekly accuracy, company wide vs the engineering spec category, week 0 to week 8
100% 40% wk 2: wiki moves wk 6: index fixed Wk 0 Wk 4 Wk 8
Company wide accuracy, blendedEngineering spec category accuracy
The blended line barely moves, ninety one down to eighty eight and back. The engineering spec line falls from ninety to about forty two the week the wiki moved, and stays there for four weeks before the fix lands.

The team's first guess was the obvious one. The model must be making things up. That is a real failure mode, it has a real name, and a real fix, a stricter prompt, a lower temperature, a rule telling the model to only answer from the page in front of it. They spent a week on that fix. The engineering spec category did not move.

The model wasn't lying. It never got handed the page.

Reginald Cobham, who runs quality on Fernbank, split the numbers by stage instead of by guess. He built a small golden set of forty questions just for the engineering spec category, with the correct page marked next to each one, and checked whether that page even came back in the top five results. It did, only forty one percent of the time. Then he took the same failing questions and force fed the correct page straight into generation, skipping retrieval on purpose, and graded only the answer. It came back right eighty eight percent of the time, close to Fernbank's normal rate.

The evidence test: recall at five vs generation with the correct page forced in, engineering spec category
41% 88% 94% 89% During the incident After the index fix
Retrieval, recall at fiveGeneration, correct page forced in
During the incident, generation scores forty seven points higher than retrieval on the same failing questions. That gap is the proof: the page was the problem, not the model reading it.

The gap between those two numbers, forty seven points, is what proved it. If generation had also been near forty percent, the bug would have been in the model. Because generation stayed near normal, the bug had to be upstream of it. He checked the page loading job next and found it. Fifty eight of the two hundred forty engineering pages had a slightly different page format after the move, and the job that reads pages into Fernbank's search list quietly skipped anything it could not read, with no error, no warning, nothing.

The choice that mattered The page loading job was built to skip anything it could not read, silently, rather than fail loudly and stop the whole load. That was a fine choice when the wiki almost never changed shape. Nobody added a check comparing pages moved to pages actually added to the search list, because for two years those two numbers had always matched. The month they stopped matching, nothing told anyone.

At its worst, a chat bot that quietly hands out the wrong torque spec on real hardware is worse than no bot at all. The old way, asking a person, was slow, but it got the number right eventually. A confident wrong number from Fernbank looked exactly like a right one.

What I'd leave alone: the HR policy category. Those pages kept their old format through the move, so retrieval there was never at risk, and a wrong answer about leave days costs someone a reread, not a cracked part. Spending audit time re-checking retrieval there would take time away from the category where a miss actually costs something.

The lesson: a blended score can be completely honest and still hide the one slice where being wrong actually hurts someone. Ninety one percent right told the team Fernbank was fine. It never told them that the confident, hidden number was ninety one percent right on nine tenths of the questions and forty three percent right on the tenth that involved real hardware.

Now here is the same thing as a story

Read the long version below when you want to feel why the guess cost a week, not just be told which stage was actually broken.

Before Fernbank existed, Reginald Cobham was the person engineers pinged directly when they needed a spec fast. Six years at Aleutia Systems had put most of the wiki in his head. Ask him the torque value for a bracket on the X-42 mount and he could quote it back before you'd finished the question.

Fernbank launched and, for the first few months, that habit quietly ended. Engineers asked the bot instead of pinging Reginald, and it answered in seconds, correctly, almost every time. He didn't mind. That was the whole point of building it. He still ran the weekly golden set check out of habit, ninety, ninety one, ninety percent, week after week, and moved on.

The wiki move happened on a Tuesday in the second week of the quarter. Nobody announced it as risky. Pages got copied into a new system with a cleaner layout. The blended weekly score that Friday read eighty nine. A two point dip. Reginald noted it and moved on, same as always.

Nothing dramatic happened next. No single bad Tuesday. Just, over the following weeks, a few engineers mentioned in passing that Fernbank had given them a number that "felt off" on a hardware question, and they'd double checked it themselves and moved on, the way you do with something you mostly trust.

Then a technician on the assembly floor almost torqued a mount bolt to the number Fernbank gave him. A second engineer glanced at the screen before he turned the wrench and said the number looked wrong, it matched an older, retired version of the mount, not the current one. It was wrong. Fifteen minutes of checking would have caught it after the fact. The second glance caught it before.

Half the team wanted to retrain the model that afternoon, or at least tighten the prompt so it would hedge more on hardware questions. Reginald asked for one hour instead. He pulled the last three weeks of low confidence answers and split them by document category, not by guess.

The blended dashboard had barely moved. The engineering category, on its own, had fallen off a cliff three weeks earlier and nobody had been looking at it on its own.

He built a forty question golden set just for that category and checked recall at five: forty one percent. The right page was mostly not even coming back. Before touching anything else, he ran the one test that actually separates the two stages. He took the same forty questions, force fed the correct page straight into generation, and graded the answers by hand.

Eighty eight percent came back right. Close to Fernbank's normal rate. The model was fine. It had simply never been handed the page.

The decision that opened the door went back to the day the page loading job was first built. It was written to skip, quietly, any page it couldn't read cleanly, rather than stop the whole load and page someone at two in the morning over one bad file. That made sense back then; the wiki barely changed shape, and a hard stop for one odd page would have cost more sleep than it saved. Nobody ever added a check comparing how many pages got moved to how many actually made it into Fernbank's search list, because for two years those numbers always matched anyway.

Run the same Tuesday again with one change: a small, cheap recheck, fifty questions per document category, runs automatically the moment new pages get loaded in. The wiki move ships the same way. Within a day, the engineering category's recall at five reads forty something instead of ninety, the check fails, and the deploy gets flagged before a single technician ever sees a wrong torque number on a real bolt.

One design trusted a single company wide number to speak for every category underneath it. The other design asks each category the question its own stakes actually deserve.

What I'd tell myself, back on the day that loading job was first written: the moment a job is allowed to skip something silently instead of saying so out loud, ask what silently means a year from now, when the thing it's skipping might matter. Nobody asked. That's on the room, not on the bot.

TRACE, run backward from one wrong torque spec

Not five guesses in a row. TRACE rules candidates out on purpose, until one test actually separates the two stages left standing.

TTimeline. When exactly did it start, and what shipped right before that?
The wiki moved in week two. Nobody flagged the migration as something that could touch retrieval, so three weeks passed before anyone connected the date to the drop.
Name the date before naming a cause, or the whole diagnosis is a guess wearing a method's clothes.
RRecut. Split the number by whatever line divides the data.
Company wide, accuracy fell two points, ninety one to eighty nine. Split by document category, the engineering spec slice fell forty seven points, ninety to forty three, in the same week.
A two point average drop can be a forty seven point drop hiding behind a thousand questions that were never actually at risk.
AAssume nothing. Rule out the ruler before you blame the behavior.
First check: did the golden set's own answer key still point at the right document after the pages got renamed in the move. It did, so the drop was real, not a broken label on the scoreboard.
A relabeled document looks exactly like a missing one on a dashboard. Check the ruler before you trust the number it's giving you.
CCause candidates. Name the short list, not everything possible.
Three named suspects: the page never made it into the search list at all, the page made it in but scored too low to reach the top results, or the page came back fine and the model ignored it or blended it with something else.
Two of those are retrieval's fault and one is generation's. Naming them by owner is what makes the next step possible.
Hand sketched panel titled Fernbank torque spec question three suspects. Three boxes side by side. Doc never re indexed, marked as the confirmed cause. Doc scored too low, marked ruled out, still in the index. Model ignored the doc, marked ruled out as a generation side cause.
The page was gone from the search list before generation ever got a turn at it.
EEvidence test. The one check that tells the two stages apart.
Force the correct page into generation directly, skip retrieval on purpose, and grade only the answer. It came back right eighty eight percent of the time, close to normal. That clears generation and points straight at retrieval.
The cheapest, strongest check in the whole method, and the one most teams skip because a fix already feels obvious before they've actually run it.

Three things worth stating directly, since this is where the real judgment sits. The rejected alternative was retuning the generation prompt first, before running the split at all, stricter grounding language, a lower temperature, a rule to always hedge on hardware questions. It lost because it treats every wrong answer as a model problem by default, and it cost a full week with zero change in the one category that actually mattered. The AI specific failure worth naming by name is a silent index gap, a document that drops out of what the model can even find, with no error thrown anywhere to say so. The guardrail is two part: a check comparing pages moved to pages actually added to the search list on every load, and a small, cheap recheck, fifty questions per category, run on every deploy that touches documents or the search index. That guardrail isn't free. A full rebuild of the whole four thousand page search list costs about forty dollars in compute and twenty minutes end to end, so it only runs once a week. The fifty question recheck costs under a dollar and ninety seconds, so it runs on every single deploy, a real trade accepted on purpose, cheap and frequent over complete and slow. And the bar it enforces was never zero misses, a search system running thousands of questions a day can't promise that. It's a probability bar, checked against the golden set: the recheck fails and blocks the deploy when recall at five on any one category drops below eighty percent, not a promise that the top result is always right.

And if you want to be sure it really works, try it somewhere else

Same five letters, a different industry, and this time retrieval is innocent and generation is the actual bug.

Corvina is a tablet app field technicians use at Ridgemont HVAC. Mid repair, a technician asks it for a spec instead of flipping through a printed manual. Doru Vela runs quality on it.

A technician asked Corvina for the mounting bolt torque on a compressor, and it answered with a number that turned out to belong to a different, similarly numbered unit, the A250 line instead of the A400 line the job actually used. Doru recut the failing questions by product line and found it mostly happened when a job involved two units with near identical model numbers.

Retrieval looked healthy: recall at five for those exact questions checked out at ninety five percent, both manuals were coming back in the top five results almost every time. Doru ran the same evidence test anyway. Force the correct A400 page in as the only source, skip retrieval, grade the answer alone. It came back right only about forty percent of the time. The model kept quoting the A250 number even with the right page sitting right in front of it.

The decision Doru would take back Corvina's prompt handed the model all five retrieved chunks in one block, with no label saying which equipment line each chunk came from. When both manuals matched a similarly phrased question, the model had no way to keep them apart and quietly blended them into one answer.
Hand sketched panel titled Corvina torque spec question three suspects. Three boxes side by side. Model contradicted the doc, marked ruled out, the doc text matched. Model ignored the doc, marked ruled out, the doc was quoted. Model blended two docs, marked as the confirmed cause.
Retrieval did its job both times. The model just could not tell two manuals apart.

Same method, opposite result: label every retrieved chunk with its equipment line before it reaches the model, and when a question names one model by name, pass only that model's top chunk instead of all five blended together. Retrieval and generation can look identical from the outside, wrong answer, high recall, and still be broken in completely different places.

Swap the trigger and it still runs.
Speed: an interviewer caps you at ninety seconds. Skip straight to the one test, force the right document in and see if the answer turns correct, that single line answers the question on its own.
Cost: there's no budget this quarter for a full weekly rebuild of the whole search index. Run the cheap per category recheck instead, it catches the same collapse for a fraction of the price.
The model got better, for real: say the generation model itself gets upgraded to a newer version. That's not proof retrieval survived the swap unchanged. A new model can read the same chunks differently, so rerun the split before trusting the blended number again.

Where people run it wrong.
They read a healthy blended score as proof nothing anywhere is broken, and never check a single category on its own.
They fix a wrong answer by retuning the generation prompt, when the model never had the right document in front of it to begin with.
They treat "the page came back in the top five" as good enough, without checking whether the model actually used it once it arrived.

How to use it live. Say the two stage split out loud before guessing at a fix: "before I answer that, let me ask whether the right page even came back, or came back and got ignored, because those need two different fixes." That buys a beat to think instead of guessing which stage broke in front of the interviewer.

Flashcards (tap any card to flip it)

1 · THE FRAMEWORK
What framework is this, and what's its one job?
Tap to flip
ANSWER
TRACE: rule out, then narrow. Built for diagnosis questions, when something broke and you need to find exactly which stage did it.
2 · THE PERSON
Who is this answer about?
Tap to flip
ANSWER
Reginald Cobham, quality lead for Fernbank, the internal wiki chat bot at Aleutia Systems. Used to be the person engineers pinged directly for spec answers.
3 · THE HABIT
What did people stop doing because Fernbank worked?
Tap to flip
ANSWER
Engineers stopped pinging Reginald directly, and stopped double checking Fernbank's hardware spec answers against the real page themselves.
4 · THE TWO SUSPECTS
What two stage level suspects is this answer choosing between?
Tap to flip
ANSWER
A retrieval bug, the right page never comes back, versus a generation bug, the model has the page and still gets it wrong.
5 · THE OLD DECISION
What decision would you take back?
Tap to flip
ANSWER
Letting the page loading job skip any page it couldn't read, silently, with no check comparing pages moved to pages actually added to the search list.
6 · THE NUMBER
Fill in the blank: recall at five for the engineering spec category fell to ___ percent during the incident, while generation with the correct page forced in stayed at ___ percent.
Tap to flip
ANSWER
41 percent, then 88 percent. The forty seven point gap between those two numbers is what proved the bug sat in retrieval, not generation.
7 · THE REPLAY
Same bad week, new design, what changes?
Tap to flip
ANSWER
A fifty question recheck per category runs on every deploy that touches documents or the index. The engineering category's recall failure gets caught within a day, before a technician ever sees the wrong number on a real bolt.
8 · CROSS PRODUCT TRANSFER
Section 4 answers this same question again for a different product. Which product, and which stage turns out to be the bug this time?
Tap to flip
ANSWER
Corvina, a field technician tool at Ridgemont HVAC. This time retrieval is healthy and generation is the bug, the model blends steps from two different equipment manuals.

Check yourself Score: 0 / 0

Fill in the blank
1. During the incident, retrieval recall at five for the engineering spec category dropped to ___ percent, while generation accuracy with the correct page forced in stayed near ___ percent.
Show hint
Look at the two bars on the left side of the evidence test chart in Section 1.
Show answer
41 percent, then 88 percent. A forty seven point gap between the two stages, taken on the exact same failing questions.
True or false
2. True or false: because Fernbank's company wide blended accuracy barely moved after the wiki migration, that means retrieval was working fine everywhere.
  • True
  • False
Show hint
Check the two lines on the weekly accuracy chart in Section 1, not just the blended one.
Show answer
False. The blended line stayed between eighty eight and ninety one percent the whole time, while the engineering spec category, split out on its own, fell to about forty three percent for four weeks. A healthy average can sit on top of a badly broken slice.
Multiple choice
3. What is the one check that separates a retrieval bug from a generation bug on a specific wrong answer?
  • A. Rerun the same question through retrieval twice and see if the results change.
  • B. Force the correct document into generation directly, skipping retrieval, and check whether the answer turns right.
  • C. Lower the temperature and rerun generation until the answer looks more confident.
  • D. Ask the model to explain its own reasoning and grade the explanation.
Show hint
Think about what Reginald did right after building the forty question golden set for the engineering category.
Show answer
B. If the answer becomes correct once the right document is handed in directly, the bug was that retrieval never found it. If it's still wrong, the bug is in how generation used it.
Short answer, name the rejected alternative
4. What did the team try first after the near miss on the assembly floor, and why did it fail to fix anything?
Show hint
Look at what "half the team" wanted to do that afternoon, and what the framework recap says that move assumes by default.
Show answer
Model answer: Retuning the generation prompt to hedge more and ground itself more strictly on hardware questions. It failed because it assumed the model was the problem by default, and the real bug was that the correct page had already dropped out of the search list, so no amount of prompt tuning could hand the model something it never received.
Short answer, apply it yourself
5. Pick an AI product you use yourself that pulls from real documents to answer a question. Name one place its retrieval might be quietly failing without the generation step ever being at fault, and how you'd check.
Show hint
Think of a product where the answer sounds confident but the source it's supposedly drawing from is old, renamed, or was recently reorganized.
Show answer
Model answer: A recipe app's "substitute this ingredient" feature might quietly stop finding a niche allergy-safe substitution page after a site redesign renamed its recipe categories. I'd check by building a small golden set of substitution questions mapped to the exact page that should answer each one, and testing whether that page still comes back in the top results after the redesign, before ever blaming the substitution text itself.
Multiple choice
6. Corvina's retrieval recall at five stayed at ninety five percent even during its own incident, yet generation with the correct page forced in only scored about forty percent. What does that combination tell you?
  • A. The golden set for Corvina must be broken, since a healthy retrieval score should mean a healthy answer.
  • B. Retrieval is definitely the bug, because generation's score is the lowest number.
  • C. Retrieval is doing its job. The bug is in generation, most likely the model blending content from more than one retrieved source.
  • D. Both stages are equally healthy, so the wrong answers must be random noise.
Show hint
Remember what the evidence test actually isolates: generation's score here is measured with retrieval taken out of the picture entirely.
Show answer
C. A high recall score with a low forced-document generation score points straight at generation, since the correct page was handed in directly and the model still got it wrong, in this case by blending it with a similar manual.
Before you close the answer
Why this works
Tests whether you understand that a RAG answer can be wrong for two structurally different reasons, and whether you'd waste real time fixing the wrong one. Most candidates describe testing "the whole system end to end" and stop there.
Follow-up traps
"Isn't recall at five enough on its own, why do you need the generation only score too?" Response: recall alone can't catch a generation bug where the right page arrived and got ignored or blended with something else, that only shows up once the answer itself gets graded with the page forced in.

"What if retrieval and generation are both a little off at the same time?" Response: run the force fed test on the same set of failing questions either way. If both scores sit below their own bar, fix whichever one sits furthest below it first, they're not mutually exclusive, just rankable.
If pressed
The real production bar was never "the top result is always right." It was recall at five above ninety percent per category, checked weekly against the golden set, since a single top one miss on an oddly phrased question is normal, and demanding top one perfection would reject good retrieval systems against a bar no real system clears.
From U2xAI Academy

From answering questions to owning outcomes.

A live workshop where you ship a working AI agent, defend a launch decision, and walk away with a portfolio recruiters can't wave off, not just more questions to study.

  • A live AI agent you actually shipped
  • A launch decision you can defend under pressure
  • An interview-ready portfolio, not more flashcards
Know more