Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W-16684499 einstein doc action #45

Open
wants to merge 5 commits into
base: latest
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* xref:release-notes.adoc[Release Notes]
* xref:document-processing.adoc[]
* xref:creating-document-actions.adoc[]
** xref:analyze-documents-with-einstein.adoc[]
** xref:example-einstein-prompts.adoc[]
* xref:adding-reviewers.adoc[]
* xref:publishing-document-actions.adoc[]
Expand Down
29 changes: 28 additions & 1 deletion modules/ROOT/pages/_partials/create-document-actions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,36 @@ adding-reviewers.adoc
// tag::initialSteps[]
. In the sidebar, click *Document Actions*.
. Click *Create New*.
. Select the type of document to use as a template, specify a name for your document action, and click *Create*.

// tag::selectType[]
. Select the type of document to use as a template and specify a name for your document action.
// end::selectType[]
// tag::selectGenericType[]
. Select the Generic document type and specify a name for your document action.
// end::selectGenericType[]

. Click *Create*.
// end::initialSteps[]

// tag::highlightedValues[]
IDP highlights fields in yellow when the extracted values have a confidence score below the configured threshold.
// end::highlightedValues[]

// tag::uploadSampleFileStep[]
== Upload Sample Files and Preview the Results

After creating a new document action, upload sample files to test the extraction process:

. Click *Select files* and upload sample files to analyze.
+
You can upload up to 10 files with a size limit of 8 MB per file.
. Click *Run* to analyze the files and get a preview of the results.
+
The document action editor shows a preview of the analyzed document that you can zoom in and out for better visibility. Navigate the different pages of the document using the *Previous* (*<*) and *Next* (*>*) buttons. Switching pages updates the extracted values shown in the *Outputs* section.
+
To preview the JSON response containing the results, click *Show JSON* after running the test extraction.
+
include::partial$create-document-actions.adoc[tag=highlightedValues]

After uploading the sample files, configure the schema.
// end::uploadSampleFileStep[]
2 changes: 1 addition & 1 deletion modules/ROOT/pages/adding-reviewers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ include::partial$permissions.adoc[tag=permissionBuild]

To create a new document action and add reviewers:

include::partial$create-document-actions.adoc[tag=initialSteps]
include::partial$create-document-actions.adoc[tags=initialSteps;!selectGenericType]

include::partial$add-reviewers.adoc[tag=commonSteps]

Expand Down
49 changes: 49 additions & 0 deletions modules/ROOT/pages/analyze-documents-with-einstein.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
= Analyze Generic Documents With Einstein

By default, IDP uses Natural Language Processing (NLP) to extract document data. You can enable and use Einstein to analyze unstructured and semi-structured documents that don't use a standard format or are difficult to read without performing a complex analysis of the extracted data.
Cristian-Venticinque marked this conversation as resolved.
Show resolved Hide resolved

To analyze documents with Einstein:

. <<create-new-document-action>>
. <<upload-files>>
. <<add-prompts>>

== Before You Begin

* Ensure Einstein is enabled for your organization.
* Ensure you have any of the following Anypoint permissions:
+
--
include::partial$permissions.adoc[tag=permissionManage]
+
include::partial$permissions.adoc[tag=permissionBuild]
--

[[create-new-document-action]]
== Create a New Document Action

To start extracting data from documents, create a new document action:

//starting steps
include::partial$create-document-actions.adoc[tags=initialSteps;!selectType]

Next, upload samples files to test the extraction.

//upload sample file
[[upload-files]]
include::partial$create-document-actions.adoc[tag=uploadSampleFileStep]

[[add-prompts]]
== Add Prompts to Extract Values

Create prompts to configure the schema for extracting fields or tables from your document:
Cristian-Venticinque marked this conversation as resolved.
Show resolved Hide resolved

. Select an example prompt or click *Start from Scratch* to create custom prompts.
. Provide a name for the field or table column to extract.
. Write an instruction using natural language to extract the field or table column.
. Set a confidence score threshold for this field or table column.
. Click *Save*.

== See Also

* xref:example-einstein-prompts.adoc[]
38 changes: 20 additions & 18 deletions modules/ROOT/pages/creating-document-actions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include::partial$document-action.adoc[tag=definition]

Create a document action using a predefined type as a template, and then specify which fields are mandatory, which fields to exclude from the JSON response, and the minimum confidence score expected for each field.

You can also extract specific data from a document using questions in natural language, for example:
You can extract additional data from a document using questions in natural language, for example:

* What is the subtotal amount?
* What is the grand total?
Expand All @@ -15,8 +15,9 @@ After you create a new document action, you can add reviewers and publish it to

When you create a document action, ensure that the configured schema works for each uploaded document. If you can't customize the schema to work with all sample documents, consider creating multiple document actions. For example, purchase orders from multiple vendors might be different enough to require a separate document action for each vendor.

Creating a document action requires the following tasks:
Creating and customizing a document action requires the following tasks:

. <<create-new-document-action>>
. <<upload-files>>
. <<configure-schema>>
. <<add-prompts>>
Expand All @@ -29,24 +30,19 @@ include::partial$permissions.adoc[tag=permissionManage]

include::partial$permissions.adoc[tag=permissionBuild]

[[upload-files]]
== Upload Sample Files and Preview the Results
[[create-new-document-action]]
== Create a New Document Action

To start creating a new document action, upload sample files to test the extraction process:
To start extracting data from documents, create a new document action:

//starting steps
include::partial$create-document-actions.adoc[tag=initialSteps]

. Click *Select files* and upload sample files to analyze.
+
You can upload up to 10 files with a size limit of 8 MB per file.
. Click *Run* to analyze the files and get a preview of the results.
include::partial$create-document-actions.adoc[tags=initialSteps;!selectGenericType]

The document action editor shows a preview of the analyzed document that you can zoom in and out for better visibility. Navigate the different pages of the document using the *Previous* (*<*) and *Next* (*>*) buttons. Switching pages updates the extracted values shown in the *Outputs* section.
Next, upload samples files to test the extraction.

include::partial$create-document-actions.adoc[tag=highlightedValues]

After uploading the sample files, configure the schema.
//upload sample file
[[upload-files]]
include::partial$create-document-actions.adoc[tag=uploadSampleFileStep]

[[configure-schema]]
== Configure the Schema for the Extraction
Expand All @@ -56,13 +52,17 @@ Configure the schema by selecting fields to hide from the response, fields that
. In the *Outputs* section, click *Fields* and select any of the extracted field names to configure the following settings:
+
--
** *Visibility*: defines if this field shows in the output JSON result. Click *Visibility* (image:visibility-icon.png[2%, 2%, "The Visibility icon"]) to hide this field.
** *Threshold*: the minimum required confidence score accepted for this field. If the returned *Confidence* value is below the threshold, the document is queued for human review.
** *Visibility*: defines if this field shows in the output JSON result.
+
Click *Visibility* (image:visibility-icon.png[2%, 2%, "The Visibility icon"]) to hide this field.
** *Threshold*: the minimum required confidence score accepted for this field.
+
If the returned *Confidence* value is below the threshold, the document is queued for human review.
** *Required*: select this option to send the document to review if the field is missing or can't be extracted.

You can click *Focus* (image:focus-icon.png[2%, 2%, "The Focus icon"]) to center the preview in the corresponding field.
--
. If your document contains tables, click *Tables* to configure the extraction settings for the table columns.
. If your document contains tables, click *Tables* to configure *Visibility*, *Threshold*, and *Required* settings for each of the table columns.

After configuring the schema, add Prompts to your document action.

Expand All @@ -86,6 +86,7 @@ Prompts don't support special characters.
. Click *Run* to analyze the document again and see the results of the prompts.
. Click *Save*.

////
=== Using Einstein's Response

After you configure prompts and run a document analysis:
Expand All @@ -97,6 +98,7 @@ After you configure prompts and run a document analysis:
Use Einstein to answer complex questions about the document, such as asking the total of an invoice after deducting taxes and other concepts, or asking in which language the document is written.

See xref:example-einstein-prompts.adoc[] for additional details.
////

== See Also

Expand Down