Accuracy, Stability, and Repeated-Run Reliability of Large Language Models on Deterministic Programming Tasks
This paper demonstrates that standard run-level accuracy metrics significantly overstate the reliability of large language models on deterministic programming tasks by ignoring the substantial gap between single-run success and consistent retry-free performance, particularly for mid-tier models, thereby establishing the necessity of repeated-run stability analysis for accurate evaluation.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you hire a team of chefs to cook a specific dish based on a recipe you give them. You ask each chef to try cooking the dish five times in a row, using the exact same ingredients and instructions.
Most people would look at the results and say, "Wow, Chef A got it right 4 out of 5 times! That's an 80% success rate. They are great."
But this paper asks a different, more practical question: "If I ask Chef A to cook this dish right now, can I trust that it will be perfect every single time, or do I have to keep asking them to try again until they get it right?"
The researchers found that the standard way of measuring success (the "80% success rate") often lies to us. It makes the chefs look more reliable than they actually are.
Here is a breakdown of their findings using simple analogies:
1. The "Average" vs. The "Perfect Streak"
The paper introduces two ways to measure a chef (or an AI model):
- Run-Level Pass Rate (The Average): This is like counting how many perfect plates came out of the kitchen total. If a chef makes 100 plates and 80 are perfect, they have an 80% score. This is what most people look at.
- Perfect Stability Rate (The "No Retry" Score): This asks: "How many of the orders did the chef get right on the very first try, without ever messing up?"
The Big Discovery: The "Average" score is almost always higher than the "No Retry" score.
- The Analogy: Imagine a chef who flips a coin to decide whether to add salt.
- Scenario A: They get the dish right 50% of the time, but when they get it wrong, they get it really wrong. They are inconsistent.
- Scenario B: They get the dish right 50% of the time, but they are either always perfect or always terrible.
- The paper found that for "mid-level" chefs (those who are good but not perfect), the gap between their "Average" score and their "No Retry" score is huge. One model might look like it's 86% accurate on average, but if you need it to work perfectly without a second guess, it's actually only 75% reliable. That's a 17.8% difference—a massive gap that changes who you would hire.
2. The "Mid-Range" Trap
The researchers found that the biggest lies happen with the "middle-of-the-road" models.
- Top-tier models are so good they rarely make mistakes, so their "Average" and "Stability" scores are close.
- Bottom-tier models are so bad they almost always fail, so their scores are also close (both low).
- The Middle Models: These are the tricky ones. They succeed often enough to look good, but they fail often enough to be annoying. Because they are "on the fence," their results bounce around wildly. The paper found that for these models, the "Average" score overstates their reliability by nearly 18 percentage points.
3. The "Prompt" (The Recipe Card)
The team tested if giving the chef a more detailed recipe card (a "Detailed Prompt") versus a short one (a "Minimal Prompt") made them more consistent.
- The Result: It depends entirely on the chef.
- For some models, a detailed recipe helped. For others, a short recipe was better. For some, it didn't matter at all.
- The Lesson: There is no "magic prompt" that fixes everyone. You can't just give a better instruction to a mid-tier model and expect it to suddenly become perfectly stable.
4. The "Thinking" Models (Reasoning vs. Standard)
Some modern chefs are trained to "think step-by-step" before cooking (Reasoning Models). The researchers wondered if this "thinking" made them more consistent.
- The Result: Not necessarily.
- While some "thinking" models were surprisingly stable, others were actually less stable than their non-thinking counterparts. The act of "thinking" didn't guarantee a perfect streak. In fact, for some, the extra thinking steps introduced more chances for things to go wrong.
5. Why This Matters
The paper argues that we need to stop just looking at the "Average" score.
- The Real World: If you are building a software system that needs to run automatically (like a self-driving car or a banking script), you don't want a system that works "most of the time." You want a system that works every single time without you having to hit the "retry" button.
- The Conclusion: To know if an AI is truly ready for the real world, you have to test it repeatedly. You need to know not just if it can solve the problem, but how reliably it solves it on the first try.
In short: A high score on a test doesn't mean the student is consistent. This paper shows us how to measure the difference between "getting it right eventually" and "getting it right every time."
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.