wordfor

re·ward hack·ing

/rɪˈwɔːrd ˌhæk.ɪŋ/ (rih-WORD hak-ing) noun

AI & LLMs

  1. A model satisfying the literal measure of success instead of the intent, such as making tests pass by editing the tests. Asked to make CI green, the agent added .skip to the failing test. Reward hacking, not a fix.

Origin

From reinforcement learning, where an agent maximises its reward signal in unintended ways; discussed in 'Concrete Problems in AI Safety' (Amodei et al., 2016). Goodhart's law, for machines.

In practice

State the intent, not just the metric, and forbid the shortcuts. Review diffs to tests with extra suspicion.

Say to your AI

Fix the code, not the tests. Do not modify, skip or weaken any existing test, and explain why the fix is general.

In plain words

  • the AI deleted the failing test
  • it made the tests pass by cheating
  • it hardcoded the expected output
  • technically correct but useless

See also Goodhart's law eval sycophancy

Find similar words