Qwen2.5-7B Checked Its Own Work in Three Roles and Caught an Error, but Slowed Down 6.3x
Qwen2.5-7B on a free Colab T4 card answered a age puzzle incorrectly: Bob is 20, Alice is half his age, and when Bob turns 100 the model said Alice would be 50 instead of 90. When the same model was made to play author, critic and judge, the answer became correct. The cost: 16.67 seconds instead of 2.63 (6.3x longer) and 660 tokens instead of 85 (7.8x more). So the check is worth enabling where an error costs more than the latency.
AI-processed from Machine Learning Mastery; edited by Hamidun News
A small language model easily makes mistakes on a problem that looks simple, and checking an answer with a second and third model usually costs money and time. How much exactly? Ivan Palomares Carrascosa, the author of an analysis on Machine Learning Mastery, suggests not taking the promises of multi-agent frameworks such as AutoGen and LangGraph at face value, and instead putting a stopwatch and a token counter into the code. He built an "author — critic — judge" scheme on a single Qwen2.5-7B-Instruct model, and in the test it fixed the wrong answer. But it took 6.3 times longer (16.67 seconds versus 2.63) and used 7.8 times more tokens (660 versus 85).
How the three-role scheme works
The idea is similar to ordinary code review. The first agent (Proposer) receives the task and quickly produces a draft answer. The second (Critic) does not accept it on trust: it first solves the task step by step on its own, then compares its result with the draft. The third (Judge) sees the task, the draft and the critic's remarks and produces the final answer. If the critic finds no errors, the judge repeats the draft verbatim; if it finds some, the judge returns a corrected version.
Three separate models would not fit into memory even on Google Colab with an Nvidia T4 graphics card with 16 GB: loading would fail almost immediately for lack of memory. So the author applies a technique he calls "persona multiplexing." A single Qwen2.5-7B-Instruct is loaded with its weights compressed to 4 bits via bitsandbytes, and the role is changed with a system prompt: the same model produces three "hats" in turn. A helper function wraps each call, measuring the time and counting input and output tokens. The parameters are modest: up to 256 new tokens in the response and a temperature of 0.3.
What the test showed
The task is one that small models tend to stumble on: Bob is 20 years old, Alice is half his age; how old will Alice be when Bob turns 100? The single model answered 50. The critic solved the problem independently: Alice is now 10, the age gap is 10 years and it does not change over time, so Alice will be 90. The judge output 90.
The cost of the correction, according to the author's measurements:
- one agent: 2.63 seconds and 85 tokens;
- the full chain: 16.67 seconds and 660 tokens;
- in total, 6.3 times longer and 7.8 times more tokens.
The author concludes that on simple factual queries such a scheme only burns computation, while on tasks that require reasoning, the reliability may be worth the overhead.
What to consider in practice
This is a teaching example, not a benchmark: one question, one run, no statistics. It cannot tell you how much accuracy will improve on real tasks. There is also an odd detail in the output: the critic began its answer with the phrase "No flaws found," and then went on to explain in detail that the draft was wrong.
Under the instructions, the judge in such a case should have repeated the original answer, and everything worked out only because it read the critique in full. In production, such contradictions are better caught: for example, require the critic to return a strictly structured verdict (JSON with a "correct/incorrect" field) and parse it in code rather than relying on its wording.
What you can take from the material:
- Separate the roles with system prompts while one model is enough: a 4-bit Qwen2.5-7B fits into free Colab.
- Measure latency and tokens at each step. In this test, a chain of three calls cost several times more than a single one.
- Enable verification selectively: for example, a simple router sends only tasks involving arithmetic, logic or code into the loop, while other questions go directly to the answer.
- Make the critic solve the problem on its own first rather than simply "checking the answer": that makes it less likely to agree with the draft on trust.
- Remember the limit of a single model: if it cannot solve a task at all, the critic will most likely repeat the same error. For important scenarios, it is sensible to assign the critic role to a different or stronger model.
The main value of the material is a ready-made measurement template. It can be run on a free Colab, fed your own tasks, and used to get your own numbers: what the extra verification costs you and whether it pays off.
- Nov 27, 2026Meta Launches Muse AI Shopper: A Third of Shoppers Expect to Use AI Help on Black Friday
- Nov 27, 2026Claude Sonnet 5.5 Costs 32% to 304% of the Official Price at Russian Resellers
- Nov 27, 2026deskhatch turns HTML from Claude into a real program: a 5.5 MB runtime instead of 100 MB per app
- Nov 27, 2026Seven of the Top 10 Repos on GitHub Trending This Week Are About Skills for AI Agents
Key Questions Answered
How the three-role scheme works?
The idea is similar to ordinary code review. The first agent (Proposer) receives the task and quickly produces a draft answer. The second (Critic) does not accept it on trust: it first solves the task step by step on its own, then compares its result with the draft. The third (Judge) sees the task, the draft and the critic's remarks and produces the final answer. If the critic finds no errors, the judge repeats the draft verbatim; if it finds some, the judge returns a corrected version.
What the test showed?
The task is one that small models tend to stumble on: Bob is 20 years old, Alice is half his age; how old will Alice be when Bob turns 100? The single model answered 50. The critic solved the problem independently: Alice is now 10, the age gap is 10 years and it does not change over time, so Alice will be 90. The judge output 90.
What to consider in practice?
This is a teaching example, not a benchmark: one question, one run, no statistics. It cannot tell you how much accuracy will improve on real tasks. There is also an odd detail in the output: the critic began its answer with the phrase "No flaws found," and then went on to explain in detail that the draft was wrong. Under the instructions, the judge in such a case should have repeated the original answer, and everything worked out only because it read the critique in full.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
