Skip to main content

Query a document using natural language

Retrieves details from a document using a natural language query.

Supported languages: English

Review Configuration Section for instruction on sending multiple queries.

Common use cases

  • Accounts payable invoice processing

Application

  • Intelligent Document Processing

Inputs (what you have)

NameDescriptionData TypeRequired?Example
DocumentDocument to retrieve details from. Accepted document formats are PNG, JPEG, TIFF, or PDFFileYesSOP_123.pdf
Document queryQuestion that will be searched in the document. “Document query” can not be more than 200 characters long and is most successful when formed as a question with proper grammar and spelling.Text(Short)YesWhat is the Vendor’s Address?
Query pagesThe specific pages you want to include in a search within a document. You can only have up to 9 ranges per request. You can use hyphens to specify page intervals such as 1-3 and a lone asterisk to refer to all pages. If an asterisk is submitted as part of a page interval such as 3-_ the _ will indicate the last page.List of textNo1-2

Note: the value of inputs can either be a set value in the configuration of the Wrk Action within the Wrkflow, or a variable from the Data library section. These variables in the Data library section are the outputs of previous Wrk Actions in the Wrkflow.

Outputs (what you get)

NameDescriptionData TypeRequired
Query resultThe answer to the question asked in the document queryText (Short)Optional

Outcomes

NameDescription
SuccessThis status is selected if details are extracted from the document provided.
No ResultThis status is selected in the event of the following scenarios:No details were found in the document provided.
Impossible to CompleteThis status is selected in the event of the following scenarios:Query pages exceeds 9 range items

Configuration

Instructions on how to use this Wrk Action with up to 15 queries at the same time:

This WA is meant to extract a single piece of information for each query.

ExplanationConfiguration of "Document query" input
Two queries that map to "Fields to Capture" of Field1 and Field2.Field1: Query: What is the total amount? Pages: Will search on pages 1 to 3 and page 5. Field2:Query: What is the page title?Page: All pages{"Field1": {"question": "What is the total amount?", "pages": ["1-3","5"]},"Field2": {"question": "What is the page title?", "pages": ["*"]}}

Version# 1.0