加入产品上下文后,AI编程助手决策合规率提升49%。
Context-Augmented Code Generation: How Product Context Improves AI Coding Agent Decision Compliance by 49%
- 引入产品上下文检索系统Brief,获取设计决策与用户信号。
- 合规率从46%升至95%,关键在非代码可见的决策上。
- 适合想提升AI编码器工程一致性团队使用。
由大语言模型驱动的AI编程助手可读取代码库并生成功能代码,但常违反仅在源码中不可见的团队特定产品决策。我们构建了一个控制性基准,衡量8个真实软件工程任务中41个加权决策点上的决策合规率。对比仅访问代码库的基线配置(Claude Code)与加入Brief系统(提供规范生成、构建中咨询及决策、用户痛点、客户信号、竞品情报检索)的增强配置,结果表明:在相同提示和代码库下,增强配置达成95%合规率,基线仅为46%,提升49个百分点。逐决策分析显示,基线在代码可见决策上合规率为100%,而在需产品上下文的决策上仅为0-33%,说明产品上下文检索是主要提升因素。我们已公开基准仓库、全部16个合并请求及评分工具以供复现。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。