[Sideproject] Auto-generate charts based on any input with GPT-3

Hi everyone! I’ve built a little fun project to auto-generate charts based on any input with GPT-3.

Here’s what I’ve found so far:

  • Works well 70% of the time with only one learning example
  • Based on what you ask, it chooses the right unit/suffix for the y-scale to compare the data
  • Correctly returns the output as a json object

Possible new features:

  • Allowing you to ask things about the data, such as “why is A higher than B?”
  • Allow multiple ways of starting the question (“List the…” was provided as the only example)
  • Adding a trends feature for line charts

The most interesting part to me is how it’s able to figure out the correct value for the y-scale. For example, when you ask it to show the tallest buildings in the world it figures out it should compare them by height, and it displays the correct unit on the chart. Same goes for percentages, weight, number per population, etc.

I’m probably not going to release this, but thought this was cool to share :slight_smile:

You can check out the little video demo here:

https://twitter.com/FalkoJ/status/1493587802977619971

5 Likes

Hi @falko ,

This is very cool.

I also have a question: How do you ensure that the data is factual?

Hi @sps glad you like it!

At this point there aren’t any fact checking mechanisms in place yet. I’ve built this on one short evening. :smile:

However, I was thinking about letting another dedicated GPT instance do some sort of fact checking on it’s own results by only judging the likelihood of the answer (true / likely / incorrect).

For example if it would show on the chart that the weight of a cat is 200kg, I could ask another GPT-3 instance to verify if this is likely, and if not to correct it.

1 Like

this is what i struggle with as someone who is not a dev, taking a concept and putting into an application.

2 Likes

Awesome! How did you manage to create charts or bar graphs? When I ask GPT to create charts then it gives message that it is a text based model and cant create images. Have you integrated output of gpt to a chart application?

1 Like

please let me know when you have figured it out.

1 Like

Hi @manu.chadha , what I did was asking it to format its response in a JSON object!

Hi @praharsha.k you can make something like this by simply asking GPT-3 to format its response in a JSON object!

Hi Falko,

Well, I am also struggling in this. As it is a side project for you, can you share GitHub link of yours where you might have uploaded this.