Extraction of Confidence level in Document Understanding

Hello everyone,
I’m facing a challenge in retrieving confidence levels for individual data fields extracted using document understanding.
The activity used is ‘Extract Document Data’. The output is saved with variable type “IDcoumentData”.

image

Also, it’s important for unattended automation, where further I will use confidence level to decide to move current transaction to action center or not.

1 Like

Hi @Mona_Kumari

Check this:

The videos mentioned above use various activities. In my case, I used “ExtractDocumentData” activity from the UiPath.DocumentUnderstanding.Activities package. However, the videos feature different activities from the UiPath.DocumentUnderstanding.ML.Activities package.
It’s noteworthy that the output of ExtractDocumentData(which I have used) is of type IDocumentData.

This was the suggestion I was referring to, but am getting error:

Result.IDocumentData(Of DataExtractionV1ApplicationFormV1).Fields.Where(Function(field) field.FieldName.Equals(“State”)).Select(Function(State) actual_field.Values.Select(Function(val) val.Confidence))(0)(0)*100

Hi,

Please replace DU_ExtractionResults.ResultsDocument with Result.IDocumentData(Of DataExtractionV1ApplicationFormV1)

DU_ExtractionResults is the output of the extraction result.

Hope this will helps.

Hi @Siva_krishna_Thumma

Could u share complete expression?

Seems like I am missing something

Thanks and Regards
Nived N

double_Confidance = DU_ExtractionResults.ResultsDocument.Fields.Where(Function(field) field.FieldName.Equals(“Field Name”)).Select(Function(actual_field) actual_field.Values.Select(Function(val) val.Confidence))(0)(0)*100

1 Like

Is the Du_Extractedresults output of extract document data activity?

Yes, that is correct

@Mona_Kumari Did you ever get an answer to this question that works? I’m stuck in the same place. Using Extract Document Data activity. Looking to check confidence levels on multiple fields. Compared to levels set in config file to what was extracted. If not we want the document to sent to Actions. Every example I see is either using ML Skill or all documents are sent to the Action Center, which we do not want to do.

Hello,

You can use for each field that code :

invoicesDocumentData.Data.BillingName.Confidence ( For regular Fields)
invoicesDocumentData.Data.Items(0).Description.Confidence (For item Fields)

In here, BillingName is regular field of my invoice. The output of that code will be between 0-1.
I hope it wil help you.

1 Like

Can I get to know what are all confidences we will get in extractor