AI Prompts in Power Platform

So AI friends! I have ANOTHER cool AI thing to share with you in the Power Platform that recently went live! In this post we’ll discuss all things AI prompts for Low Code! 🚀 What is a prompt? A prompt in the generative AI… READ MORE [https://lewisdoes.dev/blog/ai-prompts-in-power-platform]
white paper with black text
Photo by Suzy Hazelwood on Pexels.com
In: Low Code Lewis Content 🚀

So AI friends! I have ANOTHER cool AI thing to share with you in the Power Platform that recently went live! In this post we’ll discuss all things AI prompts for Low Code! 🚀

What is a prompt?

A prompt in the generative AI world is like the starting point for an AI algorithm to work its magic. It’s like giving the AI a nudge in the right direction, telling it what we want it to create. Think of it as the first sentence of a story, setting the tone and giving the AI some context. The AI then takes that prompt and generates a whole bunch of awesome content based on it. So, prompts are like the secret sauce that makes generative AI so awesome! 🤖🔥

AI Prompts in Power Platform

So what is this thing we can now do in the Power Platform and why would we need to predefine parts of a prompt instead of just letting our users hit the LLM with whatever they want?

Now here’s the thing friends, not everyone is going to be an expert prompt-engineer, and yes there is a little bit of an art to asking the LLM what you want in the right way. SO, the thing we have here is an opportunity to template the question that will be pushed towards the LLM, whilst we let our users fill in the various things they need to, to make the prompt contextually relevant.

So when we create AI prompts in Power Platform, we basically create those ‘templates’ and then provide dynamic input to the prompt where the missing gaps need to be filled in and ask app and flow users to fill those parts in. Then we get the perfect prompt delivered to the LLM which will result in a potentially more useful response back!

Creating AI Prompts

So let’s take a look at how to create custom prompts in the Power Platform for app makers to utilise! I’m going to go make.powerapps.com and navigate to AI prompts.

From here I’m going to select the option to ‘Create text using custom prompt’.

Then here, we can check out an example of what we might do with custom prompts, building the hard coded prompt elements whilst allowing for dynamic content variables. Select ‘Create custom prompt’ to continue.

Creating a poem generator

So let’s say we want to build a poem generator. Now we know that people that use our app or something like ChatGPT for example, won’t necessarily know exactly how to prompt the LLM to get the best response. So, we will write the detailed prompt and leave one dynamic value for the user to input the subject they want a poem writing about!

Now we can test our prompt by opening the test your prompt collapsed area. So I’ve given the prompt a test and as you can see I wanted my poem to be written about artificial intelligence. Now check out the perfect response I got!

So I’ve just built a poem writer using custom AI prompts in Power Platform! 🚀 Ensure you save your custom prompt to finish up.

Using the model in a flow or app

Now I can basically use the model in a flow or app! I will have to populate the poem subject input parameter, and the action to run the model will return back my poem! How awesome is that!

So here, you can see I have the AI Builder model in Power Apps to use…

And then I also have it in Power Automate to be able to utilise in my flows!

So let’s run this simple flow I made which takes an input for the Poem Subject and then returns a poem…

Now lets look into the flow history to see the poem! We could just send this to someone via email or something like that.

And there you have it! My poem generated by my custom prompt and GPT! Awesome! 🙌

Let me know in the comments what custom prompts you’ll be building to make working with GPT even easier for your end users! 💖

Written by
Lewis Baybutt
Microsoft Business Applications MVP • Power Platform Consultant • Blogger • Community Contributor • #CommunityRocks • #SharingIsCaring
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to LewisDoesDev.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.