Data Values (Quoting Method): Difference between revisions

From Grooper Wiki
// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
 
Line 1: Line 1:
{{AutoVersion}}
{{AutoVersion}}


{|class="wip-box"
<blockquote>{{#lst:Glossary|Data Values}}</blockquote>
 
{|class="download-box"
|
|
'''WIP'''
[[File:Asset 22@4x.png]]
|
|
This article is a work-in-progress or created as a placeholder for testing purposes. This article is subject to change and/or expansion. It may be incomplete, inaccurate, or stop abruptly.
You may download the ZIP(s) below and upload it into your own Grooper environment (version 2025). The first contains one or more '''Batches''' of sample documents. The second contains one or more '''Projects''' with resources used in examples throughout this article.
 
* [[Media:2025 Data-Values Batch.zip]]
This tag will be removed upon draft completion.
* [[Media:2025 Data-Values Project.zip]]
|}
|}
<blockquote>{{#lst:Glossary|Data Values}}</blockquote>


== Introduction ==
== Introduction ==

Latest revision as of 09:55, 4 August 2026

This article is about the current version of Grooper.

Note that some content may still need to be updated.

2025

Data Values is a Quoting Method that sends selected previously extracted data to the AI Model when using Grooper's AI functionality.

You may download the ZIP(s) below and upload it into your own Grooper environment (version 2025). The first contains one or more Batches of sample documents. The second contains one or more Projects with resources used in examples throughout this article.

Introduction

Data Values is a Quoting Method that sends extracted document data to AI as structured output from your Data Model. Instead of quoting page text, regions, or layout objects, it quotes the values already captured in Data Fields, Data Sections, and tables.

Its purpose is to give the AI a clean, organized view of what Grooper already knows about the document. This is useful when you want the AI to reason over extracted results instead of rereading the original document content.

Unlike other quoting methods:

Use Data Values when the AI task depends more on structured field values than on raw document text. This often produces clearer prompts, reduces noise, and makes it easier for the AI to interpret related values together.

You would typically use Data Values when:

  • You want AI to validate extracted values against one another.
  • You want AI to summarize a document from fields already captured in the Data Model.
  • You want AI to classify or route documents based on extracted values.
  • You want AI to review line-item or section data that has already been extracted.
  • You want to pass structured data to AI in a predictable format.

Real-world examples include:

  • An invoice workflow where AI reviews Vendor Name, Invoice Number, Total Amount, and line items for consistency.
  • A claims workflow where AI summarizes claimant information, dates, and loss details from extracted fields.
  • A forms workflow where AI checks whether required fields are present before downstream processing.
  • A decisioning workflow where AI uses extracted values to recommend a status, category, or next action.

In general, choose Data Values over another Quoting Method when the important information is already extracted and organized in the Data Model. Choose a text-based quoting method when the AI must inspect wording, nearby context, or page layout that is not represented well in extracted fields.

When to use Data Values

Data Values is usually the best choice when:

  • Your extraction is already producing reliable field values.
  • The AI needs structured input rather than page text.
  • You want to limit the prompt to only relevant Data Fields or sections.
  • You want consistent input across similar documents.

Data Values may be a less suitable choice when:

  • The needed information has not been extracted yet.
  • The AI must interpret raw wording from the document.
  • The AI must use page position, reading order, or visual relationships.

How To

There are many ways to use the Data Values Quoting Method, but in the following tutorials, we will show just a couple of examples of how it can be used. The important thing to remember is Data Values feeds previously extracted data to the LLM.

Data Validation Example

Let's say you extract some information from a document, but you want the extracted data validated in some way. Using Data Values, you can send just the information you want validated to the LLM and ask it to perform the validation for you.

In this example, we are going to ask the LLM to validate the extracted data from a couple of invoices:

  1. In this example we have already set up the Project to extract the information from the Invoices.
  2. The Data Section and fields for Validation will be populated after the rest of the extraction is completed using Data Values.
  3. Set a Description for the "Is Invoice Valid" Data Field. This description will be used by the LLM to understand how to populate the field. Click the "..." to open the editor.
  4. We want the Field populated with a "Yes" if the invoice is valid and a "No" if the invoice is invalid. So we have typed in the following for the description: "If the Balance Due Data Field is accurate for this invoice, fill this Data Field with "Yes". If the Balance Due Data Field is not accurate for this invoice, fill this Data Field with "No".
  5. The Validation Reason Data Field needs a Description too. If the invoice is invalid, we want a reason entered into this Data Field. So we have entered "If the Is Invoice Valid Datat Field value is "No", explain why the invoices is inaccurate. If the Is Invoice Valid Data Field value is "Yes" then leave this Data Field blank."
  6. On the Data Model, open the Fill Method editor by clicking the "..." to the right of the property.
  7. Configure an AI Extract Fill Method for the Data Model.
  8. All Data Fields except the Validation Data Section and Data Fields should be selected in the Included Elements property. These are the fields that will be populated with the Fill Method.
  9. Add an additional AI Extract Fill Method.
  10. Set the Model according to your preference. For this example we are using gpt-4.1.
  11. Open the Included Elements editor.
  12. Select the Data Fields you want populated. In this case, we want the "Is Invoice Valid" and "Validation Reason" Data Fields populated, so those, and the Data Section, are selected.
  13. This second Fill Method is going to be using Data Values to determine if the extracted information is valid. So, next we need to set the Document Quoting property to Data Values.
  14. Expand its sub properties and open the Document Quoting Included Elements property.
  15. Select all of the Data Elements you want to send to the LLM. We want the data that was extracted from the document to be sent to the LLM to determine if the invoice is valid. So all Data Fields that should have been extracted via the previous Fill Method are selected here.
  16. You will need to change the Name to something distinctive. You will need to reference this name later.
  17. When Extract runs in the Batch Process, we do not want this AI Extract Fill Method to run. To keep it from running during extract, we type the word "False" as the Trigger. Click "OK" when finished.
  18. Save your changes.

Once you have your Fill Method configured with a Data Values Quoting Method set in your Project, we need to add a Batch Process Step to execute the Fill Method.

  1. Right-click on the Batch Process. Then, hover over "Add Activity", hover over "Document Processing", and click on "Fill Data" in the fly out menu.
  2. When the Add Activity window pops up, click "Execute".
  3. You should have a Fill Data Step in your node tree under your Batch Process. Select the Fill Data Step and open the Content Type Filter editor located in the Activity Properties property grid.
  4. When the Content Type Filter window appears, select the Content Types for the documents you are processing and click "OK".
  5. Next we need to set the Fill Method Name. Click the hamburger icon on the right to access the drop down.
  6. Locate the Fill Method based on the name you assigned it.
  7. Save your changes to the Fill Data Step.
  8. To see what happens after the Fill Data Step runs, add a Data Review Step configured with a Data View.
  9. Select the Extract Step in the Batch Process. Then, click over to the "Activity Tester" tab and test extraction.
  10. Once that is finished, click on the first Data Review Step. Test the Batch at the Batch Level.
  11. You should see the Data Review pop up. Notice that everything is extracted from the document except the Validation section. Click the back arrow to go back to the Design page.
  12. Select the Fill Data Step. Test the same way as the Extract step.
  13. Once that is finished running, select the second Data Review Step. Test at the Batch Level.
  14. The Validation section is now extracted. The first document is valid. All dollar amounts and quantities add up.
  15. Click over to the second document in the Batch. Notice that the invoice was found to be invalid and a reason given for the decision.


Send Mail Example

A popular use for AI is email generation. We can use Grooper's AI Functionality to use extracted information from a document to generate an email. In this example, we are going to ask the LLM to use the validation data from the previous example and send out an email saying whether or not the invoice was found to be valid, and if it was not, what the reasoning was for the invalidation.

This tutorial picks up where the previous one left off. We have a model for invoices and a fill method that uses Data Values to determine the validation of an invoice. Next, we are going to generate the body of an email to send stating whether or not the processed invoice is valid.

  1. Start by adding a new Data Field to your model for the generated Email Body. Adjust the properties as desired to display the Email Body so it's easier to read.
  2. Navigate to the Data Model and open the Fill Methods editor.
  3. Add another AI Extract Fill Method and set the generator to your preferred model. For this example we are using gpt-4.1.
  4. Open the Included Elements editor.
  5. The only Data Element we want filled with this Fill Method is the Email Body Data Field. Select that and click "OK" on the pop up window.
  6. Next, set Document Quoting to Data Values and expand its sub properties.
  7. Open the Included Elements editor for Document Quoting.
  8. Select any Data Element you want included in the body of the email you want sent. In our case, we want to reference the Invoice Number, the Invoice Date, and then the validation information. When finished, click "OK".
  9. Open the Instructions editor.
  10. Type in your instructions to the LLM for how to format the body of the email. After you test your extraction, if you are not receiving the response you want, you can come back here and edit your instructions to the LLM. Click "OK" when finished.
  11. Give this Fill Method a unique name.
  12. When finished configuring, click "OK".
  13. Save your changes to the Data Model.
  14. Add a Fill Data and Data Review Batch Process Step for the Email Body generation.
  15. On the Fill Data Step, set the Content Type Filter and set the Fill Method Name to the Fill Method we just configured.
  16. Set the Content Type Filter to the Content Model and Document Type.
  17. The Data Review Step has been configured with a Data View.
  18. Test the Fill Data Step.
  19. Once that is finished, test the Data Review Step.

If the generated response is not what you were expecting, go back to the Fill Method and refine your instructions to the LLM and test again.

Now that we have had the LLM create the body of an email, let's go ahead and send out an email. To do that we need to add a Send Mail Batch Process Step.

  1. Right-click on the Batch Process. Hover over "Add Activity", hover over "Utilities", and then click "Send Mail" in the fly out menu.
  2. When the "Add Activity" window appears, click "Execute".
  3. Configure the Mail Server, User Name, and Password with your credentials. Note that depending on your method of authentication, you may need to generate an app password through Microsoft to use this function.
  4. You may want to increase the Timeout time. Sometimes it can take longer than 10 seconds to send the email. We will increase it to 30 for this example.
  5. Set the "To" property to the recipient's email address.
    • Note, that if you have extracted an email address from a document, or have populated a field with an email address from a database, you can reference that field here. In our situation, we're just going to assume that every email is going to the same address.
  6. Open the Subject editor.
  7. Type in the desired subject line of the sent email.
    • You can use extracted values. Typing an open curly bracket will allow the Grooper intellisense to pop up and give you options. If we wanted to reference the Invoice Number Field, we would have selected "Field", followed it with a colon, and then typed in the name of the field followed by a closed curly bracket.
  8. When finished configuring your Subject line, click "OK".
  9. Open the Body editor.
  10. We could write the body of the email here, but we already had the LLM write the email body for us, so we just need to reference that Data Field. Use the open curly bracket again to access the Grooper intellisense, and then reference the Email Body Data Field. End with a closed curly bracket. When finished, click "OK".
  11. Save your changes to the Send Mail Step.
  12. Click over to the "Activity Tester" tab and test the Send Mail Step.
  13. The first email verifies that the first invoice was valid.
  14. The second email gives the invoice number and date followed by why this invoice was found to be invalid.