> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trysnapit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Extraction tiers

> How SnapIt routes invoices through template OCR, cheap text LLMs, and vision fallback.

# Extraction tiers

SnapIt escalates only when confidence is below the configured threshold. Every invoice stores `extractionTier`, `extractionProvider`, and `routingReason` for audit and cost control.

```
Tier 1 → PaddleOCR + vendor YAML templates     free
Tier 2 → OCR text + Mistral / Ollama / Vercel AI   low cost
Tier 3 → GPT-4o Vision or Azure Document Intelligence   higher cost
```

| Tier | Method | Typical cost | When used |
| - | - | - | - |
| 1 | PaddleOCR + vendor template | Free | Template exists and confidence ≥ Tier 1 threshold (default **85**) |
| 2 | OCR text → cheap text LLM | \~\$0.001 | No template, or Tier 1 below threshold |
| 3 | Vision / Document Intelligence | \~\$0.003 | Tier 2 below threshold (default **70**) or unavailable |

Dashboard **estimated AI cost** and tier badges are visible to platform operators (including while impersonating a tenant). Treat dollar amounts as **estimates**. Tenant users see invoice vendor names and spend, not which extraction tier ran.

## Why an invoice can escalate

The confidence score is not the only routing signal. SnapIt can escalate when:

* OCR confidence is below the minimum usable text floor.
* Required fields such as invoice number, date, vendor, currency, or total are missing.
* Financial totals do not reconcile within the validation tolerance.
* A provider is unavailable or returns an unusable result.

After Tier 2, SnapIt normally uses Tier 3 for the final attempt. Operators can disable Tier 3 for a development or cost-control profile. When Tier 3 is disabled or unavailable, SnapIt retains the best usable lower-tier result and may mark the invoice **Needs Attention** instead of losing the extraction.

<Note>
  Extraction tiers are provider-routing metadata, not a guarantee of a specific model on every invoice. Runtime admin settings, provider availability, validation, and OCR quality can change the final route.
</Note>

<Tip>
  Operators can add [vendor templates](/guides/templates) so more invoices stay on Tier 1. Tenant workspaces do not manage templates.
</Tip>

<Note>
  Choosing Ollama vs Mistral vs Azure and flags such as `USE_VERCEL_AI` are operator configuration — not day-to-day product settings. See the repo README and `docs/vercel-ai-deployment.md` if you self-host.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.