GenAI Solution - How to populate word document using extracted information uding AI Search and Azure OpenAI

Mohd Qusyairi 0 Reputation points
2024-05-31T11:46:37.6033333+00:00

Hi all you beautiful people. Hope you all are having a great day.

I have a little side project that I would like to try and do. I would like to use AI Search and OpenAI to populate a word document using a template using Logic Apps.

I would first upload my documents into a blob storage and use AI Search to extract information such as Total Price, Organization Names. Then I would like to use Azure OpenAI to generate a text summary on the document. Next, by using Logic App, i would want to populate the word template with the information that i extracted from AI Search and also the answer from gpt3.5 based on the prompt.

Does this flow seems right? And how do i integrate it with Logic App?

Any help is appreciated.

Thanks!

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,076 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,222 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,277 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vidya Viraktamath 160 Reputation points Microsoft Employee
    2024-05-31T12:01:18.8566667+00:00

    Your flow seems correct and feasible. Here's a high-level overview of how you can integrate these services using Azure Logic Apps:

    Upload Documents to Blob Storage: You can manually upload the documents or use an Azure Logic App to automate the process.

    Use Azure Cognitive Search: You can use Azure Cognitive Search's built-in capabilities to extract information from the documents in Blob Storage. You can create an indexer that runs on a schedule to keep the search index up-to-date.

    Use OpenAI for Text Summarization: You can use OpenAI's GPT-3.5 model to generate a text summary of the document. You'll need to call the OpenAI API from your Logic App to do this.

    Populate Word Template: You can use the Office 365 Word Connector in Logic Apps to populate a Word template with the extracted information and the text summary.

    Attached a simplified version of the Logic App- logicapp.txt. Please replace 'your-blob-path', 'your-openai-api-key', and 'your-word-template-id' with your actual values. Also, you might need to adjust the actions based on the actual structure of your data.

    This is a simplified version of the Logic App. You might need to add error handling, logging, and other features based on your requirements. Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.

    **

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


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.