mlsanityData to 24 Nov 2026

Long-Context Generation Is a Sampling Problem (When You Turn Up the Heat)

arXiv 2611.22148 ↗Submitted 17 Nov 2026Announced 18 Nov 2026cs.AI cs.CLcited by 0

On the map: LLM agents and tool use → Tool learning and function calling also fits: Agent memory systems

Abstract (arXiv)

Open-weight language models are widely observed to get worse the longer they generate. Often, attempts to fix this involve more training. At high temperature, The sampler, i.e. the rule that picks the next token out of the model's probabilities, decides whether long and agentic generation survives and/or thrives. We test 29 open-weight models from 1B to 122B parameters on ten established benchmarks plus needle retrieval out to one million tokens, covering SWE-bench Verified coding agents, long chain-of-thought reasoning, long-form writing, long structured output and long-context reading. Samplers that keep their pool of candidate tokens small and steady as temperature rises don't lose accuracy. Samplers that let in low-probability tokens fall apart. At temperature 2, coding agents running top-p, top-k or Top-H resolve 0 of 100 GitHub issues, while the same agents running top-nsigma resolve 46 to 62 and win every issue the two samplers disagree on, on three Qwen3.5 models. Over all benchmarks top-nsigma keeps a median 100% of its temperature-1 score where top-p keeps 26%. Counting how many tokens each sampler lets through explains why. In one Llama-3.1-8B story, going from temperature 1 to 2 grows top-p's pool from 4 tokens to 51,845 while top-nsigma stays at 3. Across 133 combinations of sampler setting and temperature, the typical pool size predicts judged quality (Spearman correlation of -0.77), and when we pick the pool at temperature 1 and only apply temperature afterwards, Top-H, min-p and p-less stop collapsing. At the default temperature of 1 most samplers perform about the same, We release all code and data to the public.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Tool learning and function calling, one of 16 directions in LLM agents and tool use. Builds on 36 of its 41 references that are in the map. Submitted 17 Nov 2026, announced 18 Nov 2026.

Builds on

36 of 41 references.

References · 36

  1. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 9,360
  2. 2023Let's Verify Step by Stepcited by 4,259
  3. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,871
  4. 2023Mistral 7Bcited by 3,489
  5. 2019The Curious Case of Neural Text Degenerationcited by 3,022
  6. 2024Qwen2 Technical Reportcited by 2,293
  7. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,243
  8. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 2,069
  9. 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,638
  10. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,559
  11. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,557
  12. 2018Hierarchical Neural Story Generationcited by 1,221
24 more
  1. 2015A Diversity-Promoting Objective Function for Neural Conversation Modelscited by 1,099
  2. 2019CTRL: A Conditional Transformer Language Model for Controllable Generationcited by 799
  3. 2019Compressive Transformers for Long-Range Sequence Modellingcited by 798
  4. 2019Neural Text Generation with Unlikelihood Trainingcited by 522
  5. 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 447
  6. 2025MathArena: Evaluating LLMs on Uncontaminated Math Competitionscited by 336
  7. 2022A Contrastive Framework for Neural Text Generationcited by 231
  8. 2023ZeroSCROLLS: A Zero-Shot Benchmark for Long Text Understandingcited by 187
  9. 2023Generative Judge for Evaluating Alignmentcited by 180
  10. 2024Turning Up the Heat: Min-p Sampling for Creative and Coherent LLM Outputscited by 164
  11. 2024LongWriter: Unleashing 10,000+ Word Generation from Long Context LLMscited by 155
  12. 2022Truncation Sampling as Language Model Desmoothingcited by 133
  13. 2025WritingBench: A Comprehensive Benchmark for Generative Writingcited by 120
  14. 2022Locally Typical Samplingcited by 115
  15. 2020A Theoretical Analysis of the Repetition Problem in Text Generationcited by 87
  16. 2022Contrastive Search Is What You Need For Neural Text Generationcited by 61
  17. 2025LongProc: Benchmarking Long-Context Language Models on Long Procedural Generationcited by 37
  18. 2025From 128K to 4M: Efficient Training of Ultra-Long Context Large Language Modelscited by 18
  19. 2025LongWriter-Zero: Mastering Ultra-Long Text Generation via Reinforcement Learningcited by 17
  20. 2025Top-H Decoding: Adapting the Creativity and Coherence with Bounded Entropy in Text Generationcited by 12
  21. 2025p-less Sampling: A Robust Hyperparameter-Free Approach for LLM Decodingcited by 7
  22. 2026XTC: Head-Aware Sampling by Excluding Top Choicescited by 2
  23. 2026Don't Repeat Yourself: Stopping Verbatim Loops at Sampling Timecited by 2
  24. 2026Temperature Fragility and the Conditional Benefits of Truncation Samplingcited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026Agentic coding without the cloud: evaluating open-weight large language models on longitudinal data preparation tasks
  2. 2025Beyond Exponential Decay: Rethinking Error Accumulation in Large Language Models
  3. 2025When Life Gives You Samples: The Benefits of Scaling up Inference Compute for Multilingual LLMs
  4. 2025On the Role of Temperature Sampling in Test-Time Scaling
  5. 2026Caterpillar of Thoughts: The Optimal Test-Time Algorithm for Large Language Models
  6. 2026Trained Agentic Context Management
  7. 2024Large Language Monkeys: Scaling Inference Compute with Repeated Sampling
  8. 2025Exploring the Impact of Temperature on Large Language Models:Hot or Cold?