How LinkedIn Uses AI to Review 40,000 Pull Requests a Week
Software development workflows are evolving as frontier coding agents increasingly automate the process of writing code and opening pull requests. However, human code review remains a major bottleneck due to limited engineering hours. To address this, organizations are adopting AI code reviewers to conduct automated first-pass reviews before humans step in. While full automation remains difficult, partial automation keeps humans in the loop to ensure security and correctness while requiring the AI reviewer to be grounded, high-signal, codebase-aware, and timely. The objective of an AI code reviewer is partial automation, serving as a first-pass review on pull requests before humans conduct their review. Organizations have multiple options for deploying an AI reviewer, balancing ease of setup against flexibility and comment quality control. The three primary implementation paths include utilizing a vendor-provided tool, using an off-the-shelf model customized with proprietary rules, or developing a custom multi-agent review system. Using a hosted AI code reviewer from a vendor offers a fast and straightforward setup that requires no internal building or specialized expertise. However, this approach suffers from major limitations regarding generic feedback and a lack of control over prompt and model updates. LinkedIn tested this method during an AI-native pilot, but engineers found the comments noisy and ill-suited to their codebase, ultimately leading them to opt out. Consequently, losing control over the system eroded engineer trust and failed to replace manual code reviews.
Read the original ↗Contents
- 01What Is an AI Code Reviewer?
- 02How to Build an AI Code Reviewer
- 03Direction 1: Use a vendor’s reviewer
- 04Direction 2: Use an off-the-shelf model with your rules
- 05Direction 3: Build a custom multi-agent review system
- 06How to Evaluate an AI Code Reviewer
- 07Eval before a release
- 08Eval in production
- 09What’s Next
- 10References
What Is an AI Code Reviewer?
Software development workflows are evolving as frontier coding agents increasingly automate the process of writing code and opening pull requests. However, human code review remains a major bottleneck due to limited engineering hours. To address this, organizations are adopting AI code reviewers to conduct automated first-pass reviews before humans step in. While full automation remains difficult, partial automation keeps humans in the loop to ensure security and correctness while requiring the AI reviewer to be grounded, high-signal, codebase-aware, and timely.
- Frontier coding agents can write features, run tests, and open PRs in minutes, making human review the primary bottleneck in software development.
- AI code reviewers act as an automated first pass, identifying issues on specific lines before human engineers review the code.
- Full automation of code reviews—where AI approves and merges PRs independently—remains out of reach for most engineering organizations.
- Partial automation keeps human engineers in the loop for final approvals, mitigating the risk of merging buggy or insecure code.
- A reliable AI code reviewer must satisfy four key criteria: groundedness, high signal quality, codebase awareness, and timeliness.
- LinkedIn uses a partially automated AI code reviewer that was developed across multiple iterations.
How to Build an AI Code Reviewer
The objective of an AI code reviewer is partial automation, serving as a first-pass review on pull requests before humans conduct their review. Organizations have multiple options for deploying an AI reviewer, balancing ease of setup against flexibility and comment quality control. The three primary implementation paths include utilizing a vendor-provided tool, using an off-the-shelf model customized with proprietary rules, or developing a custom multi-agent review system.
- AI code review is designed for partial automation to precede, rather than replace, human pull request reviews.
- Implementation choices involve a trade-off between ease of setup and control over review comment quality.
- Adopting a vendor's reviewer offers easier deployment but less flexibility.
- Using an off-the-shelf model combined with custom rules provides an intermediate approach.
- Building a custom multi-agent review system requires more effort but yields maximum control over comment quality.
Direction 1: Use a vendor’s reviewer
Using a hosted AI code reviewer from a vendor offers a fast and straightforward setup that requires no internal building or specialized expertise. However, this approach suffers from major limitations regarding generic feedback and a lack of control over prompt and model updates. LinkedIn tested this method during an AI-native pilot, but engineers found the comments noisy and ill-suited to their codebase, ultimately leading them to opt out. Consequently, losing control over the system eroded engineer trust and failed to replace manual code reviews.
- Purchasing a hosted vendor AI reviewer connects directly to the code host and is the fastest setup option requiring no internal expertise.
- Vendor-hosted reviewers produce generic feedback because the vendor controls the underlying prompts and harness, despite user-provided rule files.
- Organizations lack control over vendor updates, preventing them from pre-testing model changes or executing gradual rollouts.
- LinkedIn piloted a vendor's hosted AI reviewer across teams, but the resulting comments were noisy and failed to match repository-specific rules.
- Due to noisy feedback and lack of system ownership, LinkedIn engineers opted out, reverting the process back to full manual reviews.
Direction 2: Use an off-the-shelf model with your rules
Building a custom harness around an off-the-shelf model enables teams to enforce codebase-specific rules and receive fast feedback before human code review. However, relying on a single model introduces severe issues with unverified hallucinations, such as reporting nonexistent problems or attaching comments to incorrect line numbers. Furthermore, knowledge gaps tied to training data cause the model to miss out-of-distribution issues and over-flag low-value patterns. LinkedIn faced these exact challenges in practice, leading them to explore multi-agent architectures where a second model verifies the first.
- Custom harnesses allow engineering teams to inject repository-specific guidelines into prompts for off-the-shelf models.
- Single-model code reviewers fail to catch hallucinations, leading to fictitious bug reports and incorrect diff line references.
- Knowledge gaps cause models to repeatedly overlook out-of-distribution issues while over-flagging repetitive, low-value issues.
- LinkedIn encountered significant line-number mismatches and hallucinations when deploying repository-specific review rules.
- Switching to an alternative single model did not resolve hallucinations at LinkedIn, inspiring a transition toward multi-agent verification designs.
Direction 3: Build a custom multi-agent review system
Building a custom multi-agent review system uses an orchestrator-subagent pattern to produce grounded, high-confidence automated code reviews. Independent subagents review a pull request in parallel using different models and layered rules—spanning company, repository, and PR scopes—preventing bias from cross-agent influence. The orchestrator then merges overlapping findings through line-range checks and LLM semantic comparison, ranking agreed-upon issues higher. Finally, findings raised by only a single agent are verified by another model to filter out hallucinations while preserving valid edge-case detections before posting.
- The orchestrator-subagent design pattern deploys independent subagents with different models to cover each other's knowledge gaps.
- Rules and conventions can be structured in a three-tier layered design: company-wide rules, repository rules, and pull-request-specific rules.
- Subagents review PR diffs in parallel without visibility into each other's findings, making mutual agreement an indicator of high confidence.
- Merging duplicates is handled in two stages: a deterministic check on overlapping line numbers followed by an LLM-based semantic deduplication.
- Single-agent findings undergo verification by a different model to separate real missed bugs from hallucinations before filtering low-confidence or cosmetic comments.
How to Evaluate an AI Code Reviewer
Teams maintaining an AI reviewer system regularly modify it by swapping models, editing prompts, or altering the harness. To verify whether updates improve system quality, teams rely on evaluations, which are repeatable quality tests. These evaluations take place in two primary stages: prior to releasing a change and in production after code merges.
- AI reviewer systems are frequently updated through model swaps, prompt changes, or harness adjustments.
- Evaluations (evals) are repeatable tests designed to assess an AI reviewer's quality.
- Running evals determines whether an update actually improves an AI reviewer.
- AI reviewer evaluation spans two distinct phases: before release and in production post-merge.
Eval before a release
Before shipping changes to AI-assisted code review systems, candidates must be evaluated against production versions using LLM judges or golden datasets. An LLM judge scores candidate reviews against production reviews using a fixed rubric, offering a cheap evaluation method that does not require human labels. However, because LLM judges cannot reliably determine factual correctness, teams also construct golden datasets from human-labeled pull requests to measure precision and recall. LinkedIn exemplifies this dual approach by pairing a six-criteria LLM-as-a-judge rubric with a dedicated human-labeled golden dataset.
- Evaluating model or prompt candidates before release typically involves comparing outputs on identical pull requests.
- LLM-as-a-judge enables cost-effective comparative scoring without human labels, provided a structured rubric is used.
- LinkedIn evaluates all prompt, model, and harness updates using an LLM judge based on six weighted yes-or-no criteria.
- LLM judges excel at relative comparison but cannot reliably determine whether specific review comments are factually correct.
- Golden datasets generated from human-labeled pull requests enable standard precision and recall evaluations.
- LinkedIn is developing an evaluation framework based on a golden dataset to complement its LLM-as-a-judge process.
Eval in production
Pre-release evaluations on fixed datasets are insufficient to gauge how an AI code reviewer performs on thousands of real pull requests. Production evaluation relies on tracking meaningful metrics and implementing a feedback loop that translates data into actionable system improvements. For example, LinkedIn evaluates its AI reviewer by tracking code acceptance rates, defined as whether code actually changed due to a comment, achieving an overall 63.9% acceptance rate. Running daily acceptance checks enables teams to generate trend reports and continuously tune prompts and rules over time.
- Production evaluation of AI code reviewers requires meaningful metrics and a feedback loop to turn measurements into fixes.
- Code acceptance rate—confirming code actually changed due to a comment—is far more informative than noisy emoji reactions.
- LinkedIn's production AI reviewer achieved a 63.9% overall acceptance rate, reaching 80% on logic errors and 100% on concurrency bugs and dead code.
- LinkedIn runs acceptance checks daily to produce trend reports that inform which prompts to alter and which rules to disable.
- Pre-release evaluations verify safety to ship, whereas production feedback loops drive continuous system improvement.
What’s Next
Balaji highlights software quality confidence as the next major bottleneck following code review, arguing that reviews will stay a bottleneck until automated validation is adopted. Since deploying, monitoring, and incident mitigation require more effort than development, LinkedIn is directing AI tools toward those operational phases. Faster code delivery also elevates the risk of production failures without robust safeguards. To address this, LinkedIn is introducing a risk heat map feature to its AI reviewer to help engineers prioritize inspecting the riskiest diff sections.
- Review will remain a bottleneck until automated validation is implemented to ensure overall software quality.
- Deploying, monitoring, and handling incidents take more effort than code development, prompting LinkedIn to develop AI tools for these stages.
- Accelerated code delivery increases the risk of breaking production environments.
- LinkedIn is planning an optional 'risk heat map' feature for its AI reviewer to score and prioritize diff regions by predicted risk.
References
This section compiles reference material and citations relevant to AI engineering and evaluation. It lists industrial blog posts and academic publications covering topics such as large-scale AI code review, multi-agent systems, and benchmark evaluation methodologies. Specifically, the references cite engineering work from LinkedIn, GitHub, and Anthropic, alongside the foundational paper on LLM-as-a-judge using MT-Bench and Chatbot Arena.
- LinkedIn published an engineering blog on high-signal AI code review that adapts to codebases at scale.
- GitHub detailed reaching milestone numbers with 60 million Copilot code reviews.
- Anthropic shared engineering details on the construction of its multi-agent research system.
- The academic paper 'Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena' provides research on benchmarking large language models.