Generating graphs with ChatGPT
ChatGPT generated bar graph based on excel file

Generating graphs with ChatGPT

Hidden behind the drama that has been going on around OpenAI are some great new features of the system. I have been using them one by one, and want to report on some of the most interesting ones.

Multimodality is the new buzzword flying around AI. It means that the LLM's can work not only with text, as ChatGPT3 started, but to work across multiple types of media.

There were already LLM's that could generate images. I've used Dall-E in several of my articles before, with better or worst results. While it had unique major fails, like hands with 6 fingers, or cross eyed faces. Yet, they were separate tools, that you had to use independently.

One way I tried using them was to ask ChatGPT to help me outline a presentation, and then use the prompts it generated to feed them to Dall-E. Yet unless it was something abstract, Dall-E could not really generated anything that could just be used. For one it could not really write text, nor was really able to create any useful graphs.

Multimodal ChatGPT

A few weeks ago, Open AI held its developers conference where they announced that ChatGPT would now be able to not just generate artwork, but also analyze files that the user could upload using the new interface.

New ChatGPT prompt with a camera, media and file upload buttons on the left.

The new multimodality included a way to input prompts using voice, and also to receive audio feedback. Kind of a smarter Siri or Alexa that you can chat with.

The function that I really wanted to try was the file analysis function. What better than ask it to look into some statistics and create some graphs for me? And so I got one of my chaotic excel file with statistics on some of my posts and have it analyze and create some graphs I could use.

The file I sent, while containing all information on my posts, was formatted with human readable subtotal rows on a monthly basis. It also included 4 different tabs with some aggregated data. So I was not surprised with the first analysis that ChatGPT did of it:

The dataset contains a mix of monthly aggregate data and per-story data. Based on the first few rows, here’s a proposed structure for the columns:

1. Month: Date of the data.
2. Followers: Number of followers.
3. Follower Change: Change in followers.
4. Monthly Income: Total income for the month.
5. Views: Total views (the actual column for this is unclear from the first rows).
6. Reads: Total reads (the actual column for this is unclear from the first rows).
7. Per Story Data: Various metrics related to individual stories, such as income per story, reads per story, etc.

Due to the complexity and the unclear labeling of columns, I’ll focus on the aggregate monthly data for now (Followers, Follower Change, and Monthly Income). Let’s create a trend analysis over time for these metrics.        

Yet, it failed to create a graph, returning this kind of feedback:

It seems there was an error because the cleaned data set data_cleaned was not properly defined due to the earlier issue with column names. I need to correct this before proceeding with the analysis. 

Let's first accurately clean and structure the data with the correct column names and then perform the analysis. I'll focus on the aggregate data such as followers, follower change, and monthly income, as these are clearly identifiable from the initial rows of the dataset.        

After several iterations I modified the original file to remove the entries that was confusing the AI. I ended up with the standard flat list in just one tab and fed it to the system. This was successful and it presented the following preview of the possible graphs that it can produce:

Initial suggestion of graphs by ChatGPT with a cleaner input file.

Not bad for an initial suggestion, but not really something that I could not have generated with a few clicks within Excel. So I decided to ask it to do a bar graph. The first version was this:

Bar graphs on the Total Reads per Month

On one hand I was happy to see the creativity. I had never seen a rainbow themed bar graph. Yet, the formatting of the timestamps was not acceptable. I was however able to have it correct it with a simple command.

Timestamps reformatted to a month/year display

This is a graph that I would use in a presentation, and that uses a creative way of making it look nicer than just the boring single color bars that you would get with Excel.

Multimodal artwork

With this I decided to give it a new task. I do happen to make my own wine from my vines. It is really an artisanal operation, but I do still need a wine label. This is something I have done myself below. Yet this time I decided to ask ChatGPT for help. This is what was created:

Wine label, yet misspelled

Beauty is in the eye of the beholder. I do like the creativity but it is not the kind of label I was looking for. In the way it has been generated it is not useable. There are several misspellings like the missing N in Engineering, and the missing C in Muscat. The glyph next to the percent is a self created art, and the wording at the bottom almost reads like latin.

I like how it exchanges Big to Wing Bear on the left label. And how it almost sounds drunk when it calls the wine "Swheest Wine".

Yet it tries to add a recicle icon and a barcode to it. On the right label it also tries to include a Nutritional Facts table.

I am looking forward to a next version of this multimodal ChatGPT. I am sure it will learn to spell better, and its glyphs will get better.


要查看或添加评论,请登录

Miguel Rodriguez的更多文章

社区洞察

其他会员也浏览了