{"slug": "grade-your-llm-pass-fail-and-you-will-ship-a-disaster", "title": "Grade Your LLM Pass/Fail and You Will Ship a Disaster", "summary": "An engineer known as ramses203 detailed a severity-based grading system for LLM order-reading tests, arguing that counting correct answers is misleading and that a single irreversible error should block deployment. The approach assigns grades from FATAL to HARMLESS based on reversibility, and the engineer shared lessons from grading bugs, including the importance of saving model answers and writing results to disk incrementally.", "body_md": "I gave my LLM a 29-question order-reading exam. [Last time](https://dev.to/ramses203/a-good-llm-exam-is-90-traps-4faj) was how to build the exam. Today: grading.\n\nGrading gets its own post for a reason. **Build the grading wrong, and the score lies to you.**\n\nNo idea. **Because \"which 5\" is missing.**\n\nIf it missed 5 typo-riddled questions, ship it. But if one of those 5 was reading \"please cancel my order\" as a NEW order? Then even with everything else perfect, you can't ship. That program sends goods to a customer who just cancelled.\n\nSo don't grade by count. **Grade by severity.**\n\nMy grader has 4 grades. One criterion — **is it reversible?** In this program, the irreversible moment is when the wrong goods get loaded onto a truck.\n\n```\nFATAL     Wrong goods on the truck.  Cannot be undone\nRISKY     Confirmed something ambiguous without asking.  Right this time — fatal next time\nMISSED    Dropped an order.  The customer calls.  Fixable\nHARMLESS  Over-asked \"please confirm.\"  Just slower\n```\n\nOne principle falls out of this:\n\n**A wrong confirmation is worse than no confirmation.**\n\nSounds obvious. In production you'll be tempted to flip it. Someone complains \"it asks for confirmation too often,\" so you lower the confidence bar. The screen gets cleaner. And the accidents start happening off-screen.\n\n```\nFATAL 0 · MISSED 1        →  Ship it. Humans catch what it drops\nFATAL 1 · everything else perfect  →  Don't ship. You don't know when that 1 comes back\n```\n\nSame score. Opposite fates.\n\nThe grader is code I wrote. Like all code I write, it had bugs.\n\n**Accident one — zero points over formatting.** A model answer was perfect in content, but the JSON wrapper arrived with the tail cut off. The grader ruled \"broken format = fatal.\" **A 100-point answer, zeroed over one missing brace.**\n\nThe fix is simple: count the open brackets and close what's missing (ignoring brackets inside strings). The actual code is in parse_json in the [repo](https://github.com/ramses203/llm-test-harness).\n\n**Accident two — penalizing a good answer.** For \"250 boxes, 5 units\" the model answered:\n\nVerdict: needs confirmation\n\nLikely candidate: shipping box 250\n\nReason: if \"units\" means boxes it's 5 boxes; if sheets, 0.1 box — cannot confirm\n\nA considerate answer — asks for confirmation AND offers a hint. But my grader saw the candidate field filled in and ruled \"aha, you confirmed!\" Wrong answer. I fixed it to read the verdict field first.\n\nLesson: **when the grader is wrong, you end up \"fixing\" a healthy model. And every fix makes it worse.**\n\n**Save every model answer to a file. Never throw them away.** In this project, what kept changing wasn't the model's answers — it was the grading side. I fixed the answer key three times and the grader twice. Each fix means re-grading all 29 questions. With saved answers, re-grading takes seconds. Without them, one re-grade means calling the model 29 times again. It's the difference between re-marking stored answer sheets and calling every student back to retake the exam. I built this as a `--rescore`\n\nflag.\n\n**Write results to disk after every single case.** In another experiment I collected 5,578 items with a save-at-the-end design. The last request failed and took all 5,000 with it. Paid API — every lost item was money. Learned that one the hard way.\n\nWhen the results come in, the question is not \"how many did it get right?\"\n\nIt's **\"among the failures, is anything irreversible?\"**\n\nThat's why I only really read one line of the grader's output. Fatal = 0: ship. Fatal = 1: don't — even if everything else is perfect.\n\n*P.S. Next up: the model that costs 3x more won by exactly one question.*\n\n*All code and the 29 questions are public → github.com/ramses203/llm-test-harness*", "url": "https://wpnews.pro/news/grade-your-llm-pass-fail-and-you-will-ship-a-disaster", "canonical_source": "https://dev.to/ramses203/grade-your-llm-passfail-and-you-will-ship-a-disaster-1f19", "published_at": "2026-08-20 00:12:58+00:00", "updated_at": "2026-08-20 00:43:43.039843+00:00", "lang": "en", "topics": ["large-language-models", "ai-safety", "ai-products", "developer-tools"], "entities": ["ramses203", "GitHub", "llm-test-harness"], "alternates": {"html": "https://wpnews.pro/news/grade-your-llm-pass-fail-and-you-will-ship-a-disaster", "markdown": "https://wpnews.pro/news/grade-your-llm-pass-fail-and-you-will-ship-a-disaster.md", "text": "https://wpnews.pro/news/grade-your-llm-pass-fail-and-you-will-ship-a-disaster.txt", "jsonld": "https://wpnews.pro/news/grade-your-llm-pass-fail-and-you-will-ship-a-disaster.jsonld"}}