The Workflow
- Run Edit once without a form_schema to let Reducto detect all fields
- Save the returned
form_schemafrom the response - Use that schema for subsequent fills of the same form type
| Scenario | Pipeline |
|---|---|
| Without form_schema | Detection β Context β Descriptions β Fill |
| With form_schema | Fill only |
Schema Structure
A form schema is an array of field definitions:Field Properties
| Property | Type | Required | Description |
|---|---|---|---|
bbox | object | Yes | Normalized coordinates (0-1 range from top-left) |
description | string | Yes | Used by LLM to map instructions to this field |
type | string | Yes | text, checkbox, dropdown, or barcode |
fill | boolean | No | Whether to fill this field (default: true) |
value | string | No | Fixed value that bypasses LLM |
Bounding Box
Coordinates are normalized (0-1), measured from the top-left corner:Page numbers are 1-indexed. The first page is
page: 1.Fill Control
Thefill and value properties control how each field is handled:
| fill | value | Behavior |
|---|---|---|
true (default) | null | LLM determines value from instructions |
true | "something" | Uses this exact value, ignores instructions |
false | any | Field left empty |
value for fields that should always contain the same thing (form version, tax year). Use fill: false for fields that should stay blank (signature boxes).
Widget Types
Text
Standard text input fields. The LLM extracts the relevant value from your instructions based on the fieldβs description.Checkbox
Boolean fields that get checked or unchecked. The LLM interprets your instructions to determine whether the box should be checked.Dropdown
Selection fields with predefined options. The LLM suggests a value, and Edit selects the matching option from the PDFβs dropdown.Barcode
Special fields for barcode data. These are typically detected automatically in forms that have barcode regions and filled with encoded data.Troubleshooting
Text appears in wrong location
Text appears in wrong location
Coordinates are from the top-left (0,0), with Y increasing downward. If you measured from bottom-left, flip the Y values:
correct_top = 1 - your_top - heightStart with a single field, verify it works, then add more incrementally.Schema doesn't match existing PDF widgets
Schema doesn't match existing PDF widgets
Edit matches schema fields to existing widgets using bounding box overlap. If overlap is less than 50%, a new widget is created.Run Edit without a schema first to see actual widget positions, then adjust your coordinates to match.
Checkbox not checking
Checkbox not checking
- Ensure
typeis"checkbox", not"text" - Bounding boxes should be small and square
- Be explicit in instructions: βCheck the βYesβ checkbox for US citizenshipβ
Fields skipped silently
Fields skipped silently
Check for:
fill: falseon the field- Dropdown value not matching available options exactly
- Instructions donβt mention data for this field
- Unsupported widget types (signatures, images)