All entries

    Cheap Rules First, LLM Second for Product Enrichment

    Apply deterministic rules to known formats and reserve a model call for inputs that require interpretation.

    Two processing lanes route product cards through rules and model review
    Conceptual pixel-art illustration.

    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.

    FURTHER READING

    Sources

    Technical references checked .

    END OF ENTRY / 53
    Eeshan Singh with Big Ben in London
    BEHIND THE JOURNAL

    Eeshan Singh

    I’m Eeshan Singh Pokharia, an AI Full Stack Developer and CoFounder of UltraFit360. I work across AI features, full-stack product development, and web and mobile experiences—from Figma and frontend interactions to the systems behind them.

    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.

    Meet the author
    THE CONVERSATION

    Your side of the story.