Microsoft's internal AI code review assistant covers 90% of 600,000 pull requests per month, cutting PR completion time 10–20%
What began as an internal experiment at Microsoft has scaled to support over 90% of the company's pull requests — more than 600,000 per month — with early data showing a 10–20% median improvement in PR completion time across 5,000 onboarded repositories.
Background
Microsoft's engineering organization processes an enormous volume of pull requests across thousands of repositories and tens of thousands of developers. The traditional PR review workflow created friction: reviewers spent time on low-value feedback (naming, style, minor bugs), while higher-priority concerns (architectural risk, security, complex logic) could be delayed or missed. Some PRs waited days or weeks before merging. Microsoft built a scalable AI reviewer to handle routine review tasks, freeing human reviewers for higher-level analysis.
What Was Implemented
- Deployed an AI code review assistant (PRAssistant) that automatically joins each pull request as a reviewer upon creation
- Generates categorized inline comments (exception handling, null check, sensitive data, etc.) visible in the PR discussion thread
- Offers suggested code changes that authors can accept in one click; changes are attributed to commit history
- Generates a written PR summary describing the intent and key changes of each diff
- Provides a conversational Q&A interface within the PR thread ("Ask the AI") for on-demand code explanation
- Supports repository-specific customization including custom review prompts and team-defined guidelines
- Built in collaboration with Microsoft's Developer Division Data & AI team; learnings fed into GitHub Copilot for Pull Request Reviews (GA April 2025)
Results
The AI code review assistant now covers over 90% of Microsoft's pull requests , representing more than 600,000 PRs per month . A data science study across 5,000 onboarded repositories found 10–20% median improvement in PR completion time . Engineers reported catching bugs earlier, completing PRs sooner, and enforcing consistent best practices. The tool also accelerated onboarding for new developers by providing continuous, contextual feedback on code quality.
Lessons
- Embedding the AI reviewer directly in the existing PR thread — requiring no new UI or separate tooling — was a critical adoption driver at scale.
- Categorizing AI comments by type (security, null handling, etc.) helps authors and reviewers quickly triage and prioritize feedback.
- Preserving human accountability (changes attributed to commit history, humans in control of accepting suggestions) is essential for trust and transparency.
- Internal 1P dogfooding generates actionable product insights that directly shaped a major external product (GitHub Copilot for PR Reviews).
- At scale, even a 10–20% reduction in median PR completion time generates substantial developer-hours savings across 600K monthly PRs.