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 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)
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.