✨ 涂阿燃 · 前端与智能体工程师 · 技术作者 · 社区 KOL,粉丝 5 万+,内容月曝光百万+ 📚 持续出版多部技术作品,深度参与开源社区与智能体工程实践,全面拥抱 AI 与去中心化。 🔗 更多请关注个人网络日志;推广合作在博主联盟。
文章首发链接:2aran.com/s/IybRzRz
智能体每天都在写出更多代码,而每个 pull request 在合并前仍然需要审查。人已经读不过来不断增长的体量,所以团队开始借 AI 来帮忙。
不过,AI 审查得跨过一道很难的门槛。真缺陷漏了,没人会相信它的沉默;真缺陷被误报埋住,也没人会去读它的评论。
两头都要做好,意味着既要找到能动手修的缺陷,又要把误报压住,同时还得把延迟和成本控制住。我们发现,在价格固定时,用几个更小、彼此独立、模型互补的审查者,往往比用一个更强模型撑起来的单个审查者表现更好。我们用这个想法重建了 Copilot 代码审查的 Lite 和 Balanced 档,并为利害关系最大的那些 pull request 推出了新的 Max 档。为什么这样做有效、多路审查者的发现如何收成一份审查,以及各档怎样据此重建,都可以从后面几节里看清楚。
为什么有效?一个简单的例子
设想一个审查智能体,提示、模型和工具集都固定。假设它在某个 pull request 里标出某一个缺陷的概率是 60%。它可能这一轮抓到,下一轮又漏掉。
如果让这个审查者独立、并行地跑两次,至少有一次找到该缺陷的概率会升到 84%,成本则翻倍。独立跑三次,概率升到 94%,成本变成三倍。
更一般地说,如果每个审查者找到某个缺陷的概率是 p,那么 n 个独立审查者里至少有一个找到它的概率是 1 − (1 − p)^ n。在我们的例子里,p = 0.6。关键在于:只要有一个审查者找到这个缺陷就够了。
多跑几个审查者,时间上也有代价。审查耗时可能会轻度增加,因为得等最慢的那个跑完。
同模型审查和混模型审查
把同一个审查者反复跑,只能走到这一步。第三次之后,收益就开始递减。
每个模型还会带着训练带来的偏向。有些缺陷,对某个模型来说始终很难标出来,再审多少遍同一个 pull request 也一样。模型在审查代码时各有所长,也各有特定的盲区。
为了说明这一点,我们用 ReviewBench 测量了 GPT-6.1 Sol(高推理力度)、Claude Opus 5.5(高推理力度)以及两者组合能找到的关键缺陷百分比。关于 ReviewBench,可以看我们更早的一篇博文。
下图里,虚线是在各个价位点上,反复跑 GPT-6.1 Sol 或 Claude Opus 5.5,能找到的关键缺陷的最高百分比。实线是把两个模型组合起来后的最高百分比。
实线始终不低于虚线,因为组合方案也可以只包含单模型那个选项。真正要紧的是两条线之间的空隙,它标出了混用模型还能再提升多少。在每个 pull request 花费 3 美元时,把这两个模型组合起来,ReviewBench 上抓到的关键缺陷比例提高了 4.9 个百分点,从 61.3% 升到 66.2%。
Copilot 代码审查可以调用不同提供方的模型,因此不会被锁在某一个模型家族的长处和盲区里。这种灵活性能让我们在给定价位点上,选出表现最好、又彼此互补的审查者。
收成一份连贯的审查
两个独立审查者看同一段代码,可能会找到一些相同的缺陷,也可能各自找到对方漏掉的问题。为了降低噪音、避免同一问题被报告好几次,我们会把他们的发现收成一份连贯的审查。也就是对发现去重,并去掉误报。
Copilot 代码审查用了两种策略:投票,和智能体汇总(agentic aggregation)。
- 投票会先把所有审查者的发现去重,再数每个发现被多少个审查者标出。票数低于设定阈值的发现会被压住,依据是票少意味着把握更低。投票又快又省,因为去重只需单次 LLM 调用。
- 智能体汇总则让一个智能体把所有审查者的发现调和成一份审查。它可以整理和打磨发现、处理分歧,并再核一遍每条发现是否准确。代价是审查更久、也更贵。
来看一个例子。这个 pull request 改的是 src/catalog/service.py,一个 Python 文件:
from catalog import cache, repository as repo
CACHE_TTL_SECONDS = 60
def get_product(product_id):
cached = cache.get(product_id)
if cached is not None:
return cached
product = repo.find(product_id)
if product is not None:
cache.put(
product_id,
product,
ttl_ms=CACHE_TTL_SECONDS,
)
return product
def rename_product(product_id, name):
repo.rename(product_id, name)
三个独立审查者看过这些改动,给出这些发现:
前两条是真正的问题。缓存期望的过期时间单位是毫秒,而给产品改名只更新了数据库,缓存里的快照还是旧的。再仔细看一眼这个 pull request 没有改动的 src/api/products.py,第三条发现就是另一回事了:
from catalog.service import get_product
def product_endpoint(product_id):
product = get_product(product_id)
if product is None:
return 404, {"error": "Not found"}
return 200, {"name": product["name"]}
已有的防护会在产品不存在时返回 404,所以第三条是误报。现在看一下,如果我们调整投票阈值——也就是一条问题要被多少个审查者标出,我们才会展示它——会发生什么:
阈值设为 1 票时,我们标出两个真缺陷和一条误报。把阈值提到 2,误报没了,只留下真缺陷,精确率上升。提到 3,会丢掉其中一个真缺陷,召回率下降。
投票给了我们一种便宜、快速、也简单的整理办法。难处在于阈值怎么选,不同 pull request 之间可能不一样。智能体汇总则可以让一个更强的模型逐条检查发现、去掉误报,并把低严重度的细枝末节滤掉。在这个例子里,如果汇总者去查了 src/api/products.py,就可以丢掉那条误报、留下两个真缺陷,代价是审查更长、也更贵。
投票奖励一致、控制噪音,在成本和延迟都很紧的时候很有用。智能体汇总更贵,在我们的实验里,产出的发现质量也更高。
新的审查档位
我们用独立、互补的审查者和汇总机制,重建了原有的 Lite 和 Balanced,并推出了新的 Max。从高处看,各档用这些智能体来审查你的 pull request:
- Lite:4× GPT-5.6 Luna 审查者,用投票合并。
- Balanced:3× GPT-6.1 Sol 审查者,由 GPT-6 Astra 做智能体汇总。
- Max:4× GPT-6.1 Sol、2× Claude Opus 5.5 和 2× GPT-6 Astra 审查者,由 GPT-6.1 Sol 做智能体汇总。
三个档位的初始配置,我们都用 ReviewBench 来开发和迭代。这是一个面向代码审查智能体的基准,建立在有代表性的 GitHub pull request 以及与生产对齐的指标上。随后我们又在内部和外部流量上跑了多轮在线实验。
我们怎么衡量
- 在线实验:设计和打磨 Lite、Balanced 的在线实验,总共涉及 140 万个 pull request,其中也包括外部的,时间是 9 月 16 日到 10 月 7 日。设计和测试 Max 时,用了 10 月 2 日到 7 日 GitHub 和 Microsoft 内部的 3 万次审查。
- 严重度:每条发现会由另一个智能体按量表标成 critical、moderate 或 low。critical 评论指合并前就该修好的具体问题;moderate 会影响行为,但不太可能造成严重伤害;low 则是可以放心往后放的小改进。
- 精确率(Precision):发现里真正是问题的比例。
- 召回率(Recall):真正的问题里,被 Copilot 代码审查找到的比例。我们在审查时估计这项指标:看其他智能体或人指出的评论和问题,再跟 Copilot 代码审查标出的对照。
- 被采纳 / 被忽略 / 误报(Addressed / Ignored / False positive):跟严重度一样,我们也另有一个智能体检查一条评论是被采纳了还是被忽略了。被采纳,指 pull request 合并时这个问题已经被修好;被忽略,指用户没有采取行动。误报,指用户明确表示这条评论不正确或无效。
最终档位配置在线上的表现如下:
说明:F1 分数是精确率和召回率的调和平均,ReviewBench 在离线环境里用它来给审查智能体排序。
覆盖面和质量差在哪里?
先按严重度拆开,比较各档每次审查的平均发现数:
Max 的覆盖最广,尤其是关键问题,这也正是我们想要的。Lite 和 Balanced 每次审查的发现总数相近,Lite 找出的关键问题和低严重度问题更多。Balanced 找到的问题比 Lite 少,但更值得修的更多。
下图给出各档中,开发者对关键问题和中等问题的发现,有多少被采纳、被忽略,或被判定为误报:
合在一起,这就成了三个各有分工的档位。从 Lite 到 Balanced 再到 Max,开发者会对更多发现采取行动。因此 Lite 更适合迭代时的频繁审查,临近收尾再切到 Balanced 和 Max。
各档要花多少钱?
每一档都对准一个特定的价格和质量区间,目标成本大致一档比上一档高 6×。Lite 是为迭代时的频繁审查设计的。Max 是为合并前的一次彻底检查设计的。
Balanced 夹在中间,处在快速迭代和终审之间。
Max 对你的要求也更多。它每次审查大约留下两条发现,Lite 和 Balanced 大约是 1.1 到 1.2 条,所以要读的东西更多。用在漏掉一个缺陷通常会比这次审查更贵的地方,才划算。
各档要花多久?
审查时间同样要紧。有时你在开发中需要快速反馈。有时正确和彻底比速度更重要。
Lite 和 Balanced 通常大约 4 分钟就能结束。Max 的中位数大约是 12 分钟,第 90 百分位可能到 20 分钟,所以更适合做最后一遍。
只是一个起点
这些是各档目前所处位置的一张快照。随着新模型出现、我们的方法改进,我们会在各自的价格区间里,把每一档更新到我们能做到的最好表现。
下一步:让审查力度跟改动匹配
每一档用的工具和审查提示都相同。档位决定 Copilot 代码审查会看得有多用力。仓库的上下文决定它知道该找什么,包括团队约定、你们允许的例外,以及审查者反复抓住的那些错误。
一个 pull request 的不同部分,也可能需要不同程度的关注。有的地方可能需要前沿模型,另一些地方用更小的模型就够了。我们正在做动态代码审查:从一份审查人设名单里,把审查者派到 pull request 的特定部分,并按它的需要来裁剪审查。
目标仍然是一份有用的审查:多一些抓住重要问题的机会,又不必把整理发现的活儿交回给你。
下一次做利害关系很大的 pull request 时,可以试试 Max。
致谢
感谢 GitHub 和 Microsoft 里科学、工程和产品团队的各位,是你们让这些新档位成为现实。
来源
- 原创:2aran.com/s/IybRzRz
- 转译原文:Alejandro Carderera de Diego、Timothée Defoin,More agents, fewer blind spots: Inside GitHub Copilot code review,github.blog/ai-and-ml/g… ,2026-11-30,GitHub Blog。
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
✨ Tu Aran · Frontend & AI Agent Engineer · Technical Author · Community KOL, 50,000+ followers, 1M+ monthly content impressions 📚 Continuously publishing multiple technical works, deeply involved in open-source communities and AI agent engineering practice, fully embracing AI and decentralization. 🔗 For more, follow my personal web log; for promotional partnerships, visit the Blogger Alliance.
First published at: 2aran.com/s/IybRzRz
AI agents are writing more code every day, and every pull request still needs review before merging. Humans can't keep up with the growing volume, so teams have started turning to AI for help.
However, AI review has to clear a very high bar. If it misses real defects, no one will trust its silence; if real defects get buried under false positives, no one will bother reading its comments.
Doing both well means finding defects that are actually actionable while keeping false positives down, all while managing latency and cost. We found that, at a fixed price point, using several smaller, independent, model-complementary reviewers often outperforms a single reviewer powered by one stronger model. We rebuilt the Lite and Balanced tiers of Copilot code review using this approach, and introduced a new Max tier for the pull requests where the stakes are highest. Why this works, how findings from multiple reviewers are aggregated into a single review, and how each tier was rebuilt accordingly—all of that is covered in the sections below.
Why It Works? A Simple Example
Imagine a review AI agent with a fixed prompt, model, and toolset. Suppose the probability that it flags a particular defect in a given pull request is 60%. It might catch it in one run and miss it in the next.
If you run this reviewer independently and in parallel twice, the probability of at least one run catching the defect rises to 84%, and the cost doubles. Run it three times independently, and the probability climbs to 94%, with the cost tripling.
More generally, if the probability that any single reviewer catches a given defect is p, then the probability that at least one of n independent reviewers catches it is 1 − (1 − p)^n. In our example, p = 0.6. The key point is: it's enough for just one reviewer to find the defect.
Running extra reviewers also carries a time cost. Review duration may increase slightly, since you have to wait for the slowest one to finish.
Same-Model Review vs. Mixed-Model Review
Running the same reviewer repeatedly only gets you so far. After the third run, the gains start to diminish.
Each model also carries biases from its training. Some defects are inherently hard for a given model to flag, no matter how many times it reviews the same pull request. Models each have their own strengths and specific blind spots when reviewing code.
To illustrate this, we used ReviewBench to measure the percentage of critical defects found by GPT-6.1 Sol (high reasoning effort), Claude Opus 5.5 (high reasoning effort), and a combination of both. For more on ReviewBench, see our earlier blog post.
In the figure below, the dashed line shows the maximum percentage of critical defects findable by repeatedly running GPT-6.1 Sol or Claude Opus 5.5 at various price points. The solid line shows the maximum percentage when the two models are combined.
The solid line is always at or above the dashed line, because the combined approach can simply include the single-model option. What really matters is the gap between the two lines, which marks how much additional improvement can be gained by mixing models. At $3 per pull request, combining the two models improved the percentage of critical defects caught on ReviewBench by 4.9 percentage points, from 61.3% to 66.2%.
Copilot code review can call models from different providers, so it isn't locked into the strengths and blind spots of any single model family. This flexibility lets us pick, at a given price point, the reviewers that perform best and are mutually complementary.
Aggregating into a Cohesive Review
Two independent reviewers looking at the same code may find some of the same defects, or each may find issues the other missed. To reduce noise and avoid reporting the same issue multiple times, we aggregate their findings into a single cohesive review. This means deduplicating findings and removing false positives.
Copilot code review uses two strategies: voting, and AI agent aggregation (agentic aggregation).
- Voting first deduplicates all reviewers' findings, then counts how many reviewers flagged each finding. Findings with votes below a set threshold are suppressed, on the rationale that fewer votes mean lower confidence. Voting is fast and cheap, since deduplication requires only a single LLM call.
- AI agent aggregation, on the other hand, has an AI agent reconcile all reviewers' findings into a single review. It can organize and polish the findings, resolve disagreements, and double-check that each finding is accurate. The trade-off is that the review takes longer and costs more.
Here's an example. This pull request modifies src/catalog/service.py, a Python file:
from catalog import cache, repository as repo
CACHE_TTL_SECONDS = 60
def get_product(product_id):
cached = cache.get(product_id)
if cached is not None:
return cached
product = repo.find(product_id)
if product is not None:
cache.put(
product_id,
product,
ttl_ms=CACHE_TTL_SECONDS,
)
return product
def rename_product(product_id, name):
repo.rename(product_id, name)
Three independent reviewers looked at these changes and flagged the following findings:
The first two are real issues. The cache expects the TTL in milliseconds, but renaming a product only updates the database—the snapshot in the cache is still stale. Take a closer look at src/api/products.py, which this pull request did not modify, and the third finding tells a different story:
from catalog.service import get_product
def product_endpoint(product_id):
product = get_product(product_id)
if product is None:
return 404, {"error": "Not found"}
return 200, {"name": product["name"]}
The existing guard already returns a 404 when the product does not exist, so the third finding is a false positive. Now let's see what happens if we adjust the voting threshold—the number of reviewers that must flag an issue before we surface it:
At a threshold of 1 vote, we surface two true defects and one false positive. Raise it to 2 and the false positive disappears, leaving only true defects—precision goes up. Raise it to 3 and one of the true defects is lost, and recall drops.
Voting gives us a cheap, fast, and simple way to clean things up. The hard part is choosing the right threshold, which may differ from one pull request to the next. AI agent aggregation, on the other hand, lets a stronger model check each finding individually, remove false positives, and filter out low-severity nits. In this example, if the aggregator goes and checks src/api/products.py, it can drop the false positive and keep the two true defects—at the cost of a longer, more expensive review.
Voting rewards consensus and controls noise, making it useful when both cost and latency are tight. AI agent aggregation is more expensive, but in our experiments it produced higher-quality findings.
New review tiers
We rebuilt the original Lite and Balanced tiers using independent, complementary reviewers and aggregation mechanisms, and introduced a new Max tier. At a high level, here are the AI agents each tier uses to review your pull request:
- Lite: 4× GPT-5.6 Luna reviewers, merged via voting.
- Balanced: 3× GPT-6.1 Sol reviewers, with AI agent aggregation by GPT-6 Astra.
- Max: 4× GPT-6.1 Sol, 2× Claude Opus 5.5, and 2× GPT-6 Astra reviewers, with AI agent aggregation by GPT-6.1 Sol.
For the initial configuration of all three tiers, we developed and iterated using ReviewBench, a benchmark for code review AI agents built on representative GitHub pull requests and metrics aligned with production. We then ran multiple rounds of online experiments on both internal and external traffic.
How we measure
- Online experiments: We designed and polished the online experiments for Lite and Balanced, covering a total of 1.4 million pull requests, including external ones, from September 16 to October 7. When designing and testing Max, we used 30,000 reviews from GitHub and Microsoft internal traffic between October 2 and 7.
- Severity: Each finding is labeled by a separate AI agent on a scale of critical, moderate, or low. A critical comment refers to a specific issue that should be fixed before merging; moderate affects behavior but is unlikely to cause serious harm; low is a minor improvement that can safely wait.
- Precision: The proportion of findings that are actual issues.
- Recall: The proportion of actual issues found by Copilot Code Review. We estimate this metric during review by looking at comments and issues flagged by other AI agents or humans, then comparing them against what Copilot Code Review surfaced.
- Addressed / Ignored / False positive: Just as with severity, we have a separate AI agent that checks whether a comment was addressed or ignored. Addressed means the issue had been fixed by the time the pull request was merged; Ignored means the user took no action. False positive means the user explicitly stated that the comment is incorrect or invalid.
The final tier configurations performed online as follows:
Note: The F1 score is the harmonic mean of precision and recall. ReviewBench uses it in an offline environment to rank review AI agents.
Where do coverage and quality differ?
First, breaking down by severity, here is the average number of findings per review for each tier:
Max has the broadest coverage, especially for critical issues, which is exactly what we want. Lite and Balanced have similar total numbers of findings per review, but Lite surfaces more critical and low-severity issues. Balanced finds fewer issues than Lite, but more of them are worth fixing.
The figure below shows, for each tier, how many findings on critical and medium issues developers addressed, ignored, or flagged as false positives:
Taken together, this yields three tiers with distinct roles. Moving from Lite to Balanced to Max, developers act on more findings. So Lite is better suited for frequent reviews during iteration, and you switch to Balanced and Max as you approach the final stage.
What does each tier cost?
Each tier targets a specific price-and-quality band, with target cost roughly 6× higher per tier than the one below it. Lite is designed for frequent reviews during iteration. Max is designed for a thorough pre-merge check.
Balanced sits in the middle, between rapid iteration and final review.
Max also demands more of you. It leaves roughly two findings per review, while Lite and Balanced average about 1.1 to 1.2, so there is more to read. It is worth it where missing a defect would typically cost more than the review itself.
How long does each tier take?
Review time matters just as much. Sometimes you need fast feedback during development. Sometimes correctness and thoroughness matter more than speed.
Lite and Balanced typically finish in about 4 minutes. Max's median is around 12 minutes, and the 90th percentile can reach 20 minutes, making it better suited as a final pass.
Just a starting point
These are a snapshot of where each tier stands today. As new models emerge and our methods improve, we will update each tier to the best performance we can achieve within its price band.
Next step: Matching review intensity to the size of the change
Every tier uses the same tools and review prompts. The tier determines how hard Copilot code review looks. The repository's context determines what it knows to look for, including team conventions, exceptions you allow, and the mistakes reviewers keep catching.
Different parts of a pull request may also need different levels of attention. Some areas may benefit from frontier models, while others are fine with smaller models. We are building dynamic code review: assigning reviewers from a roster of review personas to specific sections of the pull request, tailoring the review to what each section needs.
The goal remains a useful review: more chances to catch important issues, without handing the work of organizing findings back to you.
The next time you work on a high-stakes pull request, try Max.
Acknowledgments
Thanks to the science, engineering, and product teams at GitHub and Microsoft for making these new tiers a reality.
Sources
- Original: 2aran.com/s/IybRzRz
- Translated from: Alejandro Carderera de Diego, Timothée Defoin, More agents, fewer blind spots: Inside GitHub Copilot code review, GitHub.blog/ai-and-ml/g…, 2026-11-30, GitHub Blog.
Auto-fetched and translated by AI Atlas. All rights belong to the original author.