We have been using the document understanding invoice stuff for some time now and it works great. With the addition of the AI Fabric trained models we now have high enough confidence on most invoices in order to start automatically processing some with higher confidence scores on each field. We use a dispatcher workflow to read each invoice with OCR, run through the Machine Learning extractor, then save the results into a Uipath queue. We also have another performer workflow which the AP folks use to validate any invocies in that queue each day.
I would like to modify the dispatcher workflow to check the confidence scores for each invoices as they are read and put through the machine learning extractor. I cannot find the correct namespaces available so that I can create variables for the ExtractionResults.ResultsDocument.Fields.
I have searched the available namespaces in Studio and in the documentation but cannot find any good solution.
I created a ResultDocument object using : var resultsDocument = extractionResults.ResultsDocument
I was thinking maybe something like this would work: resultsDocument.Fields.Where(t => t.FieldName == "Invoice Number").Values.Confidence
How can I get the values of the confidence for each field in our object?
Here is the Confidence property I am trying to access in the ExtractionResults object:
I feel like I could help answer this if you gave me another month or two to create a project that utilizes the DU and ML models to understand the .net around it. @Lahiru.Fernando just presented a solution recently at DevCon where the confidence is checked. He might be able to assist.
@Shikhar_Tandon thanks for the response, but this value is not related to the actual confidence in the fields captured, which we need in order to see that every value has a good selection.
You can see from the entire ExtractionResults object that this confidence is only at the top of the object and is not related to the actual invoice values in the image below. What we need is to get access the the “Fields.Values.Confidence” properties for every field name in our taxonomy circled red below:
@ClaytonM, @Lahiru.Fernando That would be excellent, I would appreciate the help! I can’t seem to find any documentation or forum posts with clues to get further.
I actually found a way to access the object properties using the Newtonsoft.Json.Linq namespace. I don’t think there is any other way since the actual class objects for Extractionresults do not have all the properties available. Here is a screenshot of what I got working: