ChatGPT for data analysis
This is a question that has been bugging me for a long time. How can an LLM that never gives me the same answer to the same question, do data analysis - where I expect 100% accuracy?
Here is an example of what I mean when I say ChatGPT will not give you the same answer twice -
Directionally the same but not exactly the same.
This is a feature in Generative AI. It generates text every time and so by default it will be different each time. How GenAI works is that it is predicting the next word and based on probabilities, coming up with the sentence.
That being said, when I give it a table with data and ask it to analyze it, I want deterministic results. If I want to know how many Tables were sold in the East, there is only 1 answer.
So how does ChatGPT's data analyst CustomGPT claim to do data analysis?
Even MIT has a course on this - https://mitsloanedtech.mit.edu/ai/tools/data-analysis/how-to-use-chatgpts-advanced-data-analysis-feature/
I actually asked ChatGPT to answer this and I finally understand how this works.
Here is a step by step -
So the actual analytics is done using code and this is the piece I was missing.
Actually this is a great example of GenAI as an agent, where we combine the LLM with Tools to solve real problems and this is the future of GenAI and how we will unlock practical use cases.
That being said, where errors can creep in in this process -
Examples of mistakes in the NLU -
For instance, if a user inputs the query, "Show me the sales growth," the model might misinterpret this in several ways:
领英推荐
Temporal Ambiguity: The model might not understand the specific time frame the user is interested in. It might show sales growth for the last month instead of the last quarter or year, depending on what it guesses the user means.
Metric Ambiguity: The term "sales growth" might be interpreted in different ways, such as absolute sales numbers, percentage growth, or growth rate. If the model assumes one interpretation without clear context, it could provide incorrect or irrelevant data.
Contextual Ambiguity: If the user's query lacks context and the model doesn't have enough prior conversation history, it might not know which product line or geographical region's sales growth to display if the company operates in multiple domains.
Examples of mistakes in Results Processing
An example of an error in results processing can occur when the LLM incorrectly interprets or formats the output from the deterministic tool, leading to misleading or incorrect information being presented to the user.
1. Misinterpretation of Data:
- The LLM might incorrectly summarize the data if it doesn't properly calculate the overall average from the monthly averages.
2. Formatting Issues:
- Errors in formatting the output can lead to misunderstandings. For example, misplacing decimal points or mislabeling units (e.g., thousands vs. millions).
3. Inaccurate Aggregation:
- The LLM might incorrectly aggregate the results, such as summing values instead of averaging them.
4. Context Loss:
- If the context is not maintained accurately, the LLM might mix up different time periods or datasets, leading to incorrect results.
Bottomline - Understand all this before you pop that chart into ChatGPT and ask it to do data analysis.
BTW, even with GPT-4o, the image generation from text sucks. I asked it to generate an architecture diagram to show the flow and it came up with this.
Himanshu Gupta - Our chat about using GenAI for data analytics..
I help companies resuscitate dead leads and sell using AI ?????????????? #copywriting #emailmarketing #coldemail #content #databasereactivation
4 个月Exciting blend of AI and deterministic tools for data analysis.
CEO at Cognitive.Ai | Building Next-Generation AI Services | Available for Podcast Interviews | Partnering with Top-Tier Brands to Shape the Future
4 个月Insightful analysis on leveraging ChatGPT for data tasks. Combining AI with robust tools opens exciting opportunities. How do you envision integrating such architectures in your workflow? Vikram Ekambaram
Senior Managing Director
4 个月Vikram Ekambaram Very well-written & thought-provoking.
Software Product Strategist
4 个月Indeed... the deterministic are so very important. It's all under the "theme" of AI, but it's not really the LLM doing the work. ChatGPT exposes the execution of python. For the time being, it's not quite ready for prime time execution of these scripts - it can't even flawlessly generate the python scripts with any consistency. We're still stuck in the step-by-step execution of workflow we decompose and then curate by hand for the next step. Each variation of quality in the output of each step leads to increased deviation from "expected outcome". The further we leave the machines alone to think, the more likely any step in the process will "fail". Step - human - Step - human - Step - human Only when we finally get a quality deterministic application against quality data can we get "repeatable outcomes". And when someone wants to know which product is moving faster, which has the most customer complaints, or which salesperson is leading the pack... coming up with different answers upon each execution "because I thought about the problem a different way" destroys confidence in that output.