Wine + GPT4 + Code Interpreter: WOW!!

by | Tuesday, July 11, 2023

OpenAI just released Code Interpreter. It allows you to execute Python code within a live working environment. One of the things that it allows us to do is take data files and conduct data analysis and create graphs and charts.

Not knowing what that meant I decided to play with it. So I found a publicly available database on wine quality (and why not? Don’t give me that look) and imported it into Code Interpreter. I am not including the entire conversation I had with GPT but provide some key excerpts below. You can read the entire interaction in this linked pdf document.

So I started with a complete blank slate. I had no idea what I was doing. So I started the conversation with:

Can you create some interesting data visualizations based on this dataset?

After looking over the data, it suggested the following:

For instance, we can examine the distribution of quality ratings for both types of wine, the correlation between different properties and the quality of the wine, and some other interesting relationships. Does that sound good to you?

And once I said yes, within seconds I had the following diagram, with the explanation below.

In the first plot, “Distribution of Quality Ratings for Each Wine Type,” we can see that the majority of wines, both red and white, have a quality rating of 5, 6, or 7. White wine tends to have slightly higher quality ratings overall compared to red wine. In the second plot, “Distribution of Alcohol Content for Each Quality Rating,” we see that higher-quality wines generally contain more alcohol. This is true for both red and white wines. The trend suggests that wines with higher alcohol content tend to be rated better in quality.

Hmmm… wines with higher alcohol content tend to be rated higher! Why am I not suprised šŸ™‚

Not sure of what to do next, I wrote:

I am interested in some cool visualizations that can emerge from this analysis. What would you suggest?

After a bit of back and forth, where it provided me with a variety of options, I asked it to create a correlational heatmap. Within seconds I had the following.

Here’s the correlation heatmap of the wine properties. From the heatmap, we can observe that:

  1. The alcohol content has a relatively strong positive correlation with the quality of the wine. This observation aligns with our earlier analysis where we noticed that higher-quality wines generally contain more alcohol.
  2. The density of the wine has a somewhat strong negative correlation with the quality of the wine. This suggests that higher-quality wines tend to have a lower density.
  3. The volatile acidity also has a negative correlation with the quality of the wine, implying that better-quality wines tend to have lower volatile acidity.
  4. There are also some strong correlations between different properties of the wine, which are not directly related to the quality. For example, density has a strong positive correlation with residual sugar.

This is when I had to jump onto a meeting in zoom, so I hit pause.

Let me just add that all this took just 20 minutes, maybe less.

I am still trying to wrap my head around this. But the possibilities appear endless and I am constrained by nothing but my imagination.

A few randomly selected blog posts…

Rethinking Little Red Riding Hood

Awesome retelling of the old tale... (h/t Steve Dembo @ teach42). SlagsmƄlsklubben - Sponsored by destiny from Tomas Nilsson on Vimeo. As Steve says (you can read his full post here) such remixing can provide interesting opportunities for teachers, particularly given...

Christine Greenhow visit + new ambigram

Christine Greenhow from the University of Maryland visited the College of Education this past week. She gave a talk and met with various faculty members and graduate students. I had met Christine a couple of years ago when we had both been invited to the National...

Scaling up the SCALE Instrument

Scaling up the SCALE Instrument

Back in 2017, Carmen Richardson and I wrote an article (Richardson & Mishra, 2017) in which we  proposed an instrument (Support of Creativity in Learning Environment: SCALE) designed to assess the ways in which a learning environment supports student...

Amruta Patil’s Family Album

A few weeks ago I had featured Nina Paley, animator and story teller. I just discovered another amazing talent: graphic artist Amruta Patil. I got know Amruta through the desi blog ultrabrown which recently featured an interview (Amruta Patil and Kari: A short Q&A)...

Understanding student engagement

I had posted recently about a Gallup poll on student engagement. Essentially the poll showed that student engagement dropped precipitously (though as I wrote, not as starkly as their graph indicated) as students moved from elementary to high school. My friend, Gaurav...

The Absurd One-Sidedness of the Ethics of AI Debate: A  rant

The Absurd One-Sidedness of the Ethics of AI Debate: A rant

It seems no conversation about AI and education is complete without discussing the importance of the ethical use of the technology. There are numerous reports and academic articles about it (this and this and this ... I could go on and on). There is, however, one...

Flipping the Tech & Ed equation

My research and scholarship has mostly been in the area of educational technology - i.e. how to improve / facilitate learning through the use of technologies. David Brooks in his latest op-ed (The biggest issue) in the NYTimes flips this around somewhat. Citing...

Momentary Lapis Lazuli of Reason: Academia for better or verse

Momentary Lapis Lazuli of Reason: Academia for better or verse

Graduate school can be a grind. Academia can be dull and dreary. But not if poetry and parody are brought into the mix. This is a volume of academic poetry titled Momentary Lapis Lazuli of Reason: Academia for better or verse. The poems in this volume are...

Developing a culture of creativity: Research news

Developing a culture of creativity: Research news

Danah Henriksen and I were featured in a recent news story on the MLFTC News titled: Developing a culture of creativity, instead of compliance, in educators. The article provides an overview of our work over the past few years. Given the nature of a news article, it...

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *