AI extraction & instructions

AI extraction reads each file and returns one value for every extracted input you define, and only those. A field can define more than one, each with its own rule. When a value comes back wrong, add an instruction to steer the next run.

Updated 5 min read

The AI is not a freeform assistant. It runs against the schema you define (the fields on a template, and the extracted inputs within them) and returns one value per declared extracted input, doing the boring work of reading every page. A field with several extracted inputs (an address split into street and borough, say) gets several independent values, not one merged guess. If you didn't declare an extracted input, it isn't extracted. Anything the AI can't find stays empty, and each value lands in case data under a stable key, so renaming a field's display label later doesn't disturb the data. See core concepts for the schema model.

Schema-bounded extraction & model choice

On ingestion the AI sees the file's full text and visuals; every extracted input carrying at least one signal (an AI instruction, a read zone, or an AI-prompt transform); and any per-value rules. A bare extracted input with none of those is skipped silently. Field types act as type checks: date forces a parseable date, select forces an allowed option. Type constraints beat text instructions, so don't restate them; reserve the AI instruction box for what the type system can't enforce, like "use the customer's billing name, not their shipping name."

Extraction runs on Google Gemini, switched from the AI model row in Settings → Preferences: Gemini 2.5 Flash Lite (default, fastest and lowest cost) or Gemini 3.1 Flash Lite (stronger on dense or messy docs, modestly higher cost). Your pick covers extraction, autofill, and document reflows. Chat has its own selector in the chat drawer.

The four instruction layers

Push every rule to the lowest applicable layer: a per-value rule is shown only when that value extracts; template rules show for every value and dilute the signal. Iterate one rule at a time, since changing two layers at once makes it impossible to tell which moved the needle.

#LayerWhere you edit itScope
1ValueThe AI instruction box on an extracted input in the field's Inputs section (or the Prompt on an AI-prompt transform, in Outputs)One value, every extraction
2TemplateThe AI Instructions field in the template's details dropdown (click the template name, with the chevron, in the editor toolbar)All values; covers the assembled PDF
3Per-sourceThe AI instructions for this row textarea in a source tab's chevron popover (multi-source) or menu (single-source)One source inside a stitched packet
4SpecialThe Special AI Instructions box in the autofill review modal, the Add AI instructions disclosure on a file's template run in the case Documents console, or the editor's Test & Preview form (which pre-fills the last run's text)One run only; never saved

Layer 2 has exactly one editable home: the template's details dropdown. (The Data tab's "Special AI instructions" box is a different thing: a per-run override, applied to the next run only.)

How they merge: a value's own Rule (1) wins for that value, always. Layers 2 and 3 fold into the "ground rules" above the value list (per-source is not deduplicated against template, since they describe different scopes). Layer 4 (Special) lands in the CASE-SPECIFIC INSTRUCTIONS section; it overrides template/per-source guidance for any value it names, but not a value's own Rule unless you say so. The old combiner-level AI Instructions box was folded into Layer 2 in May 2026.

1Open the field's extracted input2Add a specific AI instruction3Re-extract one caseIterate one rule at a time
A permit packet using three layers
ValuePermit Number: PMT- prefix, may be rotated 90°
Per-sourceW-9: tax ID from box 5 only
Templatetrust insurance cert for address

Working well with extraction

  • Be specific about edge cases: "invoice date in ISO format, top-right of page 1," not "extract the date." For a batch field's columns, name the position too, e.g. "unit price is the per-line cost before tax, usually the second-to-last column."
  • Test 5 to 10 files manually before enabling automations that ingest hundreds.
  • Don't extract everything: if a value is hard, switch the input's source to question so a human fills it once.
  • Leave attachments alone: photos, receipts and reference material stay untagged. They remain on the activity timeline and in the case files list, and they simply never become extraction targets. Nothing to configure: a file becomes extractable by having a template run on it.
  • Re-extract respects edits: a hand-fixed value flips origin from_extractionmodified, and re-extract leaves modified fields alone from then on.

Troubleshooting

AI returns "N/A" for a visible value. Add a hint about where it lives. The AI is looking in the wrong section.

A field is never extracted. It carries no signal: add an instruction, read zone, or AI-prompt transform.

Wrong number format. Use a number type with format hints (currency, percent, count). The AI handles format conversion better than free-form text parsing.

Slow on large files. Switch to the faster model in Settings → Preferences, or split into smaller field groups so each call has less work.

Template rule ignored for one value. That value has its own Rule, which wins (even if the contradiction is subtle).

Special instructions vanished. By design, they're run-only (the label reads "Applied to this run only"). To make a rule stick, use Layer 1 for a single value, or Layer 2/3 (template or per-source) for all cases.

A rule changed nothing. The AI is probabilistic, so a rule shifts the distribution but doesn't guarantee an output; tighten the value type or move the source to question.

Type at least 2 characters to search.
We use cookies to keep you signed in and improve the product. See our Cookie Policy.
Manage preferences