- The Prompt Craftsman
- Posts
- š„ ChatGPT Tips Tuesday #17: Let's explore the Code Interpreter!
š„ ChatGPT Tips Tuesday #17: Let's explore the Code Interpreter!
Code Interpreter can do a lot for you and save you some time!
š” ChatGPT Tips for the day
Code Interpreter is capable to do a lot of different things. It is like a powerful sidekick who can follow you command and just do it accordingly.
Based on popular demand, we will explore the use cases of Code Interpreter from ChatGPT.
Before we jump on to talk about how to use it, you might want to know what Code Interpreter is. Based on what I have used it for, I think it is just like having access to a really talented sidekick who can follow your command via the prompts. You can ask it to summarise and analyse data, look at the images you have provided, or just do things as you have commanded.
Here is another view from a fellow user on Twitter which I think is also a good summary.
@Erwin_AI Yeah I've definitely had things with it where I've had to coach it carefully - it's weirdly like code reviewing with a new intern, except it's an intern that's both strikingly stupid and absurdly fast and most importantly never gets tired and gives up
ā Simon Willison (@simonw)
10:07 PM ⢠Jul 14, 2023
Cool, so now how do we access this amazing intern or sidekick? Similar to using the plugins, you would need to have a ChatGPT Plus account to access Code Interpreter. Once you have got the account, you would need to turn on the feature for Code Interpreter to see this function.

Once the feature has been turned on, you should be able to see it in the dropdown for GPT-4 and you can select it to start the conversation with Code Interpreter.

One difference you might notice in a conversation with the Code Interpreter is that you would see an add button to upload files in the prompt input. This is provided so that you can upload various files and use those files as part of the prompt you are providing to ChatGPT. I am not sure what are the limits of the files, but so far I have seen people uploading images, CSV, and pdf files.

Cool, so now we know how to turn on Code Interpreter. Letās have some fun.
For the use cases, I have got four of them that I would like to walk you through:
Analyse data
Summarise a PDF
Create a QR code from an URL
Read and summarise an invoice
Analyse data
This is one of the most talked about use cases so far. To do it, it is as simple as just uploading the data file and then asking in the prompt for some analysis.
For this example, I have got some data regarding how the term āAIā and āChatGPTā have been searched in the last 12 months from Google Trends. You can look for the same here: https://trends.google.com/trends/explore?q=AI,ChatGPT
The highlight of this use case is that ChatGPT can plot the data in a suitable chart type and show you some details from the data shared. See the screenshots below:


One thing I do find is that you would need to push further specifically so that it can deliver some unique insights from the data apart from just mathematical analysis.
If you want to explore the full chat I have got, feel free to check it here: https://chat.openai.com/share/3ec65599-b6c5-407d-9353-d395c1c60425
Summarise a PDF
With the capability of uploading files, it is a no-brainer that you can upload a PDF file for summarization.
For this example, I have uploaded the Tree of Thoughts pdf file for the summarization. Here is the link to the original pdf file: https://arxiv.org/pdf/2305.10601.pdf
Overall speaking, the result is not too bad as it can go through the content even though the count of words in the file goes above the token limit.

Here is the link to the actual conversation I have got: https://chat.openai.com/share/c6332680-530e-4e22-9cee-5d2ad753df24
Create a QR code from an URL
This is a good example of using the Code Interpreterās coding capability.
For this example, I have asked ChatGPT to simply give me the QR code for the URL āwww.google.comā.

For more advanced coding capability, I have also seen people actually building a game with the Code Interpreter. You can take a look here:
Code Interpreter in ChatGPT is incredible! Took me 5 mins to make this game.
You can make your own game assets with any AI generator and then ask GPT-4 with Code Interpreter to write code. If you have any problems you can ask it to fix the errors.
1. Write this prompt: "write⦠twitter.com/i/web/status/1ā¦
ā Kris Kashtanova (@icreatelife)
11:29 PM ⢠Jul 9, 2023
Read and summarise an invoice
This is quite a cool use case where it could actually save you a lot of time.
Letās say you have got an invoice that you would like to read through and collect the data from it in a certain structure, you can now achieve this using ChatGPT instead of doing it yourself or hiring someone else to do it.
For this example, I have tried to upload an image of an invoice and ask ChatGPT to do the reading and data collecting. The invoice image can be accessed here.
Here are the results from the interaction from ChatGPT:

As you can see, it flawlessly read through the invoice image, collected the data I asked for and stored them in the CSV file in the structure as prompted. This is a good example of how ChatGPT with the Code Interpreter is a good sidekick that helps you get things done.
Conclusion
In summary, Code Interpreter is truly one of the most powerful additions that have been introduced to ChatGPT. It allows users to do more with ChatGPT by allowing it to access files and run code with the file based on the prompt provided. If you are looking to get some real results from ChatGPT, this is certainly a good feature that is worthwhile exploring.
š§ What to discuss in the next issue?Choose the topic you would like to learn and I might write it next. |
š¼ļø Image of the day
Looking at what ChatGPT is capable of, no wonder students nowadays might be ditching Wikipedia now š¤£
That is it for the day!
Until I see you next time, stay awesome my friend!
Cheers,
Minjie
Reply