Metraipolis › archive › dc_24e1efa40a92

CONTRA: Discovering and Qualifying Behavior-Changing Questions for Selective Clarification in LLM Code Generation — arXiv:2610.01769

Source
arXiv
Original
https://arxiv.org/abs/2610.01769
License (as archived)
CC0-1.0
Archived
2026-10-05T22:49:49.351Z
SHA-256 of the archived text
6c1dafd276a67f6f1e2018fc6f2183cd14f57fb850959f28ad025385aeacbd7d
Stable URL of this page
https://metraipolis.com/documento/dc_24e1efa40a92

How to cite

CONTRA: Discovering and Qualifying Behavior-Changing Questions for Selective Clarification in LLM Code Generation — arXiv:2610.01769 — arXiv, https://arxiv.org/abs/2610.01769 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_24e1efa40a92 (Metraipolis archive dc_24e1efa40a92, sha256 6c1dafd276a67f6f1e2018fc6f2183cd14f57fb850959f28ad025385aeacbd7d)
BibTeX
@misc{dc24e1efa40a92,
  title = {CONTRA: Discovering and Qualifying Behavior-Changing Questions for Selective Clarification in LLM Code Generation — arXiv:2610.01769},
  howpublished = {arXiv},
  url = {https://arxiv.org/abs/2610.01769},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_24e1efa40a92; sha256 6c1dafd276a67f6f1e2018fc6f2183cd14f57fb850959f28ad025385aeacbd7d},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv, https://arxiv.org/abs/2610.01769. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Coding agents can generate code that appears correct but implements behavior the user never intended. This mismatch can arise when an agent silently resolves underspecified requirements through its own assumptions. As subsequent development builds on these assumptions, correcting the resulting behavior can become increasingly costly. Early clarification can help prevent such mismatches, but unnecessary questions can interrupt developers and slow down development. Existing methods struggle to identify key clarification questions while avoiding unnecessary ones. Therefore, we propose CONTRA, a training-free method that combines broad question discovery with semantic and execution-based question qualification. CONTRA first generates candidate questions and filters out those unrelated to required behavior or already resolved by the requirement. For each remaining question, it generates programs conditioned on two plausible answers and checks for stable behavioral differences on shared inputs. It then uses the interaction history to select among qualified questions or stop asking. Experiments on ClarifyCodeBench show that CONTRA achieves the highest F1 with all four coding agents, exceeding the best baseline macro-average F1 by 13.88 percentage points. With the same LLM and evaluation protocol, CONTRA also achieves higher clarification recall and F1 than the coding harnesses Claude Code and OpenHands. To support practical use, we also implement CONTRA as a Claude Code plugin that integrates selective clarification into everyday development.

Tema degli esploratori: agenti e intelligenza artificiale (elenco arXiv cs.AI, nuovi lavori del giorno).
Categorie arXiv: Software Engineering (cs.SE) ; Artificial Intelligence (cs.AI).
Pagina del lavoro: https://arxiv.org/abs/2610.01769 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-05T22:45:55.724Z dalla pagina https://arxiv.org/list/cs.AI/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).