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

# The extraction engine

> How equate reads supplier invoices — a travel-native field schema, calibrated confidence, and document handling built for how travel paperwork actually arrives.

Generic OCR pulls text off a page. equate's extraction engine is different: it reads an
invoice the way a travel accounts team does — it knows a cruise invoice carries cabins
and sailings, a ski invoice carries lift passes and chalets, and a consolidator statement
is a different animal from a bedbank PDF. This page explains what's under the hood and why
the output is dependable enough to reconcile against.

## Travel-native, not generic

Every document is extracted against a **travel-aware schema** of 40+ fields organised
into groups — booking, money, cruise, cabin, passengers, flights, trains, and
holiday & hotel. The engine first establishes the **trip type** — cruise, ski,
transfer, flights, trains, hotel, package or other — and the trip type drives which
field groups are populated:

| Trip type | Beyond the core fields, expect |
| - | - |
| Cruise | Ship name, embarkation/disembarkation, cabin grade & number, passengers, connected flights |
| Flights / Trains | Carriers, routes, dates, passenger lists |
| Hotel & package | Property, board, stay dates, occupancy |
| Ski | Resort, accommodation, equipment and pass lines |

The core never varies: **supplier, reference, currency, totals and commission** are
extracted on every document — they're what [matching](https://equatetravel.ai/docs/platform/matching-engine.md) gates
on.

## Built for real travel paperwork

* **PDFs** are read with document vision — layout, tables and stamps included — so a
  scanned supplier statement works as well as a digital invoice.
* **CSV and Excel** files are split into **one job per row**, which is how booking
  system exports and consolidator statements actually arrive.
* **Plain text** (and email bodies) are extracted directly.
* **Split documents** — when one PDF carries both the client and agent copies, equate
  separates them, keeps both as artifacts, and extracts from the right one.
* **Separate copies, one invoice** — suppliers that email the same invoice twice (or
  send client and agent copies separately) can be reconciled into a single job, with
  the duplicate absorbed as `MERGED`. This is opt-in per
  [supplier](https://equatetravel.ai/docs/guides/suppliers.md).

## Confidence you can route on

Every extracted field carries a **calibrated confidence score**, and each document gets
an overall score. Confidence isn't cosmetic — it's what downstream automation routes on:
high-confidence extractions feed straight into [matching](https://equatetravel.ai/docs/platform/matching-engine.md),
shaky ones are flagged before they can become wrong payments. You'll see the same
scores in the dashboard's field-by-field view and in
[agent API](https://equatetravel.ai/docs/api-reference/introduction.md) responses.

## Resilient by design

* **Multiple frontier models with automatic failover** — extraction doesn't stop
  because one provider has a bad day. Choose the balance per call with the
  `modelTier` option on the API: `smart` for maximum accuracy, `fast` for latency.
* **Retries with backoff** are built into the processing workflow; transient failures
  never silently drop a document.
* **Every attempt is recorded** — model, prompt version, duration and outcome — so an
  extraction is always explainable after the fact.
* **Versioned prompts** — extraction logic is versioned in code and stamped onto every
  attempt; when the engine improves, you can still account for results produced by
  earlier versions.

## It learns your corrections

When a reviewer fixes a field in the [review queue](https://equatetravel.ai/docs/guides/reviewing-exceptions.md), the
correction is stored alongside the original extraction and feeds the evaluation sets
the engine is tuned against — so accuracy compounds with use, on your suppliers'
formats rather than someone else's.

> [card] [The matching engine](https://equatetravel.ai/docs/platform/matching-engine.md)
>
> What happens after extraction — tiers, decisions and confidence.

> [card] [Call it from your code](https://equatetravel.ai/docs/api-reference/introduction.md)
>
> The same engine, exposed as the agent API.


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