Refining Critical Thinking in LLM Code Generation: A Faulty Premise-based Evaluation Framework
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
With the advancement of code generation capabilities in large language models (LLMs), their reliance on input premises has intensified. When users provide inputs containing faulty premises, the probability of code generation hallucinations rises significantly, exposing deficiencies in their self-scrutiny capabilities. This paper proposes Faulty Premises Bench (FPBench), the first code generation evaluation framework targeting faulty premises. By systematically constructing three categories of faulty premises and integrating multi-dimensional evaluation metrics, it conducts in-depth assessments of 15 representative LLMs. The key findings are as follows: (1) Most models exhibit poor reasoning abilities and suboptimal code generation performance under faulty premises, heavily relying on explicit prompts for error detection, with limited self-scrutiny capabilities; (2) Faulty premises trigger a point of diminishing returns in resource investment, leading to blindly increasing length fails to enhance quality; (3) The three types of faulty premises respectively activate distinct defect patterns in models, revealing a triple dissociation in the cognitive mechanisms of code generation models. This study not only highlights the urgent need for LLMs to proactively verify premises in code generation but also, through the proposed FPBench framework and multi-dimensional evaluation system, provides a theoretical foundation and practical pathway for developing reliable, human-centric code generation models.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 31 of its 44 references that are in the map. First posted on arXiv 5 Aug 2025.
Builds on
31 of 44 references.
Closest ancestors · 3
Same direction, newest first
- 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoning19 Apr
- 2024Qwen2.5-Coder Technical Report18 Sep
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar
Other references · 28
- 2023GPT-4 Technical Reportcited by 18,396
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2025Qwen3 Technical Reportcited by 8,820
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2025Qwen2.5-VL Technical Reportcited by 5,587
- 2024GPT-4o System Cardcited by 4,588
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2024Qwen2.5-Math Technical Report: Toward Mathematical Expert Model via Self-Improvementcited by 1,090
- 2021Measuring Coding Challenge Competence With APPScited by 902
- 2024DeepSeek-V3 Technical Reportcited by 811
16 more
- 2025Qwen2.5-1M Technical Reportcited by 164
- 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 103
- 2022CREPE: Open-Domain Question Answering with False Presuppositionscited by 72
- 2025Missing Premise exacerbates Overthinking: Are Reasoning Models losing Critical Thinking Skill?cited by 58
- 2021Which Linguist Invented the Lightbulb? Presupposition Verification for Question-Answeringcited by 41
- 2024Large Language Models as Test Case Generators: Performance Evaluation and Enhancementcited by 28
- 2023Enhancing Large Language Models Against Inductive Instructions with Dual-critique Promptingcited by 21
- 2024HumanEval-V: Benchmarking High-Level Visual Reasoning with Complex Diagrams in Coding Taskscited by 20
- 2025How to Protect Yourself from 5G Radiation? Investigating LLM Responses to Implicit Misinformationcited by 18
- 2025Don't Let It Hallucinate: Premise Verification via Retrieval-Augmented Logical Reasoningcited by 15
- 2025Can LLMs Generate High-Quality Test Cases for Algorithm Problems? TestCase-Eval: A Systematic Evaluation of Fault Coverage and Exposurecited by 10
- 2024Whispers that Shake Foundations: Analyzing and Mitigating False Premise Hallucinations in Large Language Modelscited by 9
- 2025Don't Take the Premise for Granted: Evaluating the Premise Critique Ability of Large Language Modelscited by 8
- 2025Flow2Code: Evaluating Large Language Models for Flowchart-based Code Generation Capabilitycited by 8
- 2025Battling Misinformation: An Empirical Study on Adversarial Factuality in Open-Source Large Language Modelscited by 6
- 2025Do Prompt Patterns Affect Code Quality? A First Empirical Assessment of ChatGPT-Generated Codecited by 4
Built on by
Citing papers per year: 2025: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025An Empirical Study of Reasoning Steps in Thinking Code LLMs
- 2024Understanding Defects in Generated Codes by Language Models
- 2026LLMs taking shortcuts in test generation: A study with SAP HANA and LevelDB
- 2025Are They All Good? Evaluating the Quality of CoTs in LLM-based Code Generation
- 2026On the risk of coding before testing: An empirical study on LLM-based test generation workflow
- 2024CodeMind: Evaluating Large Language Models for Code Reasoning
- 2025Holistic Evaluation of State-of-the-Art LLMs for Code Generation
- 2026Unlocking LLM Code Correction with Iterative Feedback Loops