Enhancing Code Quality at Scale with AI-Powered Code Reviews (opens in new tab)
Microsoft developed an AI-powered pull request reviewer to reduce routine review work, catch defects earlier, and help developers merge code faster. What began as an internal experiment now supports more than 90% of Microsoft’s PRs—over 600,000 per month—and has influenced GitHub’s Copilot for Pull Request Reviews. The central lesson is that AI works best as a human-in-the-loop assistant embedded directly into existing workflows.
Addressing PR Review Bottlenecks
- Human reviewers often spend time on style issues and minor bugs while overlooking architectural or security concerns.
- Large, multi-file PRs can lack sufficient context and may wait days or weeks for review.
- The AI reviewer automatically joins new PRs and handles repetitive or easily missed checks, allowing humans to focus on higher-level decisions.
AI-Powered Review Features
- Automated comments: Flags issues such as missing null checks, error-handling problems, sensitive-data risks, inefficient algorithms, and style inconsistencies.
- Suggested fixes: Provides corrected snippets or alternative implementations, but authors must explicitly review and apply changes. AI does not commit changes automatically.
- PR summaries: Generates descriptions of the change and highlights key modifications across the diff.
- Interactive Q&A: Reviewers can ask questions about parameters, code behavior, or the impact on other modules directly in the PR discussion.
- Workflow integration: The assistant behaves like a normal reviewer, requiring no separate tools or interfaces and optionally engaging as soon as a PR is opened.
Effects on Quality and Development Speed
- AI-assisted reviews reduced median PR completion times by 10–20% in early studies across 5,000 repositories.
- Early feedback reduces waiting time, back-and-forth cycles, and the chance that minor issues delay approval.
- The system has identified bugs such as missing null checks and incorrectly ordered API calls before they reached production.
- Developers, particularly new hires, can use the explanations as continuous guidance on coding standards and best practices.
Team-Specific Customization
- Teams can configure repository-specific review guidelines.
- Custom prompts support specialized checks, including regression detection based on historical crash patterns and validation of deployment or change gates.
- This extensibility allows the reviewer to address concerns beyond generic code quality rules.
Feedback Between Internal and External Products
- Microsoft’s internal deployment provided early feedback on review quality, usability, and developer trust.
- Internal experiments helped shape features such as inline suggestions and human-controlled change application.
- These lessons contributed to GitHub Copilot for Pull Request Reviews, which reached general availability in April 2025.
- Microsoft also uses learnings from GitHub’s broader external adoption to improve its internal development practices, creating an ongoing feedback loop between first-party and third-party products.
Overall, the post recommends treating AI review as an always-available first pass—not a replacement for human judgment. Its greatest value comes from seamless integration, strong customization, and keeping authors and reviewers accountable for final decisions.