Query group extraction tips

This Sensible Instruct method extracts individual facts in a document, such as the date of an invoice, the liability limit of an insurance policy, or the destination address of a shipping container delivery. When you configure the Multimodal Engine parameter, this method can extra data from non-text images, such as photographs, charts, or illustrations. For an example, see Example: Extract from images

Sensible recommends grouping queries together if they share context. Queries share context when data exists in the same location or region of a document, for example, on the same page. You can configure context using Advanced prompt configuration.

For example, contact information can usually be found in the same location of a document:

New York City, NY
(123) 456-7890
[email protected] 

Combining queries for the location, phone number, and email into the same group will help you maximize the accuracy and speed of your extractions. Frame each query, or prompt, in the group so that it has a single, short answer. Sensible recommends a maximum group size of 10 queries.

Prompt Tips


Example 1

The following example shows using the Query Group method to extract agricultural data from a government report:

Click to enlarge

To try out this example in the Sensible app, take the following steps:

  1. Download the following example document:

    Example documentDownload link
  2. Create a test document type in the Sensible app, then follow the prompts in the dialog to upload the example document and create the type.

  3. Ensure that you're in the Sensible Instruct editor. Click Query group create the following queries to extract data using the following table:

Prompt(Optional) Type
tenancy terms start dateDate
tenancy terms end dateDate
number of days notice for tenant must give to terminate leaseString
monthly rents in dollarsCurrency
when is the rent due in the monthString
grace period for the rent dueString
late fee amountString
fee in dollars for returned checks or rejected paymentsCurrency

Click to enlarge


For the full reference for this method in SenseML, see Query group method.