using document intelligence and gpt to query on extracted text?

Diallo, Mouhamadou S 5 Reputation points
2023-12-11T19:22:23.25+00:00

Hello, how could I accomplish this in an Azure logic app flow (using document intelligence and gpt to query on extracted text)? The reason why I want to use Azure document intelligence for ICR as it read better than AI Builder hand written (I've tested the same document on both tools but the AI builder is not returning the correct values for some fields like first name ai builder is returning the the zip code as first name). So in Azure logic app flow, I want to extract data from form and then add gpt step to send to gpt a query from the returned text or json response. I want also to add an approval step with all key values pairs fields for manual review. Thanks

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
2,100 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,826 Reputation points
    2023-12-12T12:23:39.68+00:00

    Thanks for the question, Here are the high-level steps:

    1. Extract Data from Form: You can use Azure Document Intelligence (formerly known as Form Recognizer) to extract data from your form. It applies advanced machine learning to extract text, key-value pairs, tables, and structures from documents automatically and accurately. It can handle both printed and handwritten text.
    2. Add GPT Step: After extracting the data, you can send the extracted text or JSON response to a GPT model for further processing. You can use the HTTP action in Logic Apps to send a POST request to the GPT model’s API endpoint. The request body would contain the extracted text or JSON response.

    https://blog.sandro-pereira.com/2023/03/07/using-logic-apps-to-interact-with-chatgpt/

    3. Add Approval Step: You can add an approval step in your Logic App flow. This can be done using the “Start and wait for an approval” action in Logic Apps. You can configure the approval email with the key-value pairs fields extracted from the form for manual review.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.