Design an Evaluation Platform for an AI Design Agent with Online and Offline Evals
Company: Figma
Role: Software Engineer
Category: ML System Design
Difficulty: medium
Interview Round: Onsite
Design an evaluation platform for an AI design agent. The agent runs inside a design tool: a user describes what they want in plain language, and the agent creates or edits designs in the user's file. The team building the agent needs a platform that tells them how good each version of the agent is, both before release (offline evaluation) and once it serves real users (online evaluation).
The interviewer wants three things: clearly defined evaluation criteria, a plan for which data to collect and how to collect it, and a system architecture that covers both online and offline evaluation.
Assume the agent works in steps. It reads the request, the current file and the user's selection, then calls editor tools (create a frame, insert a component, set text, change styles or layout) until it decides the task is done. Its output is the edited file plus the sequence of steps it took.
### Clarifying Questions
- Which tasks does the agent handle: generating new screens from a prompt, editing an existing file, or both? Do evaluation cases come with a reference output, or only with a request?
- Who uses the results: engineers iterating on prompts, models and tools, a release process for each new agent version, or both? How quickly must an offline run finish?
- May the platform use real user files and prompts, and under what consent and retention rules?
- How many agent requests reach production per day, so that sampling and judging costs can be sized?
- Which components change between agent versions (base model, prompts, tools), and must each be evaluated on its own?
### Part 1: Define the evaluation criteria
Define what a good result from the agent means. Turn that definition into criteria and metrics the platform can compute, and say how each one is graded.
```hint Grade more than the final file
The agent produces a finished design and a sequence of actions. Ask which qualities a program can check on the file itself, which need a judgment of how the design looks, and which only users can tell you.
```
#### What This Part Should Cover
- Criteria grouped by layer: task success and instruction following, design quality, structural correctness of the file, scope and safety, cost.
- A grading method for each criterion (programmatic check, model judge, human rater) and the reason for it.
- How the scores combine into a decision about whether a new version is better.
- How model judges are checked against human ratings.
### Part 2: Decide which data to collect and how
Describe the datasets the platform needs for offline evaluation and the data to log in production for online evaluation. For each, say where it comes from, what is recorded and how labels are produced.
```hint Make a run replayable
For any case you want to score again later, list everything needed to rerun it: the request, the starting state of the file, and the version of every component involved.
```
#### What This Part Should Cover
- Sources of offline cases (production samples, curated sets, synthetic and adversarial cases) and how they are sliced and split.
- The fields logged for each production request, including the agent's trajectory and implicit user feedback.
- Labeling: rubrics, raters, agreement and cost.
- Privacy, consent and retention for user files.
### Part 3: Design the platform architecture
Design the system that runs offline evaluations on demand and for every candidate release, and evaluates the agent continuously in production. Show the components, the data flow between them, and how results reach the people deciding whether to ship.
```hint Two loops, shared parts
Offline runs replay fixed cases in a controlled environment; online evaluation scores live traffic after the fact. Look for the components both loops can share.
```
#### What This Part Should Cover
- The offline path: dataset storage, sandboxed replay, parallel runners, graders and a results store.
- The online path: trace logging, sampled scoring, experiments and alerts.
- Comparison of a candidate against a baseline, accounting for variance across repeated runs.
- The loop that turns production failures into new offline cases.
### What a Strong Answer Covers
- Criteria specific to design output (layout, use of the design system, editability), with the grading method chosen per criterion.
- Evidence that offline metrics predict online outcomes, checked rather than assumed.
- Handling of agent nondeterminism and judge bias when comparing versions.
- The cost and latency of evaluation itself, including how much traffic to judge and where human raters are needed.
### Follow-up Questions
- Offline scores improve for a new agent version, but the online undo rate rises. How do you find out which signal is wrong?
- How would you detect that the model judge's scores shifted after its underlying model was upgraded?
- One customer's files may not be used for evaluation at all. How does that change your datasets and how you measure quality for customers like them?
- How would you evaluate a multi-turn session in which the user corrects the agent several times?
Overview: Design an evaluation platform for an AI agent that creates and edits designs inside a design tool. The question asks for clear evaluation criteria, a plan for which data to collect and how, and an architecture that covers offline replay and online evaluation of production traffic.
Read the full Figma Software Engineer interview experience this question came from