paper-with-me

홈 › Papers

Python Code Generation by Asking Clarification Questions

2022-12-19 · Haau-Sing Li, Mohsen Mesgar, André F. T. Martins, Iryna Gurevych

Code generation from text requires understanding the user's intent from a natural language description and generating an executable code snippet that satisfies this intent. While recent pretrained language models demonstrate remarkable performance for this task, these models fail when the given natural language description is under-specified. In this work, we introduce a novel and more realistic setup for this task. We hypothesize that the under-specification of a natural language description can be resolved by asking clarification questions. Therefore, we collect and introduce a new dataset named CodeClarQA containing pairs of natural language descriptions and code with created synthetic clarification questions and answers. The empirical results of our evaluation of pretrained language model performance on code generation show that clarifications result in more precisely generated code, as shown by the substantial improvement of model performance in all evaluation metrics. Alongside this, our task and dataset introduce new challenges to the community, including when and what clarification questions should be asked. Our code and dataset are available on GitHub.

📄 PDF Abstract BibTeX arXiv:2212.09885

Code (1)

ukplab/codeclarqa 공식 구현 pytorch

Tasks

Code GenerationLanguage ModelingLanguage Modelling

Methods 이 논문이 사용한 방법론

fail 설명 없음

Similar Papers 제목 키워드 기반

Curiosity by Design: An LLM-based Coding Assistant Asking Clarification Questions

2025-07-28 · Harsh Darji, Thibaud Lutellier arxiv

Large Language Models (LLMs) are increasingly used as coding assistants. However, the ambiguity of the developer's prompt often leads to incorrect code generation, as current models struggle to infer user intent without …

Prompt EngineeringCode Generation

ProductAgent: Benchmarking Conversational Product Search Agent with Asking Clarification Questions

2024-07-01 · Jingheng Ye, Yong Jiang, Xiaobin Wang, Yinghui Li 외

This paper introduces the task of product demand clarification within an e-commercial scenario, where the user commences the conversation with ambiguous queries and the task-oriented agent is designed to achieve more acc…

BenchmarkingQuestion GenerationQuestion-GenerationRetrieval

Open-domain clarification question generation without question examples

2021-10-19 · EMNLP 2021 11 · Julia White, Gabriel Poesia, Robert Hawkins, Dorsa Sadigh 외

An overarching goal of natural language processing is to enable machines to communicate seamlessly with humans. However, natural language can be ambiguous or unclear. In cases of uncertainty, humans engage in an interact…

Question GenerationQuestion-Generation

Asking Clarification Questions in Knowledge-Based Question Answering

2019-11-01 · IJCNLP 2019 11 · Jingjing Xu, Yuechen Wang, Duyu Tang, Nan Duan 외

The ability to ask clarification questions is essential for knowledge-based question answering (KBQA) systems, especially for handling ambiguous phenomena. Despite its importance, clarification has not been well explored…

Question AnsweringQuestion GenerationQuestion-Generation

Asking the Right Question at the Right Time: Human and Model Uncertainty Guidance to Ask Clarification Questions

2024-02-09 · Alberto Testoni, Raquel Fernández

Clarification questions are an essential dialogue tool to signal misunderstanding, ambiguities, and under-specification in language use. While humans are able to resolve uncertainty by asking questions since childhood, m…