面向代码审查的 Grounded AI:企业流水线中的资源高效大型模型服务
Grounded AI for Code Review: Resource-Efficient Large-Model Serving in Enterprise Pipelines
AI总结:
针对合规环境中自动化代码审查采用率低的问题,提出一种结合静态分析、AST上下文提取与单GPU服务栈的grounded PR原生审查系统,实现亚分钟级反馈并降低违规率。
摘要:
在合规性要求高的环境中,自动化代码审查的采用率滞后,静态分析器产生大量缺乏理由的输出,而简单直接地使用 LLM 会导致幻觉并增加成本开销。我们提出了一种用于 grounded、PR 原生审查的生产系统,将静态分析结果与 AST 引导的上下文提取以及单 GPU、按需服务栈(量化开放权重模型、多级缓存)相结合,以提供简洁的解释和修复指导。在面向安全的 C/C++ 标准上进行评估,该方法实现了低于一分钟的中位首次反馈(离线 p50 构建+LLM 为 59.8 秒),同时保持了具有竞争力的违规减少率和相较于更大专有模型更低的违规率。该架构是解耦的:团队可以独立采用 grounding/提示层或服务层。一项小型内部调查(n=8)提供了减少分类工作量和适度感知 grounding 的方向性信号,参与者报告人工审查迭代次数减少。我们概述了运营经验和局限性,强调了可复现性、可审计性以及向更广泛标准和辅助补丁的路径。
英文摘要:
Automated code review adoption lags in compliance-heavy settings, where static analyzers produce high-volume, low-rationale outputs, and naive LLM use risks hallucination and incurring cost overhead. We present a production system for grounded, PR-native review that pairs static-analysis findings with AST-guided context extraction and a single-GPU, on-demand serving stack (quantized open-weight model, multi-tier caching) to deliver concise explanations and remediation guidance. Evaluated on safety-oriented C/C++ standards, the approach achieves sub-minute median first-feedback (offline p50 build+LLM 59.8s) while maintaining competitive violation reduction and lower violation rates versus larger proprietary models. The architecture is decoupled: teams can adopt the grounding/prompting layer or the serving layer independently. A small internal survey (n=8) provides directional signals of reduced triage effort and moderate perceived grounding, with participants reporting fewer human review iterations. We outline operational lessons and limitations, emphasizing reproducibility, auditability, and pathways to broader standards and assisted patching.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。