arXiv:2508.14114cs.SEcs.AI2025-08中稿 · the Proceedings of…被引 2

让AI识别代码需求中的模糊点并主动问人澄清,生成更准确的代码。

Ambiguity Resolution with Human Feedback for Code Writing Tasks

  • 通过分析需求文本,定位可能产生歧义的具体输入场景。
  • 向人类获取少量反馈,用以修正代码行为以消除歧义。
  • 适合编程教学或需高精度代码生成的场景,提升开发效率。

代码编写任务的需求通常以自然语言描述,容易存在歧义。程序员需具备识别歧义并提出澄清问题的能力。本文提出并评估了一个基于新型技术(ARHF:Ambiguity Resolution with Human Feedback)的原型系统,该系统能够:(1) 建议任务规范中可能存在歧义的具体输入;(2) 仅针对这些输入寻求有限的人类反馈,了解期望的代码行为;(3) 利用这些反馈生成能解决歧义的代码。我们评估了该原型的有效性,并讨论此类辅助系统对计算机科学教育的影响。

原文摘要 · Abstract (English)

Specifications for code writing tasks are usually expressed in natural language and may be ambiguous. Programmers must therefore develop the ability to recognize ambiguities in task specifications and resolve them by asking clarifying questions. We present and evaluate a prototype system, based on a novel technique (ARHF: Ambiguity Resolution with Human Feedback), that (1) suggests specific inputs on which a given task specification may be ambiguous, (2) seeks limited human feedback about the code's desired behavior on those inputs, and (3) uses this feedback to generate code that resolves these ambiguities. We evaluate the efficacy of our prototype, and we discuss the implications of such assistive systems on Computer Science education.

代码生成人机协作自然语言模糊性处理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。