This article is contributed. See the original author and article here.
OpenAI’s GPT-3 AI applications have become a buzzword in the industry. If you’re looking to boost your business operations and maximize productivity but are encountering technical barriers and resource limitations, the app highlighted in this article may be your answer.
It smoothly integrates Azure OpenAI into various business workflows, showcasing a spectrum of AI-powered demos. This demo highlight the technology’s capabilities and can help streamline your business operations while optimizing productivity.
Let’s build your business process with OpenAI
Resources
Azure OpenAI – Summarization & gain insights
- Power Apps – To build front end
- Power Automate – To build the process
Getting Started
1. Azure Open AI – Summarization & Gain insights
- Register for Azure OpenAI – https://learn.microsoft.com/en-us/azure/cognitive-services/openai/overview
Once got approved create Azure OpenAI resource in Azure portal.
Select region as East US.
Go to Open AI studio https://oai.azure.com/portal
Create a Deployment with DaVinci 003 model inside the resource.
3. Create 2 SharePoint Lists
- Prompts for your custom questions (change questions & prompt types as per your business requirements)
- Conversation insights to save Open AI generated insights from the email text (change column names as per your business requirements)
Scenario 1: Lets start with conversation insights. Assume you have an email enabled conversation. You want to get some insights from the email text.
To generate insights, PowerAutomate is used and then results are saved in SharePoint.
3. Create a PowerAutomate
Here are the steps to create a Power Flow:
- Go to flow.microsoft.com and click on “Flows”.
- Visit https://make.powerautomate.com/
- Click “New Flow” and name it “OpenAI-Insights“.
- It has many variables for multiple prompts at once and save insights from one conversation in SharePoint List.
- Build the entire flow according to your requirements.
- When a new email arrives-Choose email trigger if email’s conversation you want to use as a source to gain insights. Else you can use any other trigger depends upon where your conversations stores. e.g. Teams chat, SharePoint, blob storage or any other storage solution.
- HtmlToText-Get email body as a plain text using html to text connector.
- Get items– SharePoint Connector to get the prompts list to run on your email text to gain additional insights
- Initialize Variables-# of variables are initialized based on number of prompts
- initialize a variable called summary to store output.
- Apply to each -OPEN AI step loop through each prompt question on original conversation text to get the insight and save the result via case statement in the initialized variable.
HTTP Connector
Method: POST
URI: https://resourcename.openai.azure.com/openai/deployments/davinci003/completions?api-version=2022-12-01
Headers content-type:application/json
api-key: [Azure Portal -> OpenAI resource -> Keys & Endpoints]
Body {
“prompt”: @{variables(‘promptPhrase’)},
“max_tokens”: 1000,
“temperature”: 1
}
ParseOpenAIOutput-Parse the response from OpenAI HTTP output.
Click Generate from sample in Parse step and paste the below sample json to parse the response from HTTP output
{
“body”: {
“id”: “cmpl-xxxxxxx”,
“object”: “text_completion”,
“created”: 1678909613,
“model”: “text-davinci-003”,
“choices”: [
{
“text”: “nThe main reason of the conversation is to give credit to travel company for their gracious refund of the cost of the no-show.”,
“index”: 0,
“finish_reason”: “stop”,
“logprobs”: null
}
],
“usage”: {
“completion_tokens”: 27,
“prompt_tokens”: 91,
“total_tokens”: 118
}
}
}
After parsing we need to loop the array and assign the text to the variable
Apply to each action. Select Choices from parse step output as the array property.
Set Output – variable “Summary”
Switch: It has 6 case actions based on number of prompts to set the each variable based on each HTTP Post call.
end of Apply to each -OPEN AI step #11 (loop through each prompt question and call OpenAI endpoint to get insights. Parse the response and save it in each prompt related variable)
- Create Item – Once all the variables are set then create an entry in the SharePoint Conversation insights list with original text and additional insights
How to utilize insights into a process
PowerApps can be created with SharePoint list to create a business process around insights generated by OpenAI on each customer conversation.
Dashboard->Details screen-> Process each conversation with Insights
https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/app-from-sharepoint
Dashboard – Vertical galley in PowerApps with SharePoint list ‘Conversation Insights’ as a Data Source
Item details page with OpenAI insights to accelerate the customer service – Display form in PowerApps
Stay tuned for more exciting blog content as we explore various potential scenarios.
Effortlessly extract text from documents, audio, and video files to generate valuable insights.
Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.
Recent Comments