Saved in:
Bibliographic Details
Main Authors: Li, Jialin, Li, Jinzhe, Li, Gengxu, Chang, Yi, Wu, Yuan
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2508.03622
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913976441372672
author Li, Jialin
Li, Jinzhe
Li, Gengxu
Chang, Yi
Wu, Yuan
author_facet Li, Jialin
Li, Jinzhe
Li, Gengxu
Chang, Yi
Wu, Yuan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2508_03622
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Refining Critical Thinking in LLM Code Generation: A Faulty Premise-based Evaluation Framework
Li, Jialin
Li, Jinzhe
Li, Gengxu
Chang, Yi
Wu, Yuan
Artificial Intelligence
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.
title Refining Critical Thinking in LLM Code Generation: A Faulty Premise-based Evaluation Framework
topic Artificial Intelligence
url https://arxiv.org/abs/2508.03622