fileAI fills each schema field by reading its title and description, so the description works as the field’s extraction prompt. A clear, specific description is the most direct way to improve a field that comes back wrong or empty. Before rewriting a prompt, check that the file itself reads well: a digitally generated PDF with selectable text beats a low-resolution scan. See Prepare your files.

How it works

Every field in an AI Schema has a title, a type and a description. fileAI sends the description to the extraction model as the instruction for that field; when a field has no description, its title is used instead. You write prompts in two places:
  • In the app: click the sparkle icon next to a field in the AI Schema tab, describe how the field should be captured, then click Run and Save.
  • Over the API: set description on a field with PATCH /v1/files/schema, then re-fill the file with PATCH /v1/files/schema/rerun.

Guidelines

Name exactly what you want. Instead of “Extract important details”, write “The invoice number printed in the header, labelled ‘Invoice No.’ or ‘Inv #’”.
When one description mentions another field, use the title as it appears in your schema, such as Customer name, not “name” or “client”.
For a fixed set of answers, list them: “Delivery status: one of shipped, pending, delayed.” Better still, make the field an enum with those values. See Data types.
For dates: “The date received, as YYYY-MM-DD.” For yes/no questions: “Is the payment confirmed? Answer true or false.”
If a document has several candidates, say which one you mean: “Contract date: the date the contract was signed, not the date it was created.”
A short example of the expected output, such as “e.g. INV-2025-0042”, helps the model match the shape you want.

Example

AI Schemas

Edit fields in the app or over the API.

Data types

Pick the right type so values come back in the right shape.