web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :

Using AI Prompts to summarize data for end users within a Power App

madlad Profile Picture Posted by madlad 2,637 Moderator

Data analysis is one of the most important aspects of the Power Platform.

But what's the best way to display tables and tables of data to users? Manually creating charts, filtering important information, and finding trends can be tedious, or even downright frustrating. That's where AI prompts come in.

 

In this example, I will show one way AI can be used in power apps to make this process much more efficient.

1. To begin, create an app to gather/review data. Here I have a simple app, with two screens. One to collect data, and one to analyze it.

madlad_0-1718395847804.png madlad_1-1718399405364.png

 

Here, we only have a table of the data - technically we're showing the data, but it's not very useful for providing insights, showing trends, or anything else, especially once we have a significant amount of data. Alternatively, we could add some charts or other visualizations to display these; but these can be challenging to set up, especially if we want to view large amounts of data, or data with many columns. What we need is something which can make intuitions about data, looking at general trends, outliers, and make inferences about what it could mean.

 

2. Let's make an AI prompt which can analyze our reviews, and return a detailed summary in an easy-to-understand way.

 

In the Power Apps page, go to "AI Hub", and the select "Prompts".  Then select "Create text with GPT using a prompt"

  madlad_2-1718401403405.png madlad_3-1718401536180.png

 

To start, let's give it a name. I chose "Analyze Reviews" for mine

Then, add a new input. We'll call in "JSONValue"

madlad_4-1718401860221.png

 

Then, add a prompt to analyze it. Anything important you can include here, make sure you include your "JSONValue", and that you specify what you want out of it. 

One of the most powerful aspects of of AI in this regard is that you don't have to specify columns. This makes it much easier to analyze data, without having to make sure you don't disregard any important points.

madlad_5-1718402172640.png

 

3. Now, back to the app, where we will use this AI prompt, to provide a better understanding of the data presented.

 

To begin, add the AI prompt to the app by going to the "data" tab > "Add Data" > "AI Models" > "Analyze Reviews"

madlad_0-1718485755916.png

Now, create a button, which will input the data as a JSON value, and save it to a variable. Here, I used the following code, which feeds the AI prompt only the reviews and the date created, so it can observe trends over time. There are likely more efficient ways to do this, but this one demonstrates the concept the best out of what I tried.

Set(
 DataAnalysis,
 'Analyze Reviews'.Predict(
 JSON(
 ForAll(
 Reviews,
 {
 'Created On': 'Created On',
 'Cost Rating': 'Cost Rating',
 'Efficiency Rating': 'Efficiency Rating',
 'Quality Rating': 'Quality Rating',
 'Professionalism Rating': 'Professionalism Rating',
 'Additional Details': 'Additional Details'
 }
 )
 )
 )
)

 

Finally, we just need a way to display this. Here I've simply used a label, being sure to turn the overflow property to "Scroll" since the AI prompt can return a lot of text, unless told otherwise.

madlad_1-1718486570917.png

The full analysis here:

Analyzing the numerical reviews provided in the JSON array, we can observe the following trends:

1. **Cost Rating**: There is a mix of ratings ranging from 1 to 5. The service seems to be perceived as expensive by some customers, while others find it reasonable.

2. **Efficiency Rating**: The efficiency ratings vary from 1 to 5. Some customers mention longer wait times, while others praise the efficiency of the service.

3. **Professionalism Rating**: Ratings for professionalism range from 1 to 5. There are comments about both professional and unprofessional behavior of the employees.

4. **Quality Rating**: Quality ratings are mostly positive, with ratings of 4 and 5. Customers generally seem satisfied with the quality of the service provided.

In terms of consistent strengths and weaknesses:
- **Strengths**: The service is consistently rated highly for quality, with most customers giving ratings of 4 or 5.
- **Weaknesses**: Cost and efficiency seem to be areas of concern, with varying ratings and comments about high costs and longer wait times.

For outliers:
- One outlier is the review mentioning a significant increase in costs, which could be a point of concern for the business. This outlier highlights the impact of cost changes on customer satisfaction.

Overall, the service seems to excel in quality but may need to address issues related to cost and efficiency based on the feedback provided in the reviews.

 

 

So what does this all mean?

The main reason for demonstrating this, was to showcase AI prompts ability to read data from a table without specifically being told what everything is. Sure, to help it out I've used somewhat descriptive column names, but it has inferred that they are numerical reviews on a 1-5 scale, it's noticed the order they were created, and it's connected unusual values to specific complaints provided in text reviews. All I had to do was point it in the right direction. Beyond that, this doesn't even use actual visualizations, just a text response. Just imagine how far it could take those useful tools- in fact, try finding out!

 

Categories:

AI Builder topics Canvas Apps

Comments