DEV Community

Cover image for I tested whether a 4B model could replace a 12B one in a tool-using agent. My first test was wrong.

I tested whether a 4B model could replace a 12B one in a tool-using agent. My first test was wrong.

Ajay Surya Senthilrajan on November 15, 2026

Two pre-registered runs on local models, a reader's correction between them, and the one place the small model still breaks. I wanted to know whet...
Collapse
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

The correction is the real finding here — run 1 measured 'a wrong first call is fatal', not 'the 4B can't do the task', and returning the error instead of raising it moved the 4B from 70/96 to 428/480. That's a test-harness lesson, not a model-size lesson. The compound case is what I'd chase next though: wrong first call plus an empty lookup, 0 of 26, while the 12B retried every time. Is that a capability gap, or just a retry policy the small model was never given?

Collapse
 
ajay_2112 profile image
Ajay Surya Senthilrajan •

Thanks for reading it this closely.

It was given the policy, and the same one as the 12B. Both models ran with one system prompt, and its last sentence is "Retry an empty lookup once." The retry in code covers only timeouts and tool errors, once. An empty result is not an error, so reading the order again was each model's own decision.

Under the injected empty result the 12B read the order a second time in 120 of 120 trials. The 4B did in 87 of 120. In the compound case (wrong first call, then the empty lookup) it stopped after one lookup in 21 of the 26.

So it is not a missing instruction. Whether to call it a capability gap, I can't say from this run. I have not tested a setup where the code retries an empty result for the model, which is what would tell the two apart. I also chose these cuts after seeing the data.

One caution on 70 of 96 against 428 of 480: those are two separate runs with different seeds and a different number of rounds, so the difference is not a measured effect of returning the error.

Collapse
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

Fair correction on 70/96 vs 428/480 — I read that as a before/after when it's two different runs, so the error-returning effect isn't measured. The retry detail reframes the compound case for me: both models had the same instruction, and the 4B still chose not to re-read a third of the time, so it's a decision difference, not a missing policy. The code-retry variant is the test that would settle whether it's a capability gap — are you planning to run it, or is the next post going a different direction?

Thread Thread
 
ajay_2112 profile image
Ajay Surya Senthilrajan • • Edited

The records show different actions under the same instruction. They do not establish a capability gap.

One more count from the run 2 records. Under the injected empty result the 4B read the order a second time in 87 of 120 trials, and 86 of those 87 passed. None of the other 33 passed. I chose this cut after seeing the data, so it is a description, not a test.

I did not run the code retry variant. A code retry would test the whole system with the recovery handed to code. It would not isolate what the model decides, and it would not by itself make the task succeed. A scripted test with no model in the repository shows how such a retry behaves.

I ran the neighbouring test instead, where the model still has to decide but is told at the point of failure. Same 4B model in both arms, on the 8 stock note tasks under the empty result. One arm gets the empty result as null, as in run 2. The other gets "lookup_order returned an empty result. Call lookup_order again with the same order_id." The rule and the message were registered before the first trial.

Both arms already had "Retry an empty lookup once." in the system prompt. A small smoke run came before the registration. its trials are not counted.

Result: 15 of 16 passed with the message, 2 of 16 without. The test stopped at round 2. Its verdict was BLOCK, and in this run BLOCK favours the message: I put the message arm in the baseline seat on purpose, because the test has no verdict for "better". Under the test's stated assumptions this supports an advantage of more than 10 points on these 8 tasks. It is a threshold decision, not a measured gain, and it says nothing about the full suite.

What it does not show: anything about the 12B model or a capability gap (it was in neither arm), or whether naming the next step is what helped (one wording, no control message). The 8 tasks were chosen from run 2's failures, and the run stopped early, so 15 and 2 are counts, not rates.

Run 3, with its pre-registration and raw records: github.com/ajaysurya1221/agent-rel...

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

The honesty about what this doesn't show is what makes it useful — 15 vs 2 on 8 pre-selected tasks is a threshold decision, not a measured gain, and you say so plainly. The interesting bit is that the retry policy arrived as an instruction in the message, not as model capability — which suggests the small model's gap was guidance, not reasoning. Is the next test a control message, to check whether naming the next step specifically is what helped?

Thread Thread
 
ajay_2112 profile image
Ajay Surya Senthilrajan • • Edited

I ran the control on eight stock note tasks with one 4B model. Both arms used the same prompt, ending "Retry an empty lookup once."

The explicit message was "lookup_order returned an empty result. Call lookup_order again with the same order_id."

The neutral message was “lookup_order returned an empty result. This lookup_order result is for the supplied order_id.”

The test stopped at round 4 with BLOCK (“regression established”). Under the registered assumptions, it supports a mean pass rate more than ten percentage points lower with neutral wording on these tasks. Explicit passed 30 of 32 trials and neutral passed 14 of 32. After an empty result, the agent tried the lookup again in 31 of 31 explicit trials and 14 of 31 neutral trials.

The consultant and orchestrator both predicted INCONCLUSIVE. Both were wrong. The orchestrator saw 16 smoke outcomes before the registration was published. I’ve linked the per task results and counts.

I didn’t measure reasoning or isolate whether naming the next step helped.