User Review
( votes)In the previous blog we have already explored the AI prompt integration with Power Automate using the “Create text with GPT using a prompt” action, At that time while designing the Power Automate we didn’t add any Approval process where humans could review the AI-generated response.
Human review through the approval process is important and recommended which ensures the quality of output generated by the GPT model. You can review this MS doc to understand why Human review is important in any automation. Sometimes AI model responses can be misleading and need human intervention to adjust and approve those responses to improve the quality.
In this blog let us focus on incorporating the Approvals along with the “Create text with GPT using a prompt” action and observe the advantage of combining AI with approval where a human can review the AI-generated response and can either approve or reject it (with maybe some modification or maybe with no modification in AI response) which then ultimately enhances the overall quality of AI-generated model outcome.
In Power Automate while exploring the actions around the approvals connector, recently I came across the new action introduced specifically for validating AI-generated text responses.
In the previous blog we have already created a custom AI prompt named “QA Team Members Quarterly Progress Review”, now let us integrate it within Power Automate.
Step1:
For simplicity let us select the “Manually Trigger a flow” trigger and pass 2 inputs as text boxes.
Then add an action from the AI Builder connector named “Create text with GPT using a prompt” as shown below, wherein you can dynamically pass those 2 declared inputs in the previous step:
NOTE: As you can observe in the above screenshot, the Flow checker shows the warning that appeared and in detail provides a way to fix it, we can skip fixing it but it is always recommended to incorporate the Approval after the “Create text with GPT using a prompt”.
Step2:
After #step1, now add the Approvals action, under it select “Start and wait for an approval of text” specifically as this is newly introduced for handling the AI-generated text response.
You can find more details about the “Start and wait for an approval of text” approval action in this MS doc.
Fill in the details of the required parameters below:
- Title– You can give any desired name so that an approval record can be created with that name.
- Suggested Text– You need to pass the AI-generated text from the previous step for approval either approve OR modify and then approve OR reject
- Assigned To– Define the email address of the approver
Step3:
After #step2, for simplicity now add the condition action to check if the Outcome of the previous step of approval is approved.
If the condition is satisfied then the yes path will execute, where in for demonstration I have added one compose action where in passing the ACTUAL Accepted text retrieved from the previous step as shown below, In reality, you can forward this ACTUAL Accepted text further may be with email step or so on.
Once saved the final Power Automate design will look like the below:
Let us quickly test the flow manually as below:
Provide the Feedback and KPIs input, and click on the “Run Flow” button as shown below:
If you open the flow run, you will observe the “Start and wait for an approval of text” step is waiting for a response from approval either approve or reject.
Let us open “Approvals” that are received from the above Power Automate Flow.
Navigate to > https://make.powerautomate.com/ > under Approvals > Open approval record > Review the generated AI text and modify/edit it as per need and Approve the text, optionally you can provide comments as well.
NOTE: Unlike the “Start and wait for an approval” action (refer to this doc) where there is no provision to edit/modify the text, you can just approve or reject it. Here you will observe while responding either with Approve or Reject approver can modify the text on the fly.
Let’s say I reviewed the text added a few lines on the top, and selected the response as Approve with adding the comment below:
Click on confirm, Once Power Automate Flow gets an approval response it will proceed further.
Under Accepted text step of composing, you will observe the modified accepted response that was approved by approver as shown below:
Conclusion
Using the human review approval step in Power Automate we are ensuring the quality of output generated by the GPT model and if needed modifying the generated AI response thereby achieving greater productivity.
The post Incorporating Start and wait for an approval of text action for the AI generated response first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.