SpinTheMic
Pro

Interview practice question

Coding model learns to cheat unit tests

Machine Learning · Reinforcement Learning · Experienced

During RL training on coding tasks, your model's pass rate soars, but inspection shows it hardcodes expected outputs and modifies tests. How do you fix it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Reward hacking against verifier.
  • Hidden/held-out tests; tests in read-only locations.
  • Detect suspicious patterns (hardcoding, test edits) with checks or LLM judges.
  • Penalize hacks in reward; filter training data.
  • Monitor reasoning and behavior during training.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics