DEV Community

Cover image for The Same Answer to Different Questions Is the Wrong-Answer Check
AheadKit
AheadKit

Posted on

The Same Answer to Different Questions Is the Wrong-Answer Check

The check that works is the one that needs no gold answer. That sounds backwards, and it is the whole point of this piece, so let me say it plainly before the numbers. If your check for wrong answers needs to know the right answer first, it is not a check. It is a grading rule wearing a check's clothes. It will flag every wrong answer you already know is wrong and catch nothing you did not already know. The useful check is the one that spots trouble using only the answers themselves. I built three versions of that check over my own saved agent runs, and only one of them earns its keep.

ayush_singh321 asked the question that started this, under his own piece about a simulation that exaggerated a safety feature's cost. His point was about the machinery next to the feature, and the parallel runs one level deeper: in his case the words match but the relationship is wrong, in mine the topic matches but the question is wrong, and both pass any check that only asks whether the right words are present. A useful check has to compare the answer with the question, not just with the source. Then he added the detail that made the run possible. He grades answers by hand, 45 of them, and most of the partly correct ones were on the right topic but incomplete, usually a missing part of a two-part question. salparvez added the other half in the same thread: when the same answer comes back for two different questions, look at what the two inputs had in common. The loud number in his estimating meetings keeps showing up in the bid on line items it has nothing to do with, and a check on steps passes it every time.

The material is my own recorded runs. Forty-two saved files, 452 jobs, 400 recorded answers. Two kinds of job. Triage jobs, where the agent reads a list of issues and has to name the right one and label it. Web jobs, where it has to answer a question from a small set of pages. Against the known right answers, 285 of the 400 are right and 115 are wrong. The wrong ones are the test set. A check that cannot find them is decoration.

The first version counts answered parts. Split each question into its parts and count how many the answer actually addresses. A triage answer has two parts, the issue and the label. A web question has one or two facts. It flags 115 of 115 wrong answers and 0 of 285 right ones. Perfect scores, both of them, and both of them worthless as detection. The flag is the grading rule itself, restated. Of course it agrees with the grading rule. What it adds is not detection but a taxonomy of how the answers fail, and that part is worth keeping. Across 192 missed parts, 178 are unmentioned constraints and 14 are missing steps. In triage every single miss, 169 of 169, is an unmentioned constraint: the answer is internally consistent for a different issue's question. It found the right shape of answer for the wrong issue. Seventy-seven wrong triage answers address neither part, fifteen address one of two, and the fifteen split neatly. Nine got the label right and the issue wrong, all of them answering 412 with the label "bug" when the gold was a different issue that also happened to be a bug. Six got the issue right and the label wrong, all of them the same task, t05, answering 377 as "bug" when the gold label was "good first issue". The model found the right issue six times and mislabelled it six times. On the web side the misses are concrete enough to quote. Five times the answer gave the Solo plan's $8 for a question about the Team plan. Four times it answered "dockside cache clear" for a question about the --no-cache flag. Thirteen times it answered half of a two-part question and stopped. So the parts count is a good autopsy and a bad alarm. Keep it for the autopsy.

The second version never got to run. It was ayush's re-search idea: when an answer says something is not stated, search again for just that part before accepting it, and grade the claim as a retrieval miss or a conclusion miss. I scanned all 400 answers for 41 wordings of that claim, "not stated", "not mentioned", "could not find", all of them. Zero hits. Not one answer hedges. The model always asserts a value, even when the value is wrong. There was nothing to re-search, so there is no retrieval-miss versus conclusion-miss split for this material. I also checked whether a real-web re-search would even make sense here, and it does not. The fixture facts collide with real products, a real Noteleaf app at version 1.9, a real Planforge at 45 euros a user, neither of which knows anything about the fixture's numbers. The arm needs a set of runs where models hedge, and saved result text to check what they were actually shown. Mine has neither. That is a limit of the material, not of the idea, and it stays a limit until the next set of runs.

The third version is the one that works, and it is salparvez's: group identical answers across different questions. No gold needed. Just the answers, grouped. The loud answer in this material is issue 412, the crash-on-launch report, answered with the label "bug" 101 times across 9 tasks. Twenty-two of those are right, the task where 412 is the gold. Seventy-nine are wrong. A second answer repeats too, issue 408 with "bug", seven times across two tasks, all wrong. On the web side the bare value "12" shows up four times across two questions, three right and one wrong. Grouping identical answers flags 87 of the 115 wrong answers, 75.7 percent, at a false-positive rate of 8.8 percent, 25 of the 285 right answers flagged. Precision is 77 percent. The false positives are structural and worth naming rather than hiding. Twenty-two of them are the correct 412 answers on the one task where 412 is the gold, and three are correct bare "12" answers that collide with a wrong one. The task where the fixated answer happens to be right will always be flagged by this check. That is the price, and it is a fixed price, not a growing one.

What explains the same answer is in the inputs, and the diff is short. No issue appears in all twelve triage lists, so it is not universal presence. Issue 412 appears in eight of the twelve, always with the identical title, the identical first three hundred characters of body, and the label "bug", sitting in position zero to three of the list, first only on the task where it is gold. It is the only crash-on-launch report in the material. When 412 is absent the model sometimes falls back to 408, the only other bug-labelled crash-ish issue, but not deterministically. Two tasks that contain 408 were answered right twenty out of twenty and nineteen out of nineteen. And the answer is not driven by what was read. Nineteen of the 101 fixation runs opened the gold issue first and still answered 412. The model looked at the right issue, then answered with the loud one anyway.

So the verdict, stated the way ayush asked for it. The parts count catches the mismatches but only because it restates the grading rule, which makes it a diagnostic, not a detector. The re-search arm is untestable on runs where the model never hedges. The same-answer grouping catches three quarters of the wrong answers with no gold at all, at a false-positive rate under nine percent, and its blind spots are exactly the unique wrong answers: the six t05 mislabels and most of the web half-answers, which never repeat and so never group. If you run one check next to your loop check, run this one. A loop check watches the calls. This one watches what the helper concludes, and that is where the same answer keeps showing up for different questions.


The full numbers behind this one are in the MCP server token cost guide and the Cost and Context Survival Kit. Everything I write here stays free, that part doesn't change. — Salam

More from AheadKit: programming books, packs and AI tools. Each page lists exactly what's inside before you pay.

Top comments (0)