ClarifyGPT: Empowering LLM-based Code Generation with Intention Clarification
On the map: World models → World models for language agents
Abstract (arXiv)
We introduce a novel framework named ClarifyGPT, which aims to enhance code generation by empowering LLMs with the ability to identify ambiguous requirements and ask targeted clarifying questions. In particular, ClarifyGPT first detects whether a given requirement is ambiguous by performing a code consistency check. If it is ambiguous, ClarifyGPT prompts an LLM to generate targeted clarifying questions. After receiving question responses, ClarifyGPT refines the ambiguous requirement and inputs it into the same LLM to generate a final code solution. To evaluate our ClarifyGPT, we first conduct a human evaluation involving ten participants who use ClarifyGPT for code generation on two publicly available benchmarks: MBPP-sanitized and MBPP-ET. The results show that ClarifyGPT elevates the performance (Pass@1) of GPT-4 from 70.96% to 80.80% on MBPP-sanitized. Furthermore, to perform large-scale automated evaluations of ClarifyGPT across different LLMs and benchmarks without requiring user participation, we introduce a high-fidelity simulation method to simulate user responses. The automated evaluation results also demonstrate that ClarifyGPT can significantly enhance code generation performance compared to the baselines. In particular, ClarifyGPT improves the average performance of GPT-4 and ChatGPT across four benchmarks from 68.02% to 75.75% and from 58.55% to 67.22%, respectively. We believe that ClarifyGPT can effectively facilitate the practical application of LLMs in real-world development environments.
Key facts. Cited by 38 papers in the map (data through 14 Oct 2026). Placed in World models for language agents, one of 11 directions in World models. Builds on 4 of its 45 references that are in the map. First posted on arXiv 17 Oct 2023.
Builds on
4 of 45 references.
References · 4
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
Built on by
Citing papers per year: 2023: 1; 2024: 14; 2025: 15; 2026: 8.
38 papers.
Sort:
By area:
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2024Understanding World or Predicting Future? A Comprehensive Survey of World Modelscited by 166
- 2025CollabLLM: From Passive Responders to Active Collaboratorscited by 124
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigationcited by 93
- 2025Paper2Code: Automating Code Generation from Scientific Papers in Machine Learningcited by 70
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
- 2025Training Proactive and Personalized LLM Agentscited by 46
- 2024Knowledge Boundary of Large Language Models: A Surveycited by 40
- 2024AMBROSIA: A Benchmark for Parsing Ambiguous Questions into Database Queriescited by 35
- 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applicationscited by 26
- 2024A Survey of Conversational Searchcited by 22
26 more
- 2025QualityFlow: An Agentic Workflow for Program Synthesis Controlled by LLM Quality Checkscited by 22
- 2024A Pair Programming Framework for Code Generation via Multi-Plan Exploration and Feedback-Driven Refinementcited by 21
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Modelscited by 15
- 2025Disambiguate First, Parse Later: Generating Interpretations for Ambiguity Resolution in Semantic Parsingcited by 13
- 2025TOM-SWE: User Mental Modeling For Software Engineering Agentscited by 13
- 2024A Deep Dive Into Large Language Model Code Generation Mistakes: What and Why?cited by 10
- 2026LLM-Based Agentic Systems for Software Engineering: Challenges and Opportunitiescited by 8
- 2024Imagining a Future of Designing with AI: Dynamic Grounding, Constructive Negotiation, and Sustainable Motivationcited by 7
- 2024Planning-Driven Programming: A Large Language Model Programming Workflowcited by 7
- 2025HoarePrompt: Structural Reasoning About Program Correctness in Natural Languagecited by 7
- 2025Generative Interfaces for Language Modelscited by 6
- 2026DiscoverLLM: From Executing Intents to Discovering Themcited by 6
- 2024Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithmcited by 5
- 2025Towards Advancing Code Generation with Large Language Models: A Research Roadmapcited by 5
- 2026Ambig-DS: A Benchmark for Task-Framing Ambiguity in Data-Science Agentscited by 5
- 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Actioncited by 4
- 2025Exploring the Challenges and Opportunities of AI-assisted Codebase Generationcited by 4
- 2025Reasoning about Intent for Ambiguous Requestscited by 4
- 2024Self-Explained Keywords Empower Large Language Models for Code Generationcited by 2
- 2025Evaluating Software Process Models for Multi-Agent Class-Level Code Generationcited by 2
- 2026Found in Conversation: LLMs Teach Themselves to Close the Multi-Turn Gapcited by 2
- 2025Knowledge-Guided Multi-Agent Framework for Application-Level Software Code Generationcited by 0
- 2026BALAR : A Bayesian Agentic Loop for Active Reasoningcited by 0
- 2026Turning Intent into Specifications: A Benchmark and an Interactive User-Assistant Agentcited by 0
- 2026DevIntent: How Much Does LLM-Generated Code Violate Developer Intent?cited by 0
- 2026CLEAT: Learning Value-Guided Clarification for Interactive Agentscited by 0
- 2026CLEAT: Learning Value-Guided Clarification for Interactive Agents8 Oct 2026
- 2026DevIntent: How Much Does LLM-Generated Code Violate Developer Intent?7 Aug 2026
- 2026Found in Conversation: LLMs Teach Themselves to Close the Multi-Turn Gap23 May 2026
- 2026Turning Intent into Specifications: A Benchmark and an Interactive User-Assistant Agent13 May 2026
- 2026Ambig-DS: A Benchmark for Task-Framing Ambiguity in Data-Science Agents10 May 2026
- 2026BALAR : A Bayesian Agentic Loop for Active Reasoning6 May 2026
- 2026DiscoverLLM: From Executing Intents to Discovering Them3 Feb 2026
- 2026LLM-Based Agentic Systems for Software Engineering: Challenges and Opportunities14 Jan 2026
- 2025Reasoning about Intent for Ambiguous Requests13 Nov 2025
- 2025Evaluating Software Process Models for Multi-Agent Class-Level Code Generation12 Nov 2025
- 2025Training Proactive and Personalized LLM Agents4 Nov 2025
- 2025TOM-SWE: User Mental Modeling For Software Engineering Agents24 Oct 2025
26 more
- 2025Knowledge-Guided Multi-Agent Framework for Application-Level Software Code Generation22 Oct 2025
- 2025Generative Interfaces for Language Models26 Aug 2025
- 2025Exploring the Challenges and Opportunities of AI-assisted Codebase Generation11 Aug 2025
- 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Action16 Jun 2025
- 2025Paper2Code: Automating Code Generation from Scientific Papers in Machine Learning24 Apr 2025
- 2025HoarePrompt: Structural Reasoning About Program Correctness in Natural Language25 Mar 2025
- 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applications3 Mar 2025
- 2025Disambiguate First, Parse Later: Generating Interpretations for Ambiguity Resolution in Semantic Parsing25 Feb 2025
- 2025CollabLLM: From Passive Responders to Active Collaborators2 Feb 2025
- 2025QualityFlow: An Agentic Workflow for Program Synthesis Controlled by LLM Quality Checks20 Jan 2025
- 2025Towards Advancing Code Generation with Large Language Models: A Research Roadmap20 Jan 2025
- 2024Knowledge Boundary of Large Language Models: A Survey17 Dec 2024
- 2024Planning-Driven Programming: A Large Language Model Programming Workflow21 Nov 2024
- 2024Understanding World or Predicting Future? A Comprehensive Survey of World Models21 Nov 2024
- 2024A Deep Dive Into Large Language Model Code Generation Mistakes: What and Why?3 Nov 2024
- 2024Self-Explained Keywords Empower Large Language Models for Code Generation21 Oct 2024
- 2024A Survey of Conversational Search21 Oct 2024
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigation30 Sep 2024
- 2024Agents in Software Engineering: Survey, Landscape, and Vision13 Sep 2024
- 2024A Pair Programming Framework for Code Generation via Multi-Plan Exploration and Feedback-Driven Refinement8 Sep 2024
- 2024Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithm20 Aug 2024
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Models29 Jun 2024
- 2024AMBROSIA: A Benchmark for Parsing Ambiguous Questions into Database Queries27 Jun 2024
- 2024A Survey on Large Language Models for Code Generation1 Jun 2024
- 2024Imagining a Future of Designing with AI: Dynamic Grounding, Constructive Negotiation, and Sustainable Motivation12 Feb 2024
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Code14 Nov 2023
- 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
- 2025Training Proactive and Personalized LLM Agentscited by 46
- 2025QualityFlow: An Agentic Workflow for Program Synthesis Controlled by LLM Quality Checkscited by 22
- 2025TOM-SWE: User Mental Modeling For Software Engineering Agentscited by 13
- 2026LLM-Based Agentic Systems for Software Engineering: Challenges and Opportunitiescited by 8
- 2026Ambig-DS: A Benchmark for Task-Framing Ambiguity in Data-Science Agentscited by 5
- 2025Evaluating Software Process Models for Multi-Agent Class-Level Code Generationcited by 2
- 2025Knowledge-Guided Multi-Agent Framework for Application-Level Software Code Generationcited by 0
- 2026CLEAT: Learning Value-Guided Clarification for Interactive Agentscited by 0
- 2026CLEAT: Learning Value-Guided Clarification for Interactive Agents8 Oct 2026
- 2026Ambig-DS: A Benchmark for Task-Framing Ambiguity in Data-Science Agents10 May 2026
- 2026LLM-Based Agentic Systems for Software Engineering: Challenges and Opportunities14 Jan 2026
- 2025Evaluating Software Process Models for Multi-Agent Class-Level Code Generation12 Nov 2025
- 2025Training Proactive and Personalized LLM Agents4 Nov 2025
- 2025TOM-SWE: User Mental Modeling For Software Engineering Agents24 Oct 2025
- 2025Knowledge-Guided Multi-Agent Framework for Application-Level Software Code Generation22 Oct 2025
- 2025QualityFlow: An Agentic Workflow for Program Synthesis Controlled by LLM Quality Checks20 Jan 2025
- 2024Agents in Software Engineering: Survey, Landscape, and Vision13 Sep 2024
- 2025HoarePrompt: Structural Reasoning About Program Correctness in Natural Languagecited by 7
- 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Actioncited by 4
- 2025Reasoning about Intent for Ambiguous Requestscited by 4
- 2026BALAR : A Bayesian Agentic Loop for Active Reasoningcited by 0
- 2026BALAR : A Bayesian Agentic Loop for Active Reasoning6 May 2026
- 2025Reasoning about Intent for Ambiguous Requests13 Nov 2025
- 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Action16 Jun 2025
- 2025HoarePrompt: Structural Reasoning About Program Correctness in Natural Language25 Mar 2025
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2025CollabLLM: From Passive Responders to Active Collaboratorscited by 124
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigationcited by 93
- 2025Paper2Code: Automating Code Generation from Scientific Papers in Machine Learningcited by 70
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2024Knowledge Boundary of Large Language Models: A Surveycited by 40
- 2024AMBROSIA: A Benchmark for Parsing Ambiguous Questions into Database Queriescited by 35
- 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applicationscited by 26
- 2024A Survey of Conversational Searchcited by 22
- 2024A Pair Programming Framework for Code Generation via Multi-Plan Exploration and Feedback-Driven Refinementcited by 21
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Modelscited by 15
- 2025Disambiguate First, Parse Later: Generating Interpretations for Ambiguity Resolution in Semantic Parsingcited by 13
12 most cited of 24 All 24 (JSON)
- 2026DevIntent: How Much Does LLM-Generated Code Violate Developer Intent?7 Aug 2026
- 2026Found in Conversation: LLMs Teach Themselves to Close the Multi-Turn Gap23 May 2026
- 2026Turning Intent into Specifications: A Benchmark and an Interactive User-Assistant Agent13 May 2026
- 2026DiscoverLLM: From Executing Intents to Discovering Them3 Feb 2026
- 2025Generative Interfaces for Language Models26 Aug 2025
- 2025Exploring the Challenges and Opportunities of AI-assisted Codebase Generation11 Aug 2025
- 2025Paper2Code: Automating Code Generation from Scientific Papers in Machine Learning24 Apr 2025
- 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applications3 Mar 2025
- 2025Disambiguate First, Parse Later: Generating Interpretations for Ambiguity Resolution in Semantic Parsing25 Feb 2025
- 2025CollabLLM: From Passive Responders to Active Collaborators2 Feb 2025
- 2025Towards Advancing Code Generation with Large Language Models: A Research Roadmap20 Jan 2025
- 2024Knowledge Boundary of Large Language Models: A Survey17 Dec 2024
12 newest of 24 All 24 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2026CONTRA: Discovering and Qualifying Behavior-Changing Questions for Selective Clarification in LLM Code Generation
- 2024HumanEvalComm: Benchmarking the Communication Competence of Code Generation for LLMs and LLM Agent
- 2025LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMs
- 2025Disproving Program Equivalence with LLMs
- 2025DISTINCT: A Description-Guided Branch-Consistency Analysis Framework for Non-Regressive Test Case Generation ↗
- 2025Rubric Is All You Need: Enhancing LLM-based Code Evaluation With Question-Specific Rubrics
- 2024From Critique to Clarity: A Pathway to Faithful and Personalized Code Explanations with Large Language Models
- 2025Enabling Global, Human-Centered Explanations for LLMs:From Tokens to Interpretable Code and Test Generation