From 7746c78d00534f85baf941988d2841d73adfeeb8 Mon Sep 17 00:00:00 2001 From: Cristian Venticinque Date: Thu, 19 Sep 2024 16:42:28 -0300 Subject: [PATCH 1/5] Adding Generic document action with Einstein Updating other topics. --- modules/ROOT/nav.adoc | 1 + .../_partials/create-document-actions.adoc | 29 ++++++++++- modules/ROOT/pages/adding-reviewers.adoc | 2 +- .../analyze-documents-with-einstein.adoc | 49 +++++++++++++++++++ .../ROOT/pages/creating-document-actions.adoc | 38 +++++++------- 5 files changed, 99 insertions(+), 20 deletions(-) create mode 100644 modules/ROOT/pages/analyze-documents-with-einstein.adoc diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 468255e..61b9703 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -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[] diff --git a/modules/ROOT/pages/_partials/create-document-actions.adoc b/modules/ROOT/pages/_partials/create-document-actions.adoc index 4f724e2..921518f 100644 --- a/modules/ROOT/pages/_partials/create-document-actions.adoc +++ b/modules/ROOT/pages/_partials/create-document-actions.adoc @@ -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[] \ No newline at end of file diff --git a/modules/ROOT/pages/adding-reviewers.adoc b/modules/ROOT/pages/adding-reviewers.adoc index d02d278..be29da4 100644 --- a/modules/ROOT/pages/adding-reviewers.adoc +++ b/modules/ROOT/pages/adding-reviewers.adoc @@ -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] diff --git a/modules/ROOT/pages/analyze-documents-with-einstein.adoc b/modules/ROOT/pages/analyze-documents-with-einstein.adoc new file mode 100644 index 0000000..8e5a456 --- /dev/null +++ b/modules/ROOT/pages/analyze-documents-with-einstein.adoc @@ -0,0 +1,49 @@ += Analyze Generic Documents With Einstein + +By default, IDP uses Natural Language Processing (NLP) to extract data from documents. You can enable Einstein for your organization and use Einstein AI to analyze semi-structure or unstructured documents with complex data and extract values. + +To analyze documents with Einstein: + +. <> +. <> +. <> + +== 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: + +. 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[] diff --git a/modules/ROOT/pages/creating-document-actions.adoc b/modules/ROOT/pages/creating-document-actions.adoc index 2cb0191..39f60c5 100644 --- a/modules/ROOT/pages/creating-document-actions.adoc +++ b/modules/ROOT/pages/creating-document-actions.adoc @@ -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? @@ -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: +. <> . <> . <> . <> @@ -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 @@ -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. @@ -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: @@ -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 From 2b5557a1d3664443a251a61f9e79a0710214b01d Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque <46459586+Cristian-Venticinque@users.noreply.github.com> Date: Thu, 19 Sep 2024 16:52:49 -0300 Subject: [PATCH 2/5] Update modules/ROOT/pages/analyze-documents-with-einstein.adoc --- modules/ROOT/pages/analyze-documents-with-einstein.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/analyze-documents-with-einstein.adoc b/modules/ROOT/pages/analyze-documents-with-einstein.adoc index 8e5a456..6010a2b 100644 --- a/modules/ROOT/pages/analyze-documents-with-einstein.adoc +++ b/modules/ROOT/pages/analyze-documents-with-einstein.adoc @@ -1,6 +1,6 @@ = Analyze Generic Documents With Einstein -By default, IDP uses Natural Language Processing (NLP) to extract data from documents. You can enable Einstein for your organization and use Einstein AI to analyze semi-structure or unstructured documents with complex data and extract values. +By default, IDP uses Natural Language Processing (NLP) to extract document data. You can enable Einstein for your organization and use Einstein AI to analyze semi-structured or unstructured documents with complex data and extract values. To analyze documents with Einstein: From c63b4b9e654638ad633fb6c94b58c417399cd6c7 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque <46459586+Cristian-Venticinque@users.noreply.github.com> Date: Fri, 20 Sep 2024 12:38:44 -0300 Subject: [PATCH 3/5] Update modules/ROOT/pages/analyze-documents-with-einstein.adoc --- modules/ROOT/pages/analyze-documents-with-einstein.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/analyze-documents-with-einstein.adoc b/modules/ROOT/pages/analyze-documents-with-einstein.adoc index 6010a2b..9a86668 100644 --- a/modules/ROOT/pages/analyze-documents-with-einstein.adoc +++ b/modules/ROOT/pages/analyze-documents-with-einstein.adoc @@ -1,6 +1,6 @@ = Analyze Generic Documents With Einstein -By default, IDP uses Natural Language Processing (NLP) to extract document data. You can enable Einstein for your organization and use Einstein AI to analyze semi-structured or unstructured documents with complex data and extract values. +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. To analyze documents with Einstein: From fc107d17974d966c3fcb56b67ecae00c97b76f1f Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque <46459586+Cristian-Venticinque@users.noreply.github.com> Date: Fri, 20 Sep 2024 12:39:57 -0300 Subject: [PATCH 4/5] Update modules/ROOT/pages/analyze-documents-with-einstein.adoc --- modules/ROOT/pages/analyze-documents-with-einstein.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/analyze-documents-with-einstein.adoc b/modules/ROOT/pages/analyze-documents-with-einstein.adoc index 9a86668..09a5a31 100644 --- a/modules/ROOT/pages/analyze-documents-with-einstein.adoc +++ b/modules/ROOT/pages/analyze-documents-with-einstein.adoc @@ -36,7 +36,7 @@ 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: +Create prompts using natural language to configure the schema for extracting fields or tables from your document: . Select an example prompt or click *Start from Scratch* to create custom prompts. . Provide a name for the field or table column to extract. From cd48286fd8c46fdea87e5b320e4a338a8b36fc40 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque <46459586+Cristian-Venticinque@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:38:27 -0300 Subject: [PATCH 5/5] Update modules/ROOT/pages/analyze-documents-with-einstein.adoc --- modules/ROOT/pages/analyze-documents-with-einstein.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/analyze-documents-with-einstein.adoc b/modules/ROOT/pages/analyze-documents-with-einstein.adoc index 09a5a31..77a1535 100644 --- a/modules/ROOT/pages/analyze-documents-with-einstein.adoc +++ b/modules/ROOT/pages/analyze-documents-with-einstein.adoc @@ -1,6 +1,6 @@ = 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. +By default, IDP uses Natural Language Processing (NLP) to extract document data. You can 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. To analyze documents with Einstein: