promptdojo_

The four breakage classes — sort any LLM failure before you touch the prompt — step 7 of 9

The model returned correct JSON: {"refund": "$48.20"}. A downstream "currency cleaner" regex was supposed to strip junk characters but instead strips the $ — turning $48.20 into 48.20. The user reads 48.20 and asks support what currency.

The model was right. The trace's raw_output is correct. The bug is in the regex on the post-processing line.

Fix the regex so it strips literal backticks (`) — which is what the cleaner was meant to do — and leaves the $ untouched.

Expected output:

raw:           {"refund": "$48.20"}
postprocessed: {"refund": "$48.20"}
class: parse (bug was in regex, not model)
The break is on line 8 — but read the whole snippet first.

full-screen editor opens — close anytime to keep reading.