How it works

Code reads the numbers.
The model picks a product.

A clear match becomes a ready row. An uncertain match becomes one short question, with a suggestion when available.

From slip to ledger

A small, deliberate pipeline

  1. Parse

    Code reads quantity, unit, price and pack size, normalising supported digits and spellings.

  2. Match the text

    Fuzzy matching needs a score ≥ 0.5 and a lead ≥ 0.08 over the next candidate.

  3. Ask the model if needed

    If fuzzy cannot name the product, the local model picks from the top 8 candidates or abstains.

  4. Check every pick

    All 16 rules must pass for Ready. Otherwise the row is Needs you.

Greetings and notes can become grey, ignored rows. “Treat as item” overrides this.

A boundary learned by testing

The model never owns a number

In the first trial, the model changed petti (carton) to packet in 3 of 4 lines, despite the prompt’s definition.

Now code supplies every number. The model returns only product evidence, a catalogue SKU and a status.

Source: Design D2–D5. Trial on synthetic development examples, not shop orders.

S1–S16

What stops a row becoming green

The first failed rule supplies the question. Examples are synthetic data.

Safety rules · synthetic examples and questions
RuleCheckExample caughtOperator question
S1An unsure decision needs review.lays 10 wala has no flavour.Is it …? / Which product is “…”?
S2The product must exist in the catalogue.The model invents PRLG-50.Which product is “…”?
S3The model must pick from its shortlist.A pick outside the candidates it was shown.Which product is “…”?
S4A product must be chosen.No confident match.Which product is “…”?
S5Written price must match MRP; conflicting prices ask.parleg 10 wala matched to a ₹5 pack.Which ₹10 item? / Which price?
S6Written size and dimension must match a known variant; conflicts ask.fortune 5 litre matched to a 1 L pouch.Which 5000 ml item? / Which pack size?
S7With two different number + unit pairs, drop a pair only if its number and unit occur in a product name/alias. Exactly one pair must remain.maggi 4 pack 1 petti → 1 carton; maggi 4 ctn 1 pkt stays unresolved.Which quantity: 4 packet or 1 carton?
S8Model quantity/unit must agree with code. Price/size cannot fill a missing quantity.Model changes petti to packet.Is it carton? / How many?
S9All model evidence words must occur in the order.The model quotes words that were never written.Is it …?
S10The order’s words must score the model pick ahead of every candidate by ≥ 0.08.lays 10 wala picks Classic Salted due to a shorter alias.Is it Lay’s Classic Salted (₹10 pack)?
S11Quantity must be present, whole and between 1 and 10000.maggi bhej denaHow many?
S12Never guess an unknown unit, even if the proposal supplies a known one.10 jodi or 2 ladiWhat is “jodi”? packet or carton?
S13Fill a missing unit only for an item sold in exactly one unit.aashirvaad 5kg 2 can use bag; items with multiple selling units ask.packet or carton?
S14The unit must be one the item is sold in.fortune 5 litre 1 petti… is sold by piece. Which one?
S15Cartons need a known carton size.clinic plus 2 pettiHow many in one carton of …?
S16A comma between digits that isn't a proper grouping is never read as a number.maggi 1,5 pkt (1.5? 15? 1 and 5?)What does “1,5” mean?

Source: Safety rules. Product names are examples in a synthetic catalogue; no affiliation.

L1–L5

Remember a name, keep the checks

A correction is saved in a local CSV; no training.

Five rules for learned shop shorthand
RuleBoundaryWhy it matters
L1Only unknown names can be learned; UI and server both enforce it.tata tea premium needs its size resolved.
L2Names refer to products across variants.lais peela learned at ₹10 must still find the ₹20 pack.
L3Written price or size selects the variant. If neither resolves it, ask.lais peela 3 ctn stays amber, with a suggestion.
L4Learned names pass every safety rule.Price, size, quantity and unit checks still apply.
L5Save only an explicitly confirmed row with “Remember” ticked.Skipped and automatic rows never teach a name.

Synthetic evaluation · Try the sample order.