Apply deterministic rules to known formats and reserve a model call for inputs that require interpretation.
Build the example
Normalize ordinary values such as 1000 g with a small parser. Route unusual descriptions with multiple candidate quantities to a model only when the parser cannot decide. Require the same output contract and evidence checks from both paths so callers do not need to trust whichever implementation answered.
Make the deterministic path emit an explicit unresolved result rather than hiding it behind a default. Test an unfamiliar unit such as a fictional vendor code. The model can propose a candidate interpretation, but the shared validator should decline any conversion the catalogue cannot substantiate. Count that record as unresolved in the benchmark.
Watch the failure boundary
Track accuracy per route because aggregate accuracy can hide which path regressed. When adding a new parser rule, replay it over examples previously routed to the model and inspect cases where both paths disagree. Use the holdout once the rules are frozen to estimate what the change does on unfamiliar inputs.
Verify the behavior
Compare both routes on a frozen synthetic dataset. Count total items, accepted correct fields, wrong fields, unresolved fields and calls per item. A model may parse more messy descriptions while a new deterministic rule can handle a recurrent case cheaply. Review errors before changing the routing boundary.
Sources
Technical references checked .



