Robustness and Reasoning Fidelity of Large Language Models in Long-Context Code Question Answering
On the map: LLM reasoning → Reasoning benchmarks and evaluation
Abstract (arXiv)
Large language models (LLMs) increasingly assist software engineering tasks that require reasoning over long code contexts, yet their robustness under varying input conditions remains unclear. We conduct a systematic study of long-context code question answering using controlled ablations that test sensitivity to answer format, distractors, and context scale. Extending LongCodeBench Python dataset with new COBOL and Java question-answer sets, we evaluate state-of-the-art models under three settings: (i) shuffled multiple-choice options, (ii) open-ended questions and (iii) needle-in-a-haystack contexts containing relevant and adversarially irrelevant information. Results show substantial performance drops in both shuffled multiple-choice options and open-ended questions, and brittle behavior in the presence of irrelevant cues. Our findings highlight limitations of current long-context evaluations and provide a broader benchmark for assessing code reasoning in both legacy and modern systems.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 3 of its 10 references that are in the map. First posted on arXiv 19 Feb 2026.
Builds on
3 of 10 references.
Closest ancestors · 1
Same direction, newest first
Other references · 2
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Context-Length Robustness in Question Answering Models: A Comparative Empirical Study
- 2025LongReason: A Synthetic Long-Context Reasoning Benchmark via Context Expansion
- 2023Question Answering as Programming for Solving Time-Sensitive Questions
- 2026Beyond Code Snippets: Benchmarking LLMs on Repository-Level Question Answering
- 2024ALR2: A Retrieve-then-Reason Framework for Long-context Question Answering
- 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoning
- 2024Large Language Models Can Self-Improve in Long-context Reasoning
- 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitasks