Power Community

Power Community

Exploring AI Prompts within Power Automate

As generative AI builder tools are becoming more and more popular, it is worth learning and using them to get the most out of them. One of the exciting features among AI builder tools is “AI Prompts” which are now generally available. AI prompts are used as a guide for AI models to generate the output.

If you compare AI prompts to the early days of search engines correct “Keywords” is the key to search precisely. If you put correct keywords while searching then you will get more accurate results based on entered keywords, the more your keywords are precise higher the chances that you will get the exact result based on keyword search.

This same art goes with AI prompts as well, the more you spend time creating an accurate AI prompt with precise instructions higher the chances that the corresponding AI model will generate the specific output more accurately.

Creating the right prompt for a specific task is an art and essential for GPT to perform the instructed tasks more accurately. To create custom prompts efficiently, refer to this Microsoft doc.

In this blog, we will explore one of the existing AI prompts. how we can use that existing prompt in integration with Power Automate, and validate its results.

Let’s begin…!

From the Maker Portal  https://make.powerapps.com/, you can navigate to AI prompts, as part of the new AI Hub you will now have access to AI Prompts builder. There are 3 tabs available for navigation within “AI Prompts”:

  1. My Prompts- If you create any custom prompt as per your need it will appear here.
  2. Shared with me- If any other user shares the prompt with you then it will appear here.
  3. All prompts- All the prompts that are present in the system will appear here.

For this blog demonstration, let us select “All prompts”, explore pre-built/existing prompts available, and learn how to integrate them with other Power Platform components.

Exploring AI Prompts within Power Automate

NOTE: If you are not able to see “AI Prompts” in the left navigation pane of Power Apps then click on “Discover” and search for the same and pin it for quick navigation. You can refer to this blog to discover all your power apps that are not pinned in the first place.

You can look for existing prompts in the “All Prompts” tab as shown below:

Exploring AI Prompts within Power Automate

In this blog demonstration, let us use the “AI Sentiment” prompt in Power Automate and see the result, before that you can quickly open the prompt body and can quickly test the prompt with some inputs/sample values. And once you are happy with the testing you can use this prompt in the Power Automate.

Exploring AI Prompts within Power Automate

I have added sample data for testing as: “I am satisfied with your service”

Click on “Test prompt” and you will find the corresponding “AI Response” generated as shown below:

Exploring AI Prompts within Power Automate

Use Case: Need a Power Automate that takes input from customers by any means like email or survey response, validates that text through AI prompt and as an output, it should validate the input text whether sentiment is positive, negative, or neutral.

Power Automate Steps:

For simplicity let us select the “Manually Trigger a flow” trigger and pass text as input.

Then add an action from the AI Builder connector named “Create text with GPT using a prompt (Preview)” as shown below:

Exploring AI Prompts within Power Automate

NOTE: There was Create text with GPT connector available prior, which is deprecated now and replaced with this new connector Create text using a prompt where you have to select the prompt.

Under this action now select the name of the prompt from the dropdown menu, I selected “AI Sentiment”

Exploring AI Prompts within Power Automate

Now select the Input Text from the Dynamic content list from the previous step

Exploring AI Prompts within Power Automate

Once you save the Flow you will see the warning appearing at the top

Exploring AI Prompts within Power Automate

NOTE: The warning above prompted to add approval action before the GPT model output is passed to the next step. Optionally you can add Approval action this is not a mandatory step but it’s good to have a reviewing step where a human intervention can be included as a quick review to validate the output generated by the GPT model. To add the Approval step, you can refer to the Microsoft doc where detailed steps are mentioned.

For now, I am skipping the Approval process and letting us straight away send the GPT model output as is (without human review) to the Outlook email body as explained below.

The output generated from the previous step Create text with GPT using a prompt can be passed to the next step as an output parameter, it generates a flow variable called Text, which represents the output of your prompt generated by the GPT model. I am passing that output in the email body

Exploring AI Prompts within Power Automate

Once done save the Flow and this is how it will look like:

Exploring AI Prompts within Power Automate

Run the Flow manually and provide the input as below and click on “Run flow”:

Exploring AI Prompts within Power Automate

Upon clicking on “Run Flow” an email should be received with the generated AI response as shown below:

Exploring AI Prompts within Power Automate

Conclusion

With AI Prompts, you can tailor Generative AI capabilities as per your organization’s business needs and achieve greater productivity when integrated into Power Automate.

Microsoft Power Platform

This post was originally published on this site

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement - Advertisement

Latest News

Preferred Solution | New feature | Microsoft Dataverse

Click on the below image to navigate to my YouTube Channel. Please like and share your valuable feedback on this...

More Articles Like This

- Advertisement -spot_img