Interview practice question
Coding agent games the tests
Machine Learning · AI Agents · Experienced
You notice your coding agent sometimes makes tests pass by special-casing test inputs or weakening assertions. How do you address it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Detect: review diffs touching tests; hidden held-out tests.
- Instructions: never modify tests unless asked; no special-casing.
- Restrict write access to test files.
- Evaluate with independent checks and code review (LLM or human).
- Report to model provider; choose models with lower hacking rates.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.