Sub topic 12
Overthinking and diminishing returns
This chapter assumes you have called a reasoning model through an API, that you know the effort and thinking-budget settings from the earlier chapters, and that you can read short Python functions. It covers what happens when you give a model more thinking than a task needs, how to spot that, and how to cap it.
What overthinking means
More reasoning does not always give better answers. Overthinking is any case where extra reasoning tokens add cost and latency without improving the result, or make the result worse. Three patterns are common:
- Wasted effort on easy tasks. The model spends hundreds or thousands of reasoning tokens on a question that needs a one-line answer, such as extracting a date from a sentence.
- Flat accuracy. Going from medium to high effort adds seconds and cost, but the pass rate on your test set barely moves.
- Reasoning that hurts. The model reaches the right answer early, keeps checking, talks itself into a doubt, and changes to a wrong answer. This happens less often than the first two patterns. Treat it as something to test for on your own data, not as a rule.
Overthinking is about the match between task and setting. A setting that is wasteful for a simple lookup can be correct for a multi-step proof.
Why returns diminish
Reasoning helps because the model can break a problem into steps, try an approach, and check it. Early reasoning tokens do most of that work: they set up the problem, pick a method, and carry out the main calculation. Later tokens mostly re-verify, explore alternatives, or restate earlier steps. Each of those catches fewer errors than the one before.
Three limits sit on top of this:
- Ceiling effects. If the model already answers 95% of your cases correctly at low effort, the most extra effort can add is 5 points. Most of it goes to cases that were already correct.
- Capability limits. Some questions are beyond what the model knows or can do. More thinking time does not supply a missing fact.
- Error accumulation. A long chain has more places to make a slip. Self-checking removes some of these errors but not all, and a long chain can introduce new ones.
Cost, by contrast, grows roughly in proportion to the tokens spent, because reasoning tokens are billed as output tokens. Latency grows with them too, since the model generates tokens one after another. Accuracy follows a curve that flattens, while cost and latency keep rising in a line. The gap between them is the waste.
In this sketch, the step from low to medium buys 12 points. The step from medium to high buys 1 point, and it may cost two or three times the latency.
Where overthinking shows up in practice
Simple tasks with a high setting
Classification, extraction, formatting, and short factual lookups rarely need long reasoning. A reasoning model at high effort may still produce a long internal chain for them. You pay for those tokens even though you never see most of them. The usage fields show the cost. In the OpenAI Responses API, compare usage.output_tokens_details.reasoning_tokens with usage.output_tokens. If a simple task shows hundreds of reasoning tokens for a ten-token answer, the setting is too high.
Truncation from a shared budget
Reasoning tokens count against the output limit. A long reasoning chain can use up max_output_tokens (OpenAI) or max_tokens (Anthropic) before the final answer starts. The result is an empty or cut-off answer that you still pay for. This looks like a bug in your code, but the cause is too much thinking for the limit you set. Check the response status or stop reason for a "max tokens" or "incomplete" signal before you blame the prompt.
Budgets are targets, not guarantees
With a thinking budget, such as budget_tokens in the Anthropic API, the model may use less than the budget on easy problems. That is fine. The budget is a ceiling on how much thinking you allow. It is not a promise to spend that much, and providers describe it as a target and not a strict cap. Do not rely on it as a hard cost limit. Pair it with an explicit output limit and a timeout.
Latency variance
At high effort, the time to respond varies much more from request to request than at low effort, because the length of the chain varies. A median latency that looks acceptable can hide a slow tail. If your product has a response-time requirement, measure the 95th percentile, not only the average.
Measuring where returns flatten
The chapter on measuring effort settings gave you a loop that records accuracy and seconds per case at each level. This chapter adds the analysis step: given those results, find the lowest effort that is still close to the best.
EFFORT_ORDER = ("low", "medium", "high")
def marginal_returns(results, order=EFFORT_ORDER):
"""Return the extra accuracy and extra seconds gained at each step up."""
rows = []
for previous, current in zip(order, order[1:]):
gain = results[current]["accuracy"] - results[previous]["accuracy"]
extra_seconds = (
results[current]["seconds_per_case"]
- results[previous]["seconds_per_case"]
)
rows.append(
{
"step": f"{previous} -> {current}",
"accuracy_gain": gain,
"extra_seconds": extra_seconds,
}
)
return rows
def pick_effort(results, order=EFFORT_ORDER, tolerance=0.02):
"""Return the lowest effort whose accuracy is within `tolerance` of the best."""
best = max(results[effort]["accuracy"] for effort in order)
for effort in order:
if best - results[effort]["accuracy"] <= tolerance:
return effort
return order[-1]
if __name__ == "__main__":
# Sample numbers in the same shape that compare_efforts returns.
results = {
"low": {"accuracy": 0.78, "seconds_per_case": 2.1},
"medium": {"accuracy": 0.90, "seconds_per_case": 5.8},
"high": {"accuracy": 0.91, "seconds_per_case": 14.2},
}
for row in marginal_returns(results):
print(
f"{row['step']}: +{row['accuracy_gain'] * 100:.0f} points, "
f"+{row['extra_seconds']:.1f} s per case"
)
print("chosen effort:", pick_effort(results))With the sample data, the program prints:
low -> medium: +12 points, +3.7 s per case
medium -> high: +1 points, +8.4 s per case
chosen effort: mediumThe tolerance is a decision you make, not a constant. A medical-coding task might use 0.0, because every point matters. A chat feature that answers thousands of requests an hour might accept 0.05 for half the latency.
Pitfalls when reading the numbers
- Small test sets. With 20 cases, one answer changes accuracy by 5 points. A 1-point gain between medium and high is noise at that size. Use enough cases that the differences you care about are larger than the noise, and repeat runs, since sampling makes results vary.
- Substring matching. The
compare_effortsloop checks whether the expected text appears in the answer. A verbose answer that mentions the right string and the wrong conclusion would still count as correct. Use stricter checks for tasks where that can happen. - Mixed difficulty. An average over easy and hard cases hides where the extra effort pays. Tag each case with a difficulty label and report accuracy per group. You may find that high effort helps only the hard group, which supports routing (below).
- Cost, not only time. Record
reasoning_tokensand total output tokens per case, along with seconds. Time depends on server load, while token counts are stable and map directly to your bill.
Reducing overthinking
Use the least invasive fix that works.
- Lower the effort level or budget. This is the first lever. Step down one level, re-run your test set, and keep the lower setting if accuracy holds.
- Route by difficulty. Send easy requests to a non-reasoning model or to low effort, and hard requests to high effort. A cheap rule can decide: request type, input length, or a small classifier.
- Escalate on failure. Try low effort first and check the answer with something cheap, such as a schema validation, a unit test, or a numeric check. Retry at higher effort only when the check fails. This pays for high effort only on the cases that need it, at the price of extra latency on those cases.
- Set an output limit that leaves room for the answer. Choose
max_output_tokensormax_tokensas the expected reasoning size plus the expected answer size, plus margin. Treat a truncated response as an error to handle, and do not return it to users. - Remove redundant instructions. Telling a reasoning model to "think step by step" or to "double-check your work" can push it toward longer chains for no gain. State the task and the output format, and let the effort setting control the depth.
- Ask for brevity in the answer, not in the thinking. An instruction such as "answer in one sentence" shortens the visible answer. It does not reliably shorten hidden reasoning, so use the effort setting for that.
Decision checklist
| Question | If yes | If no |
|---|---|---|
| Does accuracy at the next effort level improve by more than your tolerance? | Keep the higher level | Use the lower level |
| Do easy cases use as many reasoning tokens as hard ones? | Route easy cases to lower effort | Keep a single setting |
| Is the p95 latency above your limit? | Lower effort or add routing | Keep the setting |
| Are some responses truncated before the answer? | Raise the output limit or lower effort | No change |
| Does a cheap check detect wrong answers? | Use escalate on failure | Use routing or a fixed setting |
Exercise
A team runs 40 test cases at three effort levels and gets accuracy of 0.80 (low, 3 s), 0.93 (medium, 8 s), and 0.95 (high, 20 s) per case. Their tolerance is 0.02. Which level does pick_effort return, and what is one reason to be cautious about trusting the medium-to-high difference?
Show answer
pick_effort returns "medium". The best accuracy is 0.95, medium is 0.02 below it, and the tolerance allows a gap of 0.02. Low is 0.15 below, so it fails. The caution: with only 40 cases, a 0.02 difference is under one case (each case is 0.025), so the gap between medium and high could be noise. A larger test set and repeated runs would show whether high effort helps at all.
Exercise
A request to a reasoning model with maxoutputtokens set to 1000 returns an incomplete response with no final answer. The usage report shows 1000 output tokens, of which 990 are reasoning tokens. Give two ways to fix it.
Show answer
The reasoning used almost the whole output limit, so the answer never started. Raise maxoutputtokens so there is room for both reasoning and the answer, or lower the effort level (or thinking budget) so the model reasons less. Routing a simple request to a cheaper setting also works. Handle incomplete responses in code and do not show them to users.