Overview
Forms are everywhere in enterprise documents — loan applications, insurance claims, medical surveys, compliance questionnaires. But processing them at scale is hard: layouts vary, fields shift position, and content is often mixed with tables, text, and illustrations on the same page. Tensorlake’s Agentic Key-Value Extraction solves this with a two-stage pipeline: it first detects whether a page component is actually a form (skipping expensive vision models on non-form content), then extracts every field into structured JSON with its name, type, value, and an optional box ID. No templates, no coordinate mapping, no per-form configuration. Enable it withkey_value_extraction=True in your EnrichmentOptions.
Enabling Key-Value Extraction
Setkey_value_extraction=True in your EnrichmentOptions:
How It Works
Stage 1 — Form Detection
When Tensorlake encounters a layout component, a lightweight vision model first determines whether it is actually a form. Non-form content (tables, text blocks, illustrations) is skipped immediately, so expensive extraction models are only invoked on pages or regions that contain real form fields. This keeps costs low and processing fast.Stage 2 — Agentic Field Extraction
Once a form is identified, the agent extracts its fields by reasoning about:- Multi-field patterns — grouping related fields such as address components or checkbox groups
- Context — inferring field purpose from surrounding text and document structure
- Visual cues — recognizing checkboxes, radio buttons, and text boxes by appearance
- Spatial relationships — resolving which labels correspond to which input fields
Supported Field Types
| Type | Description |
|---|---|
text | Free-text input fields |
checkbox | Boolean tick boxes (true / false) |
radio button | Single-select option groups |
dropdown | Select menus with a chosen value |
signature | Signature line fields |
Output
Each extracted form produces a JSON array of field objects:| Field | Description |
|---|---|
box_id | Optional reference ID linking the field back to a labeled box in the form |
field_name | Label or purpose of the field (e.g. "Federal income tax withheld") |
type | Input type (e.g. "text", "checkbox") |
value | Current content of the field |
Example — W-2 form
Common Use Cases
- Loan and mortgage applications — extract applicant data, income fields, and declaration checkboxes without per-lender templates
- Insurance claims — pull policy numbers, claimant details, and coverage selections from variable claim form layouts
- Medical surveys and intake forms — capture patient responses, checkbox selections, and consent signatures
- Tax documents — extract labeled box values from W-2s, 1099s, and other structured government forms
- Compliance questionnaires — process due-diligence and KYC forms across counterparties with different layouts