Template vs AI freeform extraction: which one for your documents?
July 7, 2026 Β· 6 min read
Template extraction uses a pre-tuned schema for a known document type and gets you slightly higher precision and speed; freeform extraction lets the model infer structure from any layout it has never seen. Most teams end up using both β templates for their highest-volume, most standardized documents, freeform for everything long-tail β and Inferio's "from sample" flow lets you turn a real document into a new template in minutes instead of writing one by hand.
What are Inferio's two extraction modes?
Template mode runs a document against a pre-tuned JSON schema β a fixed list of expected fields (vendor, T-number, line items, tax breakdown, totals for an invoice; MRZ, name, dates for an ID) with validation rules already wired in. Because the schema is known ahead of time, extraction is marginally faster and slightly more precise on edge cases, and the output always has the exact same shape, which makes downstream integration trivial.
Freeform mode skips the pre-defined schema. The model reads the document, infers what fields exist and what they mean, and returns a structured result without anyone having configured that specific layout in advance. It trades a small amount of precision for the ability to handle a document type nobody set up a template for.
When should you use a template?
Templates fit documents with two properties: the field set is fixed, and the volume is high enough that a slightly more precise, slightly faster path is worth having. Invoices, receipts, and ID documents check both boxes for most businesses β Inferio ships built-in templates for these because the schema barely varies from one invoice to the next.
- Fixed field set β you always need the same information out (vendor, total, tax, line items), regardless of who issued the document.
- Compliance requirements β a template can wire in validation that must run every time, like T-number verification against the NTA public API on every qualified invoice.
- High, predictable volume β the same document type arrives daily or weekly, so the marginal precision gain compounds.
When does freeform extraction make more sense?
Freeform earns its keep when the field set isn't fixed, or the document type is too rare or too varied to justify building a template. A purchase order from a new supplier, a one-off contract, a shipping document with a layout you've never processed before β freeform reads it once and returns structured data on that first attempt.
The practical rule: if you'd process fewer than a few dozen of a given document layout per month, the engineering cost of a hand-built template rarely pays for itself before the layout changes anyway. Freeform is the mode that makes those long-tail documents worth digitizing at all.
What is the hybrid "from sample" flow?
There's a middle path between hand-writing a template and running freeform forever: upload one real example of a new document type, and Inferio's AI reads it and proposes a template β field names, types, and a first-pass schema β that you review and confirm instead of building from scratch. It turns "this new vendor has yet another invoice layout" from an engineering ticket into a two-minute review.
This matters most for teams onboarding new suppliers or expanding into a new document type mid-quarter β you get template-mode precision and consistency for a layout that showed up yesterday, without waiting on an engineering sprint to hand-code the schema.
Quick answers
- Can I switch a document type from freeform to a template later?
- Yes β that's the usual path. Start a new, low-volume document type on freeform so nothing blocks digitizing it, and once volume justifies the marginal precision gain, use the from-sample flow (or a manual definition) to turn it into a template without re-architecting anything downstream.
- Does freeform mode cost more per page than template mode?
- Pricing is per successfully processed page regardless of mode β Inferio doesn't charge a premium for freeform. The trade-off is in precision and latency, not billing: template mode is marginally faster and slightly more precise on edge cases because the schema is already known.
- How accurate is a template built from a single sample document?
- The from-sample flow gives you a strong first draft, not a finished template β review the proposed fields before confirming, since one example can't show every variation a vendor's layout might have (an optional discount line, a second tax rate). Most teams run a handful of real documents through the new template in its first week and adjust as edge cases surface.
- What happens if a template-mode document doesn't match the expected schema?
- Fields the template expects but can't find come back empty rather than guessed, and unexpected content that doesn't fit any known field is flagged rather than silently dropped β so a document that breaks the assumed layout surfaces for human review instead of producing a plausible-looking but wrong result.