promptdojo_

Routing — pick the path before doing the work — step 7 of 9

The classifier model returned " Billing " — capitalized, with whitespace. The dispatch table only knows "billing" (lowercase, trimmed). Without normalization, this falls through to the fallback even though the classifier got it right.

Fix the normalization so the category is lowercased AND stripped before the dispatch lookup.

Expected output:

BILL -> refund please
The break is on line 11 — but read the whole snippet first.

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