Longer Reasoning Chains Are Not Always Better: Finding the Optimal Depth with 50 Questions
This article explains why LLM accuracy can rise and then fall as chain-of-thought reasoning gets longer. It describes a practical method for finding the best reasoning depth with a 20 to 50 question set, then shows how to turn the result into token budgets, dynamic truncation, and fallback rules for production services.
1. Introduction: Longer Chains Are Not Necessarily More Accurate
Chain-of-thought (CoT) reasoning is a common way to improve large language model performance on complex tasks. The usual assumption is that more intermediate steps lead to more reliable final answers. Some studies on harder benchmarks, however, report a different pattern: accuracy rises and then falls as reasoning length grows, forming an inverted U. Beyond a certain length, adding steps stops helping, and accuracy can even drop.
This finding has three implications for engineering practice. First, evaluations must fix the reasoning mode, or experiments cannot be compared. Second, at inference time, systems need to decide how much compute budget each request receives. Third, online services need to schedule compute according to task difficulty.
The numbers in this article (levels, thresholds, sample sizes) are starting suggestions only. They do not apply to every model and task. This article also does not cite specific data from any paper. Readers should measure these values on their own question sets, models, and prompt templates.
2. Phenomenon and Applicability
2.1 The Phenomenon: Accuracy Rises, Then Falls
On harder tasks such as math reasoning, competition math, scientific question answering, and code generation, a common approach is a controlled experiment. The model version, prompt template, and decoding parameters stay fixed, and only the requested reasoning length changes. Under this setup, accuracy usually shows three phases:
- Rising phase: When reasoning is very short, the model does not have enough intermediate space to break down the problem. As the number of steps increases, accuracy improves noticeably.
- Peak region: Within a certain range, the granularity of the steps matches the structure of the problem, and accuracy is highest.
- Declining phase: Beyond the peak region, single-step errors accumulate along the chain. In long generations, the model may repeat earlier content or drift from the question’s constraints, and accuracy falls.
The inverted U is not universal. The curve may have no clear declining phase, or no peak at all, under the following conditions:
- The task is easy, and the baseline model already scores close to perfect with short reasoning.
- The baseline model is weak, so accuracy stays low at every length with little change.
- The prompt cannot reliably control output length. If the actual generated length differs greatly from the target, the x-axis is distorted.
- The answer extraction rule is too strict, so correct answers in long outputs are marked wrong, creating a false declining phase.
Check these conditions before drawing conclusions.
2.2 Measurement and Fitting Method
This article uses the number of generated tokens as the reasoning length (L), not the number of steps. There are two reasons. Token counts can be measured directly and map to billing and latency. Step boundaries vary by model and template, which makes them hard to compare across experiments. (L) counts only the reasoning part of the model output, excluding the question input. Report this definition in every experiment write-up.
Task difficulty is denoted (D{task}) and expressed as one minus the baseline accuracy, that is, (1-\mathrm{Acc}{base}). Accuracy at length (L) is written (\mathrm{Acc}(L)). For local fitting, use the following quadratic form:
(\mathrm{Acc}(L) \approx \alpha + \beta \ln L - \gamma (\ln L)^2)
The fit should meet these conditions:
- Cover at least 5 distinct (L) levels spanning more than one order of magnitude.
- Include at least 20 questions per level, with each question repeated at least 3 times.
- Use (x=\ln L) as the independent variable, and estimate (\alpha), (\beta), and (\gamma) by least squares.
- Estimate confidence intervals for the parameters and the peak using a question-level bootstrap.
If the fit gives (\gamma>0), the peak lies at (x^=\beta/(2\gamma)), that is, (L^=\exp(\beta/(2\gamma))). The peak is meaningful only if it falls within the range the experiment covers. If (\gamma\le 0), or the peak falls outside the tested range, the test range has no interior peak, and the result should not be extrapolated. The quadratic form describes only a local range. It does not represent the true shape of the full curve.
3. Factors That Affect the Optimal Reasoning Length
The optimal length is not a single constant. Several factors affect it together:
- Task difficulty: Harder questions usually need longer reasoning, but long chains are also more prone to drift.
- Model capability: Stronger models tend to have peaks further out, and their declining phase may fall beyond the lengths actually used.
- Problem structure: Single-hop lookup questions peak early, while multi-constraint, multi-step derivation questions peak later.
- Prompt template: The template determines how length is constrained. This changes the actual generated length and therefore the curve shape.
- Decoding parameters: Higher temperature causes more random drift in long chains.
- Answer extraction: Format rules directly affect measured accuracy, so they must be validated alongside the evaluation.
4. Searching Reasoning Depth with 20 to 50 Questions
This section gives a workflow you can run directly. A 20-question set works for quick screening, and a 50-question set supports a formal decision.
4.1 Building the Question Set
- Set size: Use 20 questions for quick screening and 50 for a formal decision.
- Stratified sampling: Stratify by difficulty (three tiers based on baseline accuracy) and by question type, with roughly balanced counts in each stratum.
- Reference answers: These must be automatically checkable. If answers can only be judged manually, reduce the set size first.
- Extraction rule: Fix the answer parsing rule before starting. Check it manually on 20 sample outputs to confirm that the misjudgment rate is very low.
- Data split: If you choose the configuration on the same questions, reserve another set (for example, 20 questions) as a validation set to avoid selection bias.
4.2 Setting Depth Levels
Levels define the upper limit on generated length. The following is a starting set. Adjust it to the typical output length of your task:
- Level 1: 128 tokens
- Level 2: 256 tokens
- Level 3: 512 tokens
- Level 4: 1024 tokens
- Level 5: 2048 tokens
If the baseline model’s typical output is far below 128 tokens, drop the levels that are too small. If accuracy keeps rising at the highest level, add larger levels and search again.
4.3 Fixing Evaluation Conditions
- Keep the model version, prompt template, system instructions, and context limit constant throughout the search.
- Fix the decoding method. If you use greedy decoding, set the temperature to 0. If you sample, fix the temperature and top_p, and fix the random seed.
- Repeat each question at each level at least 3 times. For 50 questions, 5 levels, and 3 repeats, that comes to 750 calls.
- Use the same reference answers and the same extraction rule for each question across all levels.
4.4 Metrics
Record the following metrics for each level:
- Accuracy: The mean, plus a 95% confidence interval from a question-level bootstrap.
- Average generated length: The actual token count of the model output, which may be lower than the level limit.
- Truncation rate: The share of responses that reach the length limit without a final answer.
- Format failure rate: The share of outputs that the extraction rule cannot parse.
- Cost per correct answer: The average token count divided by the number of correct answers.
- Latency: p50 and p95 response times.
Report truncation and format failure separately. Without this split, you cannot tell whether the reasoning was too short or the output was cut off.
4.5 Stopping Conditions
Stop increasing the level when any of the following is true:
- The accuracy gain between two adjacent levels is less than 2 percentage points, and the cost per correct answer rises noticeably. The 2-point threshold is a starting suggestion.
- Accuracy falls for two consecutive levels, and the drop exceeds the overlap of the confidence intervals.
- The cost per correct answer at a level exceeds the preset budget cap.
- The preset maximum level has been reached.
When selecting a configuration, you can use a conservative rule: among all levels whose accuracy confidence interval overlaps with the interval of the highest accuracy, choose the shortest one. This keeps cost down without a clear loss in accuracy.
