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

哲学倾向作为AI辅助代码评审的行为约束:一项实证研究

Philosophical Dispositions as Behavioral Constraints for AI-Assisted Code Review: An Empirical Study

Salesforce, Inc.(Salesforce公司)

Kaushal Bansal

AI总结:

提出一种通过哲学倾向约束AI评审者行为的系统,在7个代码库上评估,发现其与人类评审者46%一致,75%发现独特,且无假阳性。

摘要:

AI辅助代码评审工具通常作为通用的“专家评审者”代理运行,无论需要何种分析类型,都会产生同质化的发现。我们提出一个系统,通过哲学倾向——基于特定认识论传统(皮浪怀疑论、新正理逻辑、第欧根尼犬儒主义、儒家关系伦理)的连贯人格视角,将注意力引导到结构上不同类型的问题上——来约束AI评审者行为。每种倾向通过否定方式定义(即拒绝做什么),配备自我监控的失败模式(hamartia),并通过角色协议按顺序编排。我们在跨越5种编程语言(Python、Go、C++、Java、Terraform)、5个组织(2个企业、3个开源)和2个时间时代(AI前2020年、AI后2024-2026年)的7个代码库的50个合并拉取请求上评估该系统。该倾向系统与人类评审者达到46%的一致性(验证信号质量),以75%的比率识别出独特发现,并且在总共601个发现中,没有发现被作者判定为假阳性(未评估评分者间一致性,这仍是一个局限)。受控基线比较表明,51%的倾向发现是同一模型使用通用“专家评审者”提示不会产生的,这些独特发现针对结构、操作和逻辑问题,而非标准代码级别问题。初步跨模型验证(Claude Opus vs. GPT Codex 5.3-xhigh)在3个PR上显示100%的框架结构遵循度和39%的发现级别一致性,表明该框架在保持模型特定分析视角的同时提供了真正的行为约束。

英文摘要:

AI-assisted code review tools typically operate as generic "expert reviewer" agents, producing homogeneous findings regardless of the analysis type needed. We present a system that constrains AI reviewer behavior through philosophical dispositions -- coherent personality lenses grounded in specific epistemological traditions (Pyrrhonist Skepticism, Navya-Ny=aya logic, Diogenes' Cynicism, Confucian relational ethics) that direct attention to structurally different types of issues. Each disposition is defined apophatically (by what it refuses to do), equipped with a self-monitoring failure mode (hamartia), and orchestrated in sequence by role protocols. We evaluate this system on 50 merged pull requests across 7 repositories spanning 5 programming languages (Python, Go, C++, Java, Terraform), 5 organizations (2 enterprise, 3 open-source), and 2 temporal eras (pre-AI 2020, post-AI 2024--2026). The disposition system achieves 46% convergence with human reviewers (validating signal quality), identifies unique findings at a 75% rate, and produces no findings judged false-positive by the author across 601 total findings (inter-rater agreement was not assessed and remains a limitation). A controlled baseline comparison demonstrates that 51% of disposition findings are not produced by the same model using generic "expert reviewer" prompting, and these unique findings target structural, operational, and logical concerns rather than standard code-level issues. Preliminary cross-model validation (Claude Opus vs.\ GPT Codex 5.3-xhigh) on 3 PRs shows 100% framework-structure adherence with 39% finding-level agreement, suggesting the framework provides real behavioral constraint while preserving model-specific analytical perspective.

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

↑