Generating Powerful Visualizations with Azure's OpenAI Assistant API

Hello everyone, Today we will learn how to create the best visualizations through the assistant API in Azure Openai API.

Step 1. If you want to create the best visualization through the Assistant API, you need to create one deployment in the Assistant API playground.

Once the deployment is completed, we need to go for a few more steps. I need to guide you through the remaining steps as well.

Assistant setup

In the Assistant playground, we need to set the assistant.

To set up the assistant, we need to mention some details, First, we need to add the deployment name as per your request.

 Assistant playground

Step 2. Once you set up the deployment name, you need to add some more details. Add the assistant name in the blank field and also add some instructions as per your input data.

Deployment name

Step 3. After you enter the instruction details, then, you go for adding some assistant tools to your deployment model.

Here, you need to add some more details to your model, you need to add any functions as per your requirement.

Then you must and should enable the "CODE INTERPRETER". Once you are able to enable that function then only you can able to create the visualization.

Finally, you need to add some input files if you want to interact with these functions and get some best visuals based on your input data.

CODE INTERPRETER

Note. You can upload the input files up to 20 files with a max size of 512 MB.

Step 4. Then you can tap on the "SAVE" Button at the top of the page, then only you are able to utilize this playground.

Save button

Step 5. After Saving your function. You can see the playground now. I just gave a 'Hi' prompt, and immediately I got the response.

Preview

Now, I need to add some input raw data of students' marks, and I need to ask to create a bar graph.

Step 6. I gave one prompt like "some raw data listing the marks of five students (Prathap, Lokesh, Mounika, Sarada, Jana) in six subjects (Maths, Physics, Chemistry, Biology, English, History)"

Student   Maths  Physics  Chemistry  Biology  English  History
--------------------------------------------------------------
Prathap   78     65       81         72       88       76
Lokesh    85     72       78         82       90       84
Mounika   68     81       74         85       78       62
Sarada    90     85       76         88       65       72
Jana      75     68       82         70       85       80

The above prompt I just gave to this model, I got some responses like this to see below.

Prompt

Response

And again, I gave one more prompt: "Please create a bar graph based on the data ". I got some response

Bar graph

Data

Based on my raw input data, I got the best visualization through the assistant API playground. Not only can you generate the bar. You can able to create a number of visualizations.

Conclusion

Overall, the Assistant API empowers users to unlock the potential of AI and effectively utilize its capabilities to streamline workflows, make data-driven decisions, and facilitate meaningful insights.