activities
latest
false
UiPath logo, featuring letters U and I in white
Document Understanding Activities
Last updated Nov 14, 2024

Extract Document Data

UiPath.IntelligentOCR.StudioWeb.Activities.ExtractDocumentDataWithDocumentData<UiPath.IntelligentOCR.StudioWeb.Activities.DataExtraction.ExtendedExtractionResultForDocumentData>

Description

Extracts data from an input file or Document Data object, and stores the results into a Document Data object.

Before you begin

Prerequisites

The Extract Document Data activity requires input objects of type Document Data or File. A possible use case for using this activity is to precede it with a Classify Document activity, that generates an object of type Document Data.

Input options
The Extract Document Data activity receives as input one of the following choices:
  • Document Data - from the Classify Document activity
  • File - from Get File/Folder or Get Newest Email activities
Supported languages for generative models

The supported languages for the generative models are the same as the OCR engine used, which depends on the project. For Predefined projects, the OCR Engine used is UiPath Document OCR. For more information, visit the OCR Supported languages page.

Models used by the activity
The Extract Document Data activity uses the following:
  • Public endpoints for out-of-the-box models.
  • Custom ML models deployed in Document Understanding App projects.
  • Generative extraction model.

Project compatibility

Windows | Cross-platform

Configuration

Designer panel
  • Project - Requires you to select your Document Understanding project from the dropdown list. The available options are:
    • Predefined - The default project
    • You can create a custom project by going to Document Understanding.
    Note: If you have created more than 500 projects on your tenant and use the Extract Document Data activity, UiPath Studio or Studio Web will not display any projects beyond the initial 500. Therefore, those projects cannot be used.
  • Extractor - Select an extractor from your current project.
    • For the Predefined project, you have two choices:
      • Select an ML package. Visit Out-of-the-box models for a list of pre-trained models that you can use.
        Note: The Extract Document Data activity overrides the document type with the selected extractor. This is not applicable for generative models.
      • Select the Generative extractor.
        Note: The information sent to the Generative Extractor goes to an LLM Model instance. This instance isn't publicly available, doesn't store the data sent, and doesn't use it for training purposes.
        Important:

        This feature is currently part of an audit process and is not to be considered part of the FedRAMP Authorization until the review is finalized. See here the full list of features currently under review.

  • Prompt - this field appears if you choose the option Generative. Prompt to identify the fields to be extracted, provided as key-value pairs, where the key represents the name of the field and the value a description for it, helping the extractor identify the corresponding value. Click on the field, and you will get a prompt with the following options, provided as pairs:
    • Field name - Requires you to input the field name to be extracted (Ex. Due date) (30-character limit)
    • Generative prompt - Requires you to provide the prompt as input for the Generative Extractor. The maximum number of characters allowed is 1000. The response, extraction result, also called Completion, has a word limit of 700. This is limited to 700 words. This means that you can't extract more than 700 words from a single prompt. If your extraction requirements exceed this limit, you can divide the document into multiple pages, process them individually, and then merge the results afterwards.
    Tip: For good practices on how to use generative prompts, check the Generative extractor - Good practices page.
  • Input - Requires you to specify the file itself, or Document Data, in case you have used other Document Understanding Activities before in your workflow, (for example, Classify Document).
    Important: The maximum numbers of pages a file can have is 500. Files exceeding this limit fail to extract.
Properties panel

Input

  • Timeout (seconds) - Maximum execution time (in seconds) for the call to the generative model. If the operation exceeds this timeout, it is automatically terminated to prevent delays or hangs. This property is only displayed if the Generative Extractor is selected as an extractor.
  • Auto-validation - Use this option to enable automatic validation, a capability that helps validate the results obtained for data extraction against a Generative model. The default value for the Auto-validation field is False.
    • Confidence threshold - This field becomes visible once you enable Auto-validation. Extraction results falling below the threshold are compared to the generative extraction model. If they match, the system adjusts the extraction confidence to meet the threshold value. Possible threshold values range from 0 to 100.

      If the value is set to 0, no validation is applied. However, if you set a specific value (from 0 to 100), the system checks all extraction results below this value. For example, if you set a confidence threshold of 80%, the system will apply the generative validation for fields with confidence below 80%.

      Note: Auto-validation is available only for specialized extraction models.
  • Generate Data Type - If set to True, indicates that the output should be generated based on the selected extractor, resulting in an IDocumentData<ExtractorType> object. Alternatively, if set to False, indicates that the data generation should be skipped, resulting in a generic IDocumentData<DictionaryData> object.

    Visit Document Data for additional details and limitations available for the two object types.

Output
  • Document Data - All the extracted field data from the file. Information can also be received from Classify Document.

    Visit Document data to learn how Document Data works and how to consume the extracted results for single and multi-value fields.

Using the generative extractor

To quickly get started with the generative capabilities of the Extract Document Data activity, perform the following steps:

  1. Add an Extract Document Data activity.
  2. From the Project dropdown list, select Predefined.
  3. For Extractor, select Generative Extractor.

    The Prompt property appears in the body of the activity.

  4. In the Prompt field, provide your instructions as Dictionary key-value pairs, where:
    • Key represents the Field Name (example: email address).
    • Value represents the Generative prompt: The description used by the generative extractor to identify the corresponding value.

      For example, check the following table for a sample of key-value pairs:

    Table 1. Examples of key-value pairs for the generative extractor prompt
    Field nameGenerative prompt
    Name"What is the name of the candidate?"
    Current Job"What is the current job of the candidate?"
    Employer"What is the current employer of the candidate?"
    Figure 1. Key-value pairs prompt for the generative extractor

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.