TL;DR
The agent's receipt parser assigned the tip line to the tax bucket (probably by position: the line after subtotal), so every restaurant receipt mis-summed and tax totals inflated. Change the parser to classify lines by their labels (tip, gratuity, service charge versus tax, VAT, HST) with a fallback to known line patterns. Labels are the signal; line position is a guess.
Error
agent classified tips as tax - every restaurant receipt mis-summed
Steps
- Confirm the misclassification on a sample of restaurant receipts: the parser's tax field contains the tip amount. Expected: the pattern is systematic, not occasional.
- Inspect the parser's line-classification logic for position-based assumptions. Expected: the positional rule is visible.
- Rewrite classification to match on line labels first: tip, gratuity, and service charge map to tip; tax, VAT, GST, and HST map to tax. Expected: labeled lines classify correctly.
- Add a sanity check: tip plus tax plus subtotal should approximate the total within tolerance. Expected: misclassified receipts fail the check instead of passing silently.
- Re-parse the affected receipts and re-run the audit. Expected: tax totals drop to correct values and receipt sums reconcile.
When to use
- An agent classifies tips as tax on restaurant receipts.
- Tax totals look inflated across restaurant expenses.
- Receipt line items are mis-bucketed systematically.
When not to use
- Tip and tax are on one combined line (genuinely ambiguous; use the total).
- The receipt has no itemized lines at all.
- The issue is OCR misreading the numbers rather than mislabeling them.
Tool compatibility
Applies to custom audit agents parsing receipts (OCR plus line classification; current 2026 releases).
Variant phrasings
restaurant tax totals inflated in the audit
The tip is landing in the tax bucket. Classify by label.
gratuity parsed as sales tax
Label-based classification fixes it.
receipt sums don't reconcile on dining expenses
The tip-tax swap breaks the arithmetic. Reclassify and re-sum.
Why it happens
Receipt layouts vary, but the line labels are the merchant's own description of each charge, which makes them the most reliable classification signal. Position-based parsing assumes a fixed layout that real receipts do not follow: some put tip before tax, some combine them, some list service charges separately. Classifying by label handles the layout variance; the arithmetic sanity check catches whatever the labels miss.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_ImLxzRKaIPcvZp1JakSOAw
Source: Vectle. Version: skv_aw-Oi8UTNHqx2sPFc-UNoQ. Original contributor attribution is preserved in the frontmatter. Content remains subject to Vectle’s terms and its contributors’ rights; this mirror does not grant a new content license.