Excel in GPT for analyses of a balance sheet

When I want to create an evaluation from an Excel file, ChatGPT often takes the wrong values from the wrong columns. I then tried specifying the columns. The file is a balance sheet of mine. I wanted to start a key figure analysis.

But I can’t give ChatGPT the columns every time, it’s more time-consuming than doing it myself. The columns are well named and clear.

How do you make sure that ChatGPT can read Excel cleanly? I am quite good at prompting and not a beginner.

Are you using the ChatGPT interface or the API?

If the former, then it should be sufficient to specify the columns at the beginning of a conversation and then as you proceed to carry out the key figure analysis it should be able to maintain the “contextual information” about the structure of the document (depending on the length of the interaction you may have to repeat the information at certain intervals though).

If on the other hand you are using the API, then you need to consider that the API is stateless, meaning there is no information retention between API calls per se. To accommodate for that, you would need to send information about the document structure and the analysis approach with every single API call.

I use the GPT and Excel, i.e. the balance sheet as an upload to Knowledge. Specifically: What would be the best procedure if I want to have my balance sheets evaluated regularly? I already use it but, as already mentioned, with errors that should not occur. Would a Tabel as a database connection be better? E.g. with Airtabel?

Thanks for the details.

One of the things I would try if I was in your shoes was to upload a separate text file to the knowledge base that includes the calculation methodology for each of the key figures you’d like th GPT to calculate. As part of this, I would specify the data sources from your Excel that are required for each calculation so that you are reducing the risk of misinterpretation of data by the model. Obviously, in your instructions in the GPT you would need to reference this methodology file.

No guarantee that this will work but it is something that I personally would test.

I was able to create a GPT to help me query an excel sheet with a business budget. It didn’t work at first and was definitely an iterative process that took about two hours of trial and error to get it dialed in. Two things that definitely helped were: 1. stating that it had to “cite” what cell that it retrieved the answer from in the excel sheet 2. Using conversation starters to ground it in the beginning of the conversation (as in I would specifically state “I have a question in regard to the 2024 budget sheet”). Even that didn’t make it perfect right away, i had to do a few test chats and correct it when it didn’t follow its instructions but after i did that it seemed to learn and carry the changes through multiple different chat threads. Then it was just a matter of fine tuning the prompts, which was more trial and error. If i prompted and didnt get the right answer i would correct chatgpt so that it would see what i actually wanted and then i would ask how i could change my original prompt so that in the future i would get the correct answer the first time. Then i just dialed in all of my most commonly used prompts and saved them to a prompt library. I’ve provided an example picture below so you can see what the final output now looks like.

Not sure I understand your comment/feedback.