Skip to main content

Smart Extract

A Smart Extract folder pulls data from each document uploaded to it and stores it in a structured way: for example, the supplier, date and amount of each invoice. The extraction is done by an agent, following a schema that defines which data matters.

Use cases: invoices, delivery notes, orders, forms and any recurring documentation with a stable structure.

Before you start​

At a minimum, you need an OCR micro-agent created in Studio: it is the agent that reads the documents. See Micro-agents.

Optionally:

  • A data schema, to set which data is extracted and check that it is met. See Data schemas.
  • A viewer-type integrated app, to see the data with its own design. See Integrated apps.

Set up the folder​

  1. Create a folder and choose the Smart Extract type (see Create a folder).

  2. In Smart Extract settings, fill in:

    FieldDescription
    AgentRequired. The OCR micro-agent that extracts the data
    Data schema (optional)Defines which data is stored from each document
    App (optional)Shows a preview of the extracted data
  3. Click Create folder.

You can change the settings later with Edit folder. The platform asks for confirmation, because it affects documents uploaded from that point on.

These folders accept PDF, PNG and JPG images, and Markdown.

Extraction statuses​

In list view, the Smart Extract column shows each document's status:

StatusMeaning
PendingWaiting for the data to be extracted
Extracting dataIn progress
Data extractedFinished
Extracted with warningsFinished, but the data does not match the data schema
Couldn't extractIt failed. You can retry from the file preview
DuplicateThe file repeats the content of another file in the folder that was already extracted, so it was not extracted again

When an extraction fails, hover over Couldn't extract, or look at the Reason row in the preview, to see the cause:

CauseWhat to do
The extraction agent has no instructionsAdd them in its settings and retry
The extraction agent is not set up correctlyCheck its type and model, and retry
The subscription does not include the agent's AI modelChoose another model or upgrade the subscription
The file is too longTry a shorter one
The cause could not be identifiedRetry and, if it keeps failing, contact support

Anyone without permission to extract sees the cause along with a note to ask an administrator for help.

View and manage the data​

When you open a file, the Smart Extract section shows the status, dates and result, with View the data. The preview also has the Extracted data tab and, if the folder has an app, App view.

ActionWhat it does
Extract data / RetryStarts the extraction if it was not done or it failed
Extract againExtracts again and replaces the current data. Uses credits. The current note is not carried over to the new extraction
NotesA free-text note about the extraction, up to 500 characters
Delete extractionDeletes the extracted data. The file is not affected

These actions require being the file's owner or having the Can manage level on the folder.

If the data does not match the schema, the section says so (The data does not match the schema) and lists the problems with View issues. Review them before using that data in another application.

Best practices​

Reliable extractions
  • One folder per document type: invoices in one, delivery notes in another. Each with its own agent and schema.
  • Define a data schema. Without it, the platform cannot warn you when a piece of data is missing or has the wrong format.
  • Test with a few real documents before uploading a large batch, and adjust the micro-agent's instructions if needed.