PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/ML System Design/Meta

Design a Code Review Agent

Last updated: May 5, 2026

Quick Overview

This question evaluates a candidate's ability to design ML-powered developer tooling, covering competencies in LLM orchestration, deterministic tool integration, repository context management, code-analysis heuristics, safety and validation strategies, and inference cost estimation.

  • medium
  • Meta
  • ML System Design
  • Software Engineer

Design a Code Review Agent

Company: Meta

Role: Software Engineer

Category: ML System Design

Difficulty: medium

Interview Round: Onsite

Design an AI-powered code review agent that assists developers by reviewing pull requests and producing actionable feedback. The agent should be able to: - Inspect code changes in a pull request. - Understand repository context when necessary. - Identify bugs, security risks, style issues, maintainability problems, and missing tests. - Produce comments that are specific, actionable, and grounded in the code. - Decide which parts of the workflow require an LLM and which parts can be handled by deterministic tools. Deep-dive areas: 1. Which components need an LLM, and which should not use an LLM? 2. How would you validate the quality and safety of the agent's generated review comments? 3. How would the orchestrator work? 4. What memory or repository context should the system maintain? 5. What tools should the agent be able to use? 6. How would you estimate and control the cost of each LLM inference?

Quick Answer: This question evaluates a candidate's ability to design ML-powered developer tooling, covering competencies in LLM orchestration, deterministic tool integration, repository context management, code-analysis heuristics, safety and validation strategies, and inference cost estimation.

Related Interview Questions

  • Design an Automated Ticket Investigation Agent - Meta (hard)
  • Prevent Private Code Leakage in Coding Agents - Meta (medium)
  • Design Place Recommendation System - Meta (medium)
  • Design a Short-Video Recommendation System - Meta (medium)
  • Design an image copyright-violation detection system - Meta (medium)
Meta logo
Meta
Mar 17, 2026, 12:00 AM
Software Engineer
Onsite
ML System Design
1
0

Design an AI-powered code review agent that assists developers by reviewing pull requests and producing actionable feedback.

The agent should be able to:

  • Inspect code changes in a pull request.
  • Understand repository context when necessary.
  • Identify bugs, security risks, style issues, maintainability problems, and missing tests.
  • Produce comments that are specific, actionable, and grounded in the code.
  • Decide which parts of the workflow require an LLM and which parts can be handled by deterministic tools.

Deep-dive areas:

  1. Which components need an LLM, and which should not use an LLM?
  2. How would you validate the quality and safety of the agent's generated review comments?
  3. How would the orchestrator work?
  4. What memory or repository context should the system maintain?
  5. What tools should the agent be able to use?
  6. How would you estimate and control the cost of each LLM inference?

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More ML System Design•More Meta•More Software Engineer•Meta Software Engineer•Meta ML System Design•Software Engineer ML System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.