Use an AI coding assistant to fix bugs in a multi-file mailbox report project
Company: Yahoo
Role: Machine Learning Engineer
Category: Software Engineering Fundamentals
Difficulty: easy
Interview Round: Onsite
In an AI-assisted coding round you receive a project with many files that computes an overall report of each user's mailbox for a webmail product (Yahoo Mail). A detailed README describes exactly what the report must look like, but the code has bugs, so its output does not match the README. Use an AI coding assistant to find and fix the bugs so that the project produces the report the README specifies. You may choose the assistant and the model. The interviewer watches how you work with the assistant as well as the final result.
The report does not list the bugs, the report's fields, or the input format; ask about them, and treat the README as the specification.
### Clarifying Questions
- Does the project come with tests, sample input data, or an example of a correct report?
- May I change only the code, or also the tests?
- If the README and the existing code or tests disagree, which one is authoritative?
- Is there a time limit, and should I narrate my work with the assistant as I go?
- Is the input data synthetic, and are there rules about what may be sent to the assistant?
### Part 1 — Turn the README into checks
Before changing any code, establish how you will tell a correct report from a wrong one.
```hint Specification before fixes
Think about how to turn each requirement in the README into something you can run, using small inputs whose correct report you can work out by hand.
```
#### What This Part Should Cover
- The project's structure and data flow, from input to report
- A checklist of README requirements, including formatting and edge cases
- Small hand-checked fixtures or tests that expose mismatches
### Part 2 — Find and fix the bugs with the assistant
Use the AI assistant to locate and fix the bugs.
```hint Give it a symptom
Ask what context the assistant needs to fix one specific mismatch, and how you will check each change it proposes before accepting it.
```
#### What This Part Should Cover
- Effective prompting: specific symptoms, the relevant files, a constrained scope
- Reviewing and testing every change rather than accepting it as written
- Root-cause fixes rather than special cases for one example
### Part 3 — Show that the report is now correct
Convince the interviewer that the project now meets the README.
```hint What else could be wrong?
Ask what evidence would show that the report fields you did not touch are correct too.
```
#### What This Part Should Cover
- A full test run, and a comparison of the output with every README requirement
- Edge cases such as empty mailboxes and users with unusual data
- A short explanation of each bug, its cause and its fix
### What a Strong Answer Covers
- Treats the README as the specification and verifies against it
- Uses the assistant as a tool under control: clear context, small steps, reviewed diffs
- Finds root causes and fixes every bug, not only the first one
- Clear narration and good time management
### Follow-up Questions
- How would you stop these bugs from coming back?
- The assistant proposes editing a test so that it passes. What do you do?
- How would this report job need to change to run for every user of a very large mail service each day?
- Real mailbox data is sensitive. What would you never paste into an assistant, and how do you debug without it?
Overview: In an AI-assisted coding round, fix a buggy multi-file project that builds a per-user mailbox report so its output matches a detailed README. Tests turning a specification into tests, directing an AI coding assistant with reviewed changes, root-cause fixes, and verifying the result.
Read the full Yahoo Machine Learning Engineer interview experience this question came from