BenchOverflow: Measuring Overflow in Large Language Models via Plain-Text Prompts

Erin Feiglin, Nir Hutnik, Raz Lapid

TL;DR

Large Language Models (LLMs) can be tricked into generating excessively long outputs with seemingly benign prompts, a phenomenon called "Overflow." This paper introduces BENCHOVERFLOW, a benchmark to systematically measure this issue across various models and prompting strategies. They also demonstrate a simple, effective defense that significantly reduces this verbosity without harming task performance.

What Problem Does This Paper Address?

Large Language Models (LLMs) are designed to be helpful and comprehensive. However, in certain situations, they can fall into a trap of generating outputs that are far longer than necessary or useful. This "Overflow" phenomenon isn't about malicious jailbreaks or prompt injections; it arises from ordinary interaction patterns. Imagine asking an LLM to "list every X" or "explain in detail" – it might just keep going and going. This excessive generation leads to practical problems: higher costs (more tokens = more money), increased latency (longer wait times), and potential degradation of service for other users in shared environments. The paper aims to quantify this problem, understand its causes, and explore solutions.

Methods

The core of this research is the BENCHOVERFLOW benchmark. This benchmark consists of nine distinct "overflow-inducing" prompting strategies. These strategies are designed to elicit long outputs without resorting to special tokens, jailbreaks, or adversarial suffixes. Instead, they leverage natural language patterns that encourage verbosity.

The researchers developed a systematic meta-prompting protocol to generate these prompts. This involves instructing a powerful LLM (GPT-40) to act as a "red team collaborator," providing it with clear definitions of each attack vector, positive and negative examples, and specific rules for what to include and avoid. This ensures the generated prompts are high-fidelity and reproducible.

For evaluation, they used a standardized protocol with a fixed budget of 5,000 new tokens for each generation. They tested nine different LLMs (both open-source and closed-source) across all nine strategies.

To measure overflow, they analyzed:

  • Output length distributions: Visualizing how often models generate short, medium, or long outputs.
  • Cap-saturation rate (CSR): The percentage of generations that hit the 5,000-token limit.
  • Within-prompt variance: How consistent a model is in generating long outputs for the same prompt across multiple runs.
  • Cross-model correlations: How similarly different models respond to the same overflow prompts.

Finally, they tested a lightweight defense consisting of a simple conciseness reminder prepended to user prompts.

Datasets

The paper introduces the BENCHOVERFLOW dataset, which comprises over 300 systematically constructed prompts for each of the nine overflow-inducing strategies. This dataset is designed to be model-agnostic and cover a wide range of prompt types that can lead to excessive generation.

As a benign baseline for comparison, they used a subset of the OpenAssistant Conversations corpus (OASST2). This dataset represents more typical, non-overflow-inducing user queries.

Key Insights and Ideas

  • Overflow is a systemic issue, not just a quirk: Even "plain-text" prompts, without any adversarial tricks, can reliably cause LLMs to generate excessively long outputs. This highlights a fundamental challenge in controlling LLM behavior.
  • Different strategies exploit different weaknesses: Some strategies, like "Explicit Forced Length" and "Tokenizer Stress," directly push models towards the token limit. Others, like "Infinite Generation" and "Recursive Details," create heavy "right tails" in output length distributions, meaning they frequently produce very long outputs.
  • Refusals don't always mean short outputs: Models might refuse a request but still generate lengthy explanations or justifications, demonstrating a disconnect between refusal mechanisms and length control.
  • Alignment matters, but not uniformly: The way LLMs are aligned (trained to be helpful and harmless) influences their susceptibility to overflow. Some models are more resistant due to their alignment, while others are more prone.
  • A simple reminder goes a long way: A basic "be concise" instruction can significantly reduce overflow, even for the most aggressive strategies, without degrading the quality of responses on benign prompts.

Key Results

  • Across all nine models tested, BENCHOVERFLOW prompts consistently led to longer outputs compared to the benign OASST2 baseline.
  • Strategies like "Explicit Forced Length" and "Tokenizer Stress" frequently resulted in outputs hitting the 5,000-token generation budget.
  • Within-prompt variability was generally low, indicating that when a prompt triggers overflow, it does so reliably for most models. However, some model families (e.g., Gemini, LLaMA) showed more variability.
  • The lightweight conciseness reminder reduced mean output length by 30% to over 90% for different models, with reductions of 85-90% observed for models like Gemini-2.5-Flash and Qwen-3-8B.
  • Task adequacy on benign prompts was largely preserved with the conciseness reminder, with reductions in length often leading to a redistribution from "fully correct" to "partially correct" answers, rather than complete failure.

Limitations and Future Work

The study's limitations include:

  • Focusing solely on plain-text prompts and fixed decoding parameters, not exploring tool-augmented agents, retrieval pipelines, or training-time defenses.
  • Using default temperature settings for models, which can influence sequence length variability.
  • Reliance on LLM-as-a-judge for refusal and adequacy evaluations, which, while spot-checked, could benefit from larger-scale human validation.

Future work suggested includes:

  • Expanding coverage to tool use, RAG, multimodality, and multi-turn settings.
  • Testing alternative decoding strategies and default configurations.
  • Developing more principled, layered mitigations that cap generation without sacrificing task performance.

Summary updated

BibTeX
@article{feiglin2026benchoverflow,
  author = {Erin Feiglin and Nir Hutnik and Raz Lapid},
  title = {{BenchOverflow: Measuring Overflow in Large Language Models via Plain-Text Prompts}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2026},
}

Loading related content...

Figure