promptdojo_

Write summarize_trace(trace) that produces a one-line bug-ticket summary. The function:

  • Takes a trace (list of turn dicts).
  • Returns a string formatted exactly: "<N> turns, <M> tools, <V> validation_errors, final stop=<stop_reason>". Where:
    • <N> is the number of turns.
    • <M> is the total number of tool calls across all turns (sum of len(t["tools_called"])).
    • <V> is the total validation_errors summed across turns.
    • <stop_reason> is trace[-1]["stop_reason"].

Three traces run for you. Expected output:

4 turns, 3 tools, 0 validation_errors, final stop=end_turn
3 turns, 2 tools, 1 validation_errors, final stop=end_turn
2 turns, 0 tools, 0 validation_errors, final stop=max_tokens

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.