Financial Analysis: Inside ChatGPT's New Code Interpreter

Mark Wickersham, a chartered accountant, shows how ChatGPT's Code Interpreter plugin lets you upload Excel or CSV files and run financial analyses instantly. Upload a QuickBooks export and ask for summaries by supplier, totals, charts, and next steps. It handles complex calculations that earlier ChatGPT versions couldn't manage.
Questions this video answers
Around the start of July 2023.
ChatGPT Plus (GPT-4 access) is required to enable Code Interpreter.
CSV and Excel (XLSX) files, e.g., QuickBooks Online export.
Chapters
People say ChatGPT can't do math. It will never replace accountants and bookkeepers. It can't do math. Well, it can. And something big happened at the start of July 2023, which opens up so many opportunities, so many possibilities for forward thinking accounting professionals who Want to use AI, want to use ChatGPT to get more out of their firms, more out of data. So I'm going to share with you in this video, a brand new tool that, that you can use to do data analysis in your accounting firms.
Hi there, it's Mark Wickersham, a chartered accountant and author of Effective Pricing for Accountants. And in this video we're going to look at how we can do data analysis by with ChatGPT and Something Brand new that was launched at the start of July. This is so exciting. Let me start off first by talking about the problem because people talk about how ChatGPT is a large language model, so it's great when it comes to words and there are so many powerful use cases for using it. And we'll have talked about that on previous videos. But what about numbers, which of course, as accounting professionals, that's really important to us. Well, it's pretty good at analyzing numbers, at analyzing data. And in previous trainings I've talked about how we can use it for looking at trends, for example, understanding what's going on behind a business. Because with ChatGPT, both the free version 3.5 and also if you upgrade to ChatGPT plus and have access to ChatGPT 4, one of the things that we can do is we can cut and paste the data from, for example, an Excel spreadsheet into a prompt and ask questions. But there are some things it does struggle with. So let me give you an example. Here's one of the things that I was trying to do with ChatGPT, I had an Excel spreadsheet, in fact, I will just briefly pull it up. I had an Excel spreadsheet which was list of transactions and the amount spent and the date. And there were some other things I just removed because they weren't relevant. So I had an Excel spreadsheet and what I wanted to do with the, with the spreadsheet. A common thing that accounting firms want to do is we might want to summarize that so that we could identify how much has been spent with each individual supplier. For example, we might just want a summary of the suppliers and the total spend in the year from a year's worth of data, summarize it by supplier and something. For example, when I ran My accounting firm would be something done as part of the working papers to then identify things that, for example, might not be tax allowable, et cetera. So I decided to set about figuring out how to do that in ChatGPT. So what I did and I'm going to take you to ChatGPT now. This is the problem. I said, here I want you to summarize the data I'm about to give you. I want you to create a table with columns for name and total. I want you to calculate the total amount from the account column for each company listed in the name column. The goal is to show the total amount spent for each individual company. And then I cut and pasted in the Excel spreadsheet. And it as I let me just get through this bit, it then did that. It created a table just as I wanted with a summary of the spending for each expense code. And at first I was thinking this is doing a pretty good job, but it seemed to then get it then got stuck. Or rather I asked it to then do a total column because it didn't total it, because one of the things we must do is double check everything. We're professionals. And when I gave it the task to redo it and put a total at the end, I then realized it wasn't correct. It started to stumble a bit. We've got Microsoft Azure here with the individual amounts, not the total amount. It took me a few goes. Ultimately, eventually, after keep doing prompts and correcting it, changing the prompts, getting to do it again. Eventually I did get a summary, what looked like a pretty good summary of the expenses. But I asked it to also give me the total so I could go back to the Excel spreadsheet and and check it was correct. And what I found was it wasn't correct. It hadn't done it right. I tried it over and over again and it's one of the weaknesses of ChatGPT, or at least was one of the weaknesses in terms of it's not great at complex calculations. I also tried using some plugins like for example, Wolfram, which is a great plugin for doing various financial analysis. It couldn't do it. It couldn't do it. I struggled. And then finally at the start of July, they brought out the plugin that everybody was waiting for. What are plugins? So plugins were introduced a few weeks back and they completely revolutionized ChatGPT. What plugins are, Think of the way the iPhone was introduced over a decade ago. Then Apple introduced the App Store. And when the App Store was opened it suddenly opened up what was simply a phone that you could do messaging with and access the Internet into so much more. If we think about our phones now, the number of apps that we use, it increases the things that we can get from a phone a hundredfold. But in the early days, it was a little bit confusing with all of these apps, and most people ended up with Angry Birds. Anyway, over the years, the apps have got better. And there are some incredible apps, our smartphones these days. Well, plugins are just the same. Plugins are. Think of the Apple App Store. Plugins are the app store for ChatGPT. And the great news is there are some really powerful plugins, but also there's a lot of plugins in there that are either of no relevance to accounting firms or they're just not very good. Anyway, one of the big plugins that everyone's been waiting, waiting for is Code Interpreter. Now, code interpreter is OpenAI's own plugin. OpenAI, of course, being the company that created ChatGPT, they have created their own plugin, it's called Code Interpreter. And this is extraordinary, what it can do. And one of the things it can do is financial analysis. So let me tell you, first of all, how you get access to it. So I'm just going to go. So firstly, you have to be on ChatGPT Plus. So if you've got the free version, you've got access to 3.5. And 3.5 is pretty good. There's lots of great things that you can do. But I would always recommend that if you're serious about AI, if you're serious about ChatGPT, if you're serious about saving hours of time in your accounting firm, then you really want to upgrade to ChatGPT plus. There are so many benefits of it. We talk about that in other videos. I won't go through those now, but. But one of them is you will get access to Code Interpreter. How do you do that? Well, let me skip back across here. What you'll want to do is go down to the bottom of the menu and click on the three dots next to your name, and that will open up Settings. If we open up Settings and click on the beta features, then you will find that this is where you can turn on plugins, which has been out for a few weeks now, perhaps a couple of months even, and Code Interpreter. So you simply turn on Code Interpreter. You do need to have the plus account. If you haven't got it, then in Settings you can upgrade. It's a tiny investment. It's really worth doing it. So that switches on the code interpreter. So now what I'm going to do is start a brand new chat. So when you start a brand new chat, you get the option if you've got the plus account of using ChatGPT 3.5 or 4, we're going to want to use 4. But in addition to 4, you can choose whether you have the basic default, whether you want to use plugins, or whether you want to use Code Interpreter. So we're going to use Code Interpreter. It is in beta, so it will get better. But already there's a lot of stuff that we can do with Code Interpreter. And one of the big things about Code Interpreter is that you can attach files. And as an accounting professional, probably the most powerful, the most useful file that you'll want to attach is a CSV file or an Excel spreadsheet. Okay, so let's do exactly that. I'm just going to hit. You'll see that we now have with Code Interpreter, a plus symbol. And this is where you upload a file and we can also create our prompt. So I'm just going to go and grab an Excel spreadsheet. Let me just show you what that spreadsheet looks like. This one happens to be downloaded from QBO QuickBooks Online. It is one of their dummy bits of data that you can play with. And this is a. I think it's billable expense income. So we've got a number of different columns here. I've not tidied this up. This is the raw file that I downloaded from qbo. Okay, so what we want to do is we want to upload that into ChatGPT's code interpreter and we want to ask its first prompt. So let me just quickly upload that for you. So you'll see it's now uploaded the Excel spreadsheet. It happens to be called Test Data 2. And I've just put in a prompt there that says, what does this data relate to? Because I just want to make sure it understands the Excel spreadsheet. I didn't tidy it up. It was just a raw spreadsheet downloaded from QuickBooks online. So if I hit the return key, it's now going to go and analyze that data. It might take a few seconds and you'll see just like if you're familiar with plugins, it will explain what it is, it will work through. And if it's got that green bar, as you saw, you can click on that and see what it's actually working on. So here you Go. It's now saying the data appears to be related to financial transactions, specifically invoicing for billable expenses. Here are some observations. And it's trying to understand what the data and the columns refer to. And it's a pretty, it's pretty good. It's understood that that is financial transactions. I never told it that. I just simply uploaded an Excel spreadsheet and it's interpreted it. So let's now do something useful with that. Let me go and just grab another prompt. So my prompt now is to summarize by customer customer name, showing the total amount of sales for each customer. And I wanted to output as a table and also show the total amount. So let's run that and see what it does. So it's going away and analyzing the data. It's doing its workings. This takes a little bit longer than the normal ChatGPT4 because it's using a plugin. It's having to go back to the data and do some analysis. But actually that was pretty quick. It's come up with, it's come up with its analysis and it's going through and it's summarizing those, it's summarizing the totals for each of the individual customers. And it's told me as well, I asked to give a total of 27,524 75. Well, as a, as a good accountant, we should be double checking that it knows what it's doing. So let's go back to the Excel spreadsheet and just check what the total should be. So here is the raw spreadsheet and as we go across we'll see that in column J, it's 2752475 pence. This is in UK, which is 100% correct. There you go. You can see it says here, total 27,524 75. It's got a different currency symbol because it's not, because it doesn't know what currency is. I could have told it that in the prompt, but I'm not too worried about that. And then what you could do is you can take that table and you can copy and paste that table back into Excel and do further stuff with the summary if you want to. Okay, I'm going to share with you a couple more things, but before I do that, let me ask you one question, and that is tell me in the comments box. Now you've seen that we can feed an Excel spreadsheet, perhaps something you've downloaded from QBO or Sage or Xero. You can feed it into code and ask questions. How might you use it? What prompts might you ask? What analysis might you do with Excel spreadsheets? Let me know in the comments below how you intend to use it, what uses you can see. And also if you found this valuable so far, please just click the like button. And also make sure that if you've not done so already, if you subscribe to the channel and hit the bell icon, you'll get notifications when I upload new videos. Okay, let me share with you one or two more things that we can do. Now we are up and running with code interpreter. I'm going to and just save some time. I have already typed out a couple of extra prompts. So another thing that we can do with code interpreter which is really useful is having then done that. Let me just go back to here. Having done that, we could then also we could ask it what what are the best charts for summarizing the data? So we haven't got a lot of data here, but you may be working with clients with a lot more data and we could create some charts. So if we were to ask it what charts we could create, it'll come back and tell us, of course that visualizing data can help us understand trends. And in this particular case we could do a bar chart. We could create a pie chart, a line chart. It's telling us what charts that we could use to represent the data, our summary of of our customers and what they've spent in the year. So I'm going to now say create a bar chart. I'll just add for this data.
And let's see what it does. So it's working, it's working on it. It's going back into the plugin now it has to do some additional work and if we click on show work, it'll tell us what it's actually doing. It's using Python code behind the scenes, but let's not worry about that. It's just need to wait a little bit. It's finished working now and it should come up with something fairly soon. It's not instantaneous, but it's still reasonably quick sometimes though. Oh, it's coming, it's coming, it's coming. I'm just being impatient. Okay, here it is. So look, there is your total sales by customer chart based on that analysis of an Excel spreadsheet. Wow, that was pretty fast. Okay, so what else might we do? So if you're not sure of ideas, let me just grab another prompt and we'll show you One more thing. So remember, let me know in the comments box what uses that you can see. But if you're strong to think of uses, we can just ask ChatGPT. So I've got a prompt that says in what other ways could I analyze this data? And so let me run that and it says the data set you have offers several opportunities for further analysis. We could look at trends over time. We could look at sales by transaction type. We could look at invoice size analysis. We could look customer segmentation, revenue concentration, predictive modeling. It's understanding this data. It understands the Excel spreadsheet and is giving us ideas of different ways that, that we could analyze this data. I don't know about you, but I think this is so, so powerful. The possibilities are huge now that we have code interpreter built in to ChatGPT. In the weeks and months to come in our live streams, we'll give you further examples and ideas and things that you can do in your accounting firm to analyze data. Okay, one final point though of course before I leave is we do have to be aware of security and privacy.
And we'll talk about that on another video. How you get around that. We do have to be aware of that. There is within ChatGPT the ability to turn on effectively a private mode. But whether you've done that or not, I would certainly recommend that when you upload data, make it anonymous. Don't include the client's name. Okay? Don't include the client's name, make it anonymous. That's my key tip. Okay. If you found this video valuable, then please click the thumbs up button and let me know in the comments. The potential you see in ChatGPT and code interpreter, how might you use it for analyzing financial data? Hopefully I will see you on a live session soon. We run regular live streams on AI and ChatGPT where you can ask me and my team questions. Bye for now.
More from Mark

Effective Pricing Training: Mastering Software Settings for Optimised Pricing

Can Pricing Be Done in Writing? How to Handle Value Conversations Without Calls








