Re: Question for everyone : How are you using OpenAI GPT in AI Builder?
I have explored some of the possibilities of the AI options (getting data from receipts and sentiment analysis) within the Power Platform, but I don't think it is ready for real-world use yet. I have also used ChatGPT to get assistance with developing flows when I am struggling with an expression. It often makes up its own commands. For example, yesterday I wanted an expression to get the current week number and determine if it was an odd or even week. It kept providing false information. Attached is the transcript of the conversation I had with the AI.
I was eventually able to figure out an expression by what the AI was trying to do (even if some of the commands were not in Power Automate), so it is helpful from that perspective. And when I showed it my result, it did a good job of breaking out the expression and explaining it.
Additionally, I am in a heavily regulated industry. I am concerned about the data processed by the AI being used to train it further and then that information getting used outside of the company. I have read some articles in the news already where companies have used AI and it has caused issues. I've seen that Microsoft plans to release a private version of the AI tools, but initial reports say this will be 10 times more expensive than the current version. See Microsoft could offer private ChatGPT to businesses for “10 times” the normal cost | Ars Technica for more information.
This is the expression I ended up with:
if(equals(mod(add(div(dayOfYear(utcNow()),7),1),2),0),'Even','Odd')
And this is the explanation of it from ChatGPT:
Here's how the expression works:
-
dayOfYear(utcNow()): This function gets the current day of the year.
-
div(dayOfYear(utcNow()), 7): This expression divides the current day of the year by 7 to get the current week number.
-
add(div(dayOfYear(utcNow()), 7), 1): This expression adds 1 to the current week number to ensure that the first week of the year is considered week 1, not week 0.
-
mod(add(div(dayOfYear(utcNow()), 7), 1), 2): This expression calculates the remainder of dividing the adjusted week number by 2, which will be 0 for even weeks and 1 for odd weeks.
-
equals(mod(add(div(dayOfYear(utcNow()), 7), 1), 2),0): This expression uses the equals function to check if the remainder is equal to 0, which indicates an even week. If it is, the expression returns 'Even'. If it is not, the expression returns 'Odd'.
Attached is the complete transcript with ChatGPT for creating the expression and at the end it tells why it didn't provide this expression to me in the first place.
If I have any advice for people using AI to help with workflow development, be persistent with the AI even if at first it gives you erroneous information. Feed it the error messages and analyze what it is trying to do. Additionally, always feed it generic information and nothing personalized or with company data unless you really know how it is being used and shared by the AI.