I implemented a Gem with Google Sheets access in a client, primarily utilizing Gemini 2.0, this setup initially provided a highly satisfactory experience. This changed on May 21st when Gemini 2.0 was removed and replaced by Gemini 2.5 Flash and 2.5 Pro (Preview).
Following this update, the model’s behavior deteriorated, as demonstrated in this test. It frequently mismanages the path to the sheets when attempting data access, leading to errors. While not consistently reproducible in this test, there were instances where the model correctly opened the “code” module, wrote the necessary Python code, and functioned effectively. (Showed in the example below)
Prior to the change, the model seamlessly imported Google Sheets into a Python DataFrame, performed a left join to combine sales and product data, and generated insights.
The file was created in my google drive, and it’s just a simple sales table and product table. The Gem was given access to this file in it’s knowledge.
The normal behaviour after asking a question like:" Who is our best client? "
Returns this thinking and output:
Defining “Best” Client
I’ve initiated the process of defining the “best client” as requested. My initial thought is to consider the client who has generated the most revenue, as a starting point. To determine this, I’ll be working with the dummy_sales - sales_ data.
Examining Revenue Sources
I’m now diving into the sales data file, dummy_sales - sales_ data.csv, to kickstart the process of identifying the “best client.” My focus is on calculating each client’s total revenue, using this as the primary metric for “best.” The file’s structure will guide how I aggregate the data. My next step will be calculating the total revenue for each client.
Finding the Ideal Client
I’m currently stuck, as I can’t read the sales data. I attempted to access ‘dummy_sales - sales_data.csv,’ but hit a wall with a ‘FileNotFoundError.’ The issue stems from the file’s absence in my current working directory. I need to figure out how to navigate to the correct location.
Retrying Data Access
I’m restarting the file reading process. I’ll read ‘dummy_sales - sales_data.csv’ as the user uploaded it, hoping it’s now accessible. If that works, I’ll move on to revenue calculations, starting with multiplying quantity by price to figure out how much each client spent. From there, I’ll aggregate by client to find the top revenue generator.
Debugging File Access
I am still wrestling with the file access issue. It’s perplexing why I’m receiving a FileNotFoundError even though I’m certain the filename is correct. I have reread the provided filename, and double-checked the file path. I am going to try and look at the path more closely. I am confident I can resolve this soon!
Listing Directory Contents
I have attempted to read the file dummy_sales - sales_data.csv but encountered a FileNotFoundError. To debug, I’m now listing the contents of the current directory. This will help confirm the file’s presence and reveal the exact filename, which I suspect might be slightly different. Once I resolve the file access, I’ll proceed with reading the data and calculating client revenue.
Examining File Access
I’m currently unable to access the user’s files. The os.listdir() command, when executed, returns an empty list. This clearly indicates a problem: there are no accessible files present in the specified directory. This is blocking progress toward finding the best client.
Investigating File Availability
I’m hitting a roadblock. It seems I can’t access the necessary files. os.listdir() yields an empty list, signifying an access issue. Without these files, identifying the best client is impossible. I will notify the user and request re-upload of the files.
Hello! I’m ready to help you with your data analysis needs.
It seems that I’m unable to access the files that you have provided. To determine your best client, I’ll need to analyze your sales data.
Could you please upload the sales_data.csv and Products.csv files again? Once I have access to the data, I will be able to identify your most valuable client.