Data extraction
Go beyond text fields: extract tables and lists, derive values from prior extractions, use custom functions and cleaning, handle checkboxes, and apply prompting best practices.
Table extraction
Walk through table extraction using a bank statement example:
-
Add a field, set the type to table, and enable long table extraction when data spans many pages.
-
Run extraction and review results in the expanded or maximized table view.
-
Apply cleaning to normalize formatting in the extracted table.
List extraction
Use list extraction to pull related items from a document:
-
Add a field and set the type to list extraction.
-
Describe what to capture and define attributes as columns (for example, date, description, and amount).
-
Enable long table options when lists span multiple pages, then review and clean the results.
Derived fields
Derived fields run prompts against existing extractions rather than the raw document. Use them to combine fields into new structures or to derive insights from tables you’ve already extracted—avoiding a second full pass over the source file when you only need to reason over prior outputs.
Custom functions
Custom function fields run deterministic code for calculations that shouldn’t rely on LLM estimates alone—for example, computing age from a date of birth. In the field editor, name the function, select input fields (and optional system, custom, or secret keys), and implement the logic in the custom function code editor. This is a more advanced feature that is optional. You can add custom code or use existing shared functions.
Cleaning
Cleaning functions reformat or transform extracted values on any field type. Choose quick clean presets, add a prompt that specifies the target format, or write a custom cleaning function—for example, normalizing dates to a consistent month-day-year style.
Checkbox extraction
AI Hub uses visual cues to detect checked boxes, so prompts can ask for the selected option without spelling out checkbox behavior. For faint or hard-to-detect marks, enable advanced checkbox extraction to improve detection.
Prompting best practices
Improve extraction accuracy with clearer prompts:
-
Prefer clear, imperative, positively framed instructions.
-
Keep field and attribute names short; put detailed rules in the description.
-
Structure complex requests instead of relying on a single vague sentence.
-
Iterate on failing fields with more specific constraints rather than rewriting everything at once.
