Research map / Large language models / Language, safety and interpretability
Python Code Generation by Asking Clarification Questions
Haau-Sing Li, Mohsen Mesgar, André F. T. Martins, Iryna Gurevych
TU Darmstadt · Bosch Center for Artificial Intelligence · Instituto Superior Técnico · Unbabel · Instituto de Telecomunicações
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| add oracle clarification questions and answers to input | PLBART-base · CodeClarQA code generation | BLEU: 24.63 -> 38.91 | Improved |
| add oracle CQAs to input | CodeT5-base · CodeClarQA code generation | BLEU: 27.03 -> 39.13 | Improved |
| add oracle CQAs to input | GPT-Neo-1.3B · CodeClarQA code generation | Exact Match: 0.00 -> 0.00 | No clear effect |
| add oracle CQAs to input | CodeParrot-110M · CodeClarQA code generation | Exact Match: 0.10 -> 0.00 | Hurt |
| add oracle CQAs to input | CodeT5-base · CodeClarQA code generation | Exact Match: 10.84 -> 13.93 | Improved |
| add oracle CQAs to input | PLBART-base · CodeClarQA recall of missing key operations (micro) | recall: 31.08 -> 92.72 | Improved |
| select top-5 ranked CQs and answer them from dataset instead of appending unanswered (ablation) | PLBART-base pipeline · CodeClarQA pipeline | BLEU: 13.20 -> 22.07 | Improved |
| use real pipeline instead of no CQs | PLBART-base · CodeClarQA code generation | BLEU: 24.63 -> 22.07 | Hurt |
| increase number of answered ranked CQs from top-1 to top-5 (ablation) | CodeT5-base pipeline · CodeClarQA pipeline | BLEU: 24.04 -> 26.27 | Improved |
| use BM25 negatives instead of random negatives for CQ ranker (ablation) | BART-base · CodeClarQA CQ ranking | R@10: 34.88 -> 21.44 | Hurt |
| use RoBERTa-base as clarification need predictor | RoBERTa-base · CodeClarQA need prediction | accuracy: 71.49 (BERT) -> 64.94 | Hurt |
| use code/documentation-trained RFLHU-BERTOverflow encoder for missing-operation detection (ablation) | missing-operation identification · CodeClarQA test | F1: 82.86 -> 56.34 | Hurt |
Earlier methods this paper compares with
Named baselines from earlier accepted papers in this paper's results tables: better than 1 of 1 on most shared results.
- CodeT5-base — CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation (EMNLP 2021) · better on 3 of 3 shared results
Matched by method name in results tables read by AI. Authors' own tables tend to favour the newer method, and a comparison can be missed when a method is renamed.
Open problems in controlled text generation
How can generation be controlled and checked reliably across languages, domains and model sizes without extra cost?
- Each study covers one domain, source or task, so transfer is unknown. · 13 papers state it
- Only a few languages are tested, mostly English or high-resource ones. · 12 papers state it
- Extra stages, calls or tokens make generation slower and costlier. · 10 papers state it
Closest papers by meaning
- PythonSaga: Redefining the Benchmark to Evaluate Code Generating LLMs (EMNLP 2024 · similarity 0.88)
- AutoCodeBench: Large Language Models are Automatic Code Benchmark Generators (ICLR 2026 · similarity 0.87)
- DocPrompting: Generating Code by Retrieving the Docs (ICLR 2023 · similarity 0.87)
- Measuring Coding Challenge Competence With APPS (NeurIPS 2021 · similarity 0.87)
- CodeExp: Explanatory Code Document Generation (EMNLP 2022 · similarity 0.86)
- BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructions (ICLR 2025 · similarity 0.85)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.