---
name: "receipt-ocr-normalizer"
description: "Normalize supplied receipt text into reconciled expense data with uncertainty flags. Use when the user needs: Get structured vendor, line items, tax, total and reconciliation status."
metadata: {"version": "2026-10-17.1", "category": "data-parsing", "publisher": "AIDiveForge"}
---

# Receipt OCR Normalizer

Get structured vendor, line items, tax, total and reconciliation status.

## Requirements

Provide readable receipt text or a vision/OCR-capable assistant. No OCR engine is included.

## Workflow

1. Read vendor, date, currency, line items, discounts, tax and total from the receipt; retain a source locator for uncertain characters.
2. Keep decimal money as strings or integer minor units, and state currency rather than guessing from an ambiguous symbol.
3. Reconcile line items minus discounts plus tax against the displayed total using exact decimal arithmetic.
4. Use null and a review flag for unreadable fields; never make the arithmetic work by inventing a line item.
5. Return normalized JSON and a list of discrepancies for human review before an expense is posted.

## Worked example

Read `examples/input.txt` and `examples/expected.txt` before adapting the workflow.

## Acceptance checks

8.00 + 2.00 + 0.80 equals 10.80 exactly. An unreadable date or currency must remain unresolved.

## Limits

This is extraction and reconciliation, not approval of an expense or tax treatment. OCR and vision accuracy depend on the supplied tool and image.

Worked example included. Model-specific performance and vendor compatibility have not been benchmarked.
