promptdojo_

Read the trace, not the chat — find the broken turn before reading the user's complaint — step 5 of 9

The function find_first(trace, predicate) should return the first turn where predicate(turn) returns True, or None if no turn matches. Fill in the call so the example finds the first turn with tokens > 500.

Expected output:

bad turn: 2