topai_math_fact_checker
Computes VAT, reconciles invoice totals, and counts business days with deterministic decimal arithmetic and an audit trail to prevent LLM math errors.
Instructions
Executes deterministic IEEE/decimal financial arithmetic for VAT calculation, multi-line invoice reconciliation, and working business-day counts with an explicit step-by-step audit trail. Use whenever an agent must compute or verify taxes, invoice totals, or date intervals without risking LLM arithmetic hallucinations. Do not use for parsing raw unstructured invoice text (use topai_invoice_extractor first, then pass extracted numbers here). Stateless, read-only, idempotent calculation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | Line items array `[{ description, quantity, unit_price }]` used when `operation` is 'invoice_reconcile'. | |
| amount | No | Base monetary amount for 'vat_calculate' (e.g., 250.00). | |
| operation | Yes | Deterministic calculation type: 'vat_calculate' (net/gross tax math), 'invoice_reconcile' (sum of quantity * unit_price), or 'business_days'. | |
| rate_percent | No | VAT or tax percentage rate for 'vat_calculate' (e.g., 20.0 for 20% VAT). |