Skip to main content
Query a document using natural language
Wrk Product avatar
Written by Wrk Product
Updated over a week ago

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)

Name

Description

Data Type

Required?

Example

Document

Document to retrieve details from. Accepted document formats are PNG, JPEG, TIFF, or PDF

File

Yes

SOP_123.pdf

Document query

Question 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)

Yes

What is the Vendor’s Address?

Query pages

The 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 text

No

1-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)

Name

Description

Data Type

Required

Query result

The answer to the question asked in the document query

Text (Short)

Optional

Outcomes

Name

Description

Success

This status is selected if details are extracted from the document provided.

No Result

This status is selected in the event of the following scenarios:

  • No details were found in the document provided.

Impossible to Complete

This 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.

Explanation

Configuration 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

Did this answer your question?