arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2605.08112cs.SEcs.AIcs.CEcs.LGcs.LO
收藏

上下文增强的代码生成:产品上下文如何通过49%提高AI编码代理的决策合规性

Context-Augmented Code Generation: How Product Context Improves AI Coding Agent Decision Compliance by 49%

Brief(简述)

Drew Dillon, Kasyap Varanasi

AI总结:

本文提出一个衡量决策合规性的基准,通过产品上下文检索系统提升AI编码代理的决策合规性,实验结果显示合规率从46%提升至95%。

摘要:

基于大型语言模型的AI编码代理能够阅读代码库并生成功能性代码,但它们经常违反团队特定的产品决策,这些决策在源代码中不可见。我们引入了一个受控基准,测量决策合规性,即AI编码代理在8个现实软件工程任务中遵循已确立的产品、设计和工程决策的比率,包含41个加权决策点。我们比较了基线配置(仅代码库访问的Claude Code)与增强配置,后者添加了Brief,一个提供规范生成、中期构建咨询和记录决策检索的产品上下文检索系统。在相同的提示和相同仓库上,增强配置实现了95%的决策合规性,而基线配置仅为46%,提高了49个百分点。对每个决策的分析显示,基线在代码库中可见的决策上达到100%合规性,而在需要产品上下文的决策上为0-33%,表明产品上下文检索是改进的关键驱动力。我们发布了基准仓库、所有16个拉取请求和评分工具,供独立复现。

英文摘要:

AI coding agents powered by large language models can read codebases and produce functional code, but they routinely violate team-specific product decisions that are invisible in the source code alone. We introduce a controlled benchmark measuring decision compliance, the rate at which an AI coding agent follows established product, design, and engineering decisions, across 8 realistic software engineering tasks containing 41 weighted decision points. We compare a baseline configuration (Claude Code with codebase access only) against an augmented configuration that adds Brief, a product-context retrieval system providing spec generation, mid-build consultation, and retrieval of recorded decisions, persona pain points, customer signals, and competitive intelligence. On identical prompts and the same repository, the augmented configuration achieves 95% decision compliance versus 46% for the baseline, a 49 percentage point improvement. Per-decision analysis reveals that the baseline achieves 100% compliance on decisions visible in the codebase and 0-33% on decisions requiring product context, suggesting that product-context retrieval is a key driver of the improvement. We release the benchmark repository, all 16 pull requests, and scoring harness for independent reproduction.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑