Which LLM Should I Use? A Data Scientist’s Guide to ChatGPT, Gemini, and Claude
The honest answer to “which LLM should I use” is not which model is best, but which model is best for what. Continue reading to compare how Claude, ChatGPT (GPT-4o), and Gemini each operate and respond to data science tasks.
Key Takeaways
- ChatGPT, Gemini, and Claude each lead in different areas: Context window size, API pricing, multimodal capability, and analytical communication style all vary in ways that matter for real data science workflows.
- No universal winner exists across every use case: The right model depends on your workflow stage, data sensitivity requirements, and the scale at which you are operating.
- Hands-on testing reveals what benchmarks miss: All three models caught the same data quality issue in our comparison, but each responded differently, and those differences point directly to which model fits which kind of work.
What Separates These LLMs At A Foundational Level
Before getting into use cases, it helps to understand the architectural and design decisions that make these three LLMs behave differently.
ChatGPT
Developed by OpenAI, ChatGPT is a multimodal model trained on an extensive dataset that includes licensed content from publishers, news organizations, and data providers alongside publicly available web content. It handles text, image, audio, and code within a single model and remains a staple anchor in the OpenAI developer ecosystem for practitioners who need a reliable, well-documented API with wide integration support.
Gemini
Google DeepMind’s flagship model family, Gemini, benefits from Google’s extensive data relationships across Search, YouTube, and licensed publishing content. It is designed with native multimodality from the ground up, meaning it was built to reason across text, image, video, and audio as a unified capability. Its deep integration with Google Search gives it a real-time information advantage that models relying solely on training data cannot match.
Claude
Built by Anthropic, Claude was trained on a proprietary mix of publicly available web content, licensed data from third parties, and contributions from paid contractors and data-labeling services. It is distinguished by its emphasis on Constitutional AI, a training methodology designed to align the model with pre-written human values that are baked into the training process.
All three are transformer-based large language models. The meaningful differences lie in training methodology, context window architecture, multimodal design, and the organizational priorities that shaped each model’s capabilities.
Become an Expert in Generative AI
Get your master’s in information and data science and earn a certificate
from the UC Berkeley School of Information (I School).
LLMs Side-By-Side: Key Technical Dimensions
For practitioners working with data at scale, the table below evaluates each LLM across the criteria that have the most direct impact on how you build and what it costs.
LLM Models Comparison Table: Best Use Cases for ChatGPT, Gemini, and Claude*
| Dimension | ChatGPT (GPT-5.5) | Gemini 3.0 Pro | Claude Sonnet 4.6 |
|---|---|---|---|
Context window | 1M tokens | 1M tokens | 1M tokens |
Multimodal support | Text, image, audio, video | Text, image, audio, video | Text, image, PDF |
API input pricing ($/1M tokens) | $5.00 | $2.00 | $3.00 |
API output pricing ($/1M tokens) | $30.00 | $12.00 | $15.00 |
Training data use (API) | Not used for training | Not used for training | Not used for training |
Best-fit use case | Versatile generalist tasks, structured outputs | Long-context document analysis, multimodal tasks | Instruction-following, reasoning, long-form analysis |
Sources |
*This comparison focuses on each provider’s standard production flagship as of July 2026. All three providers offer additional models at higher performance and price tiers for research-grade and enterprise workloads. For the full model lineup, see OpenAI API Pricing, Google AI Studio, and Anthropic Pricing.
Context Window
This is the maximum amount of text an LLM can process in a single interaction, where 1,000 tokens equals roughly 750 words.
- All three models now offer 1M token context windows, which means long-document processing, large codebase analysis, and extended agentic pipelines are supported across the board. The meaningful differences lie in pricing, performance, and ecosystem fit rather than context capacity.
- Both Gemini 3.0 Pro and Claude Sonnet 4.6 offer 1M token windows, which can be helpful for practitioners working on document-heavy workflows or extended agentic pipelines.
Pricing
Cost structure across the three LLMs often depends on whether your workload is input-heavy or output-heavy.
- As of July 2026, Gemini 3.0 Pro remains the lowest-cost option among the three at the API level for input-heavy workloads at $2.00 per million input tokens, compared to $3.00 for Claude Sonnet 4.6 and $5.00 for GPT-5.5.
- GPT-5.5 is the highest-cost option of the three, at $5.00 per million input tokens and $30.00 per million output tokens, making it the most expensive on both input and output.
Privacy
Data retention periods and enterprise options vary by provider:
- OpenAI retains API inputs and outputs for up to 30 days for abuse monitoring, with Zero Data Retention available for eligible enterprise customers.
- Google retains Gemini API prompts and outputs for up to 55 days, with Zero Data Retention available through Vertex AI for qualifying enterprise customers.
- Anthropic retains Claude API logs for seven days before automatic deletion, with Zero Data Retention available for enterprise customers.
- At the consumer level, all three providers use an opt in or out system for model training. ChatGPT and Gemini users must opt out, while Claude consumer users must actively choose to allow training use.
For practitioners working with proprietary data, client information, or regulated industries, the consistent recommendation is to use API access or enterprise tiers and review the privacy agreements for each provider before handling sensitive inputs.
Code Generation and Technical Workflows
All three models support code generation and machine learning workflows, with meaningful differences in how each one approaches the task:
- ChatGPT’s broad training makes it strong on well-documented frameworks, with the most mature community support and documentation of the three.
- Gemini’s coding performance is competitive and its cost structure makes it attractive for high-volume code-generation pipelines, with a practical advantage for teams working in Google Cloud or Vertex AI environments.
Any LLM output going into a production codebase warrants human review. The practitioners who get the most out of these tools treat them as thinking partners in the development process.
API Access, Rate Limits, and Scale Considerations
For teams moving from individual use to production-scale deployment, the API experience matters as much as raw model capability:
- GPT-5.5’s API builds on OpenAI’s mature ecosystem support, documentation, and third-party integrations. Rate limiting is tier-based, and teams working scale will need to plan their usage tier accordingly.
- Gemini’s API, accessible through Google AI Studio and Vertex AI, benefits from Google’s infrastructure scale. The 1M token context window is available natively at $2.00 per million input tokens, making it the most cost-efficient option for input-heavy workloads among the three.
- Claude Sonnet 4.6 and Opus models support 1M token context at flat rates with no surcharge. Anthropic’s API logs are retained for only seven days by default and are never used for model training, with Zero Data Retention available for enterprise customers.
Agentic and Tool-Use Capabilities
McKinsey describes agentic AI systems as those based on foundation models which are capable of acting in the real world, planning and executing multiple steps in a workflow, a meaningful shift from LLMs that simply respond to a single prompt:
- ChatGPT agent mode combines a visual browser, terminal, and direct API integrations into a single interface, with the Agents SDK providing the developer framework for building and deploying custom agents in production.
- Gemini’s Enterprise Agent Platform bundles an open-source Agent Development Kit, a low-code visual builder, a managed runtime, and access to over 200 foundation models.
- Claude Code has emerged as a widely-used tool for complex, multi-step coding workflows, with Anthropic’s Model Context Protocol providing an open standard for connecting models to external tools and data sources.
For data scientists evaluating these models for pipeline integration, the key questions are latency, cost per call, and reliability of output structure.
How Each LLM Performs on a Real Data Science Task
We gave all three LLMs the same data science problem. Here is what happened.
We created a synthetic sales dataset with 12 orders across three products and three regions, deliberately embedding one missing value to see how each model handled it without being alerted to the mistake. We gave all three the identical prompt:
“I’m going to give you a small sales dataset with five columns: OrderID, Product, Region, UnitsSold, and Revenue. Please: (1) summarize the key characteristics of this dataset, (2) identify any data quality issues including missing or inconsistent values, and (3) suggest specific cleaning steps and any additional features worth engineering for a sales performance analysis.”
The dataset used in this comparison was created specifically for this test to ensure identical inputs across all three LLMs.
| OrderID | Product | Region | UnitsSold | Revenue |
|---|---|---|---|---|
1001 | Widget A | West | 50 | 2500 |
1002 | Widget B | East | 30 | 1800 |
1003 | Widget A | East | 45 | 2250 |
1004 | Widget C | West | 20 | 1400 |
1005 | Widget B | West | 60 | 3600 |
1006 | Widget A | South | 35 | 1750 |
1007 | Widget C | East | 25 | 1750 |
1008 | Widget B | South | 40 | 2400 |
1009 | Widget A | West | 55 | 2750 |
1010 | Widget C | South | 15 | 1050 |
1011 | Widget B | East | 2100 | |
1012 | Widget A | South | 30 | 1500 |
The Evaluation Criteria
A strong response would catch the missing UnitsSold value in row 1011 without prompting, correctly infer it from the product’s implied unit price, identify structural data quality risks, and suggest feature engineering grounded in actual analytical thinking.
ChatGPT’s Response
ChatGPT produced a highly structured, documentation-ready output with formatted tables, clearly labeled sections, and step-by-step cleaning instructions.
What it got right:
- Caught the missing UnitsSold value in row 1011 without being prompted and correctly inferred the value as 35 units using the $60/unit pricing logic for Widget B.
- Derived the consistent pricing architecture across all three products (Widget A at $50/unit, Widget B at $60/unit, Widget C at $70/unit) and used it as a validation framework.
- Delivered the most comprehensive feature engineering list of the three models, including unit price derivation, revenue share, product and region-level aggregates, revenue ranking, region-product segment performance, and Z-score outlier flagging.
What it missed:
- Did not infer a potential pandas data type coercion risk, which Gemini surfaced unprompted despite Python not being specified in the prompt.
- Did not question whether the dataset was regionally complete.
Takeaway:
ChatGPT’s output reads like something you would hand to a project stakeholder or include in a data quality report. It is the strongest choice when the goal is a structured, shareable deliverable.
Gemini’s Response
Gemini produced the most technically precise output of the three, with explicit mathematical notation and a strong focus on pipeline-level data quality.
What it got right:
- Caught the missing UnitsSold value and showed the full mathematical derivation for the imputation: $2,100 / $60 = 35 units.
- Was the only model to infer a potential pandas data type coercion risk without being prompted, correctly identifying that a single null in UnitsSold would cause Python’s pandas library to automatically convert the entire column from an integer type (int64) to a decimal type (float64), a real-world pipeline issue that can cause downstream calculation errors and unexpected behavior in production systems.
- Was the only model to note the absence of a North region as a potential data completeness question, modeling the right analytical instinct: asking what the data might be leaving out.
- Introduced order size tier binning as a feature engineering suggestion, segmenting orders by unit volume into Small, Medium, and Large categories, which neither of the other models proposed.
What it missed:
The heavy reliance on mathematical notation works well in rendered environments but can require additional translation before implementation.
Takeaway:
Gemini’s output reads like pipeline documentation. It is the strongest choice for practitioners who need to catch the kind of technical issues that break things downstream before they reach production.
Claude’s Response
Claude produced the most interpretive output of the three, reasoning through the data analytically and connecting each observation to its practical implication for the analysis.
What it got right:
- Caught the missing UnitsSold value and correctly derived the imputation value using the implied unit price, explaining why the consistent pricing structure across Widget B orders made the value recoverable with confidence.
- Moved quickly into feature engineering rationale, explaining not just what features to create but why each one matters for the analytical goal.
- The response prioritizes thinking through the problem over documenting it, which makes it well-suited for exploratory analysis and collaborative working sessions.
What it missed:
- Did not infer a potential pandas data type coercion risk despite Python being the implied language for this type of analysis.
- Did not question whether the dataset was regionally complete.
- Did not match the breadth of ChatGPT’s feature engineering list or Gemini’s mathematical specificity.
Takeaway:
Claude’s output reads the way a senior data scientist might talk through findings with a collaborator. It is the strongest choice when you are in an exploratory or collaborative analytical mode and want to think through a problem rather than document a solution.
What the Comparison Reveals
All three models caught the deliberately embedded data quality issue. All three proposed reasonable feature engineering. The differentiation was in communication style, depth of technical specificity, and analytical framing. These differences map onto real workflow decisions. Practitioners who need to produce a structured output for a team or document a cleaning process might find ChatGPT’s format immediately useful. Teams building data pipelines who want to surface the kind of type coercion issues that cause downstream failures could get more from Gemini’s technically precise output. Practitioners in an exploratory or collaborative analytical mode will find Claude’s reasoning-forward approach supports that process well.
Five Questions to Help You Choose Which LLM Model to Use
The right model depends on what you are trying to do, at what scale, with what data, and at what cost.
1. What Kind of Output Do You Need?
If you are producing a structured deliverable to share with a team or stakeholder, prioritize format and organization. If you are thinking through a problem collaboratively, prioritize reasoning quality and interpretive depth.
2. Are You Building for Production or Exploration?
Models that perform well in exploratory analytical sessions may behave differently in high-volume production pipelines where consistency, latency, and graceful failure handling matter as much as raw output quality.
3. How Sensitive Is Your Data?
The specifics of data retention, Zero Data Retention availability, and enterprise tier policies differ across all three providers. If you are working with proprietary, client, or regulated data, review each provider’s Data Processing Agreement before getting started.
4. Does Your Workflow Involve Agentic or Multi-Step Tasks?
If you are building pipelines where the model takes sequential actions, calls tools, or maintains state across steps, evaluate each provider’s agentic tooling ecosystem alongside the model itself.
5. What Ecosystem Are You Already Working In?
Integration with existing infrastructure, whether that is Google Cloud, OpenAI’s developer ecosystem, or Anthropic’s API, may be as important as model capability for teams working at scale.
For most working data scientists, these models are complementary. Understanding what each one is designed to do well and deploying it accordingly is a more productive frame than searching for a single winner.
The information systems that data scientists build are increasingly AI-assisted. Knowing how to evaluate and select the right model for a given task is becoming as fundamental as knowing how to evaluate and select the right algorithm. That evaluation starts with understanding what each tool was built for and being honest about what your workflow actually requires.
Interested in developing the technical foundation to work at this level of the AI stack? Explore the UC Berkeley Master of Information and Data Science program to learn more.
FAQs
-
There is no single best LLM for data science, and that is the central finding of this comparison. The right choice depends on your workflow stage, the sensitivity of your data, and whether you are producing a deliverable or working through a problem.
-
At the API and enterprise tier level, ChatGPT, Gemini, and Claude all commit to not using your inputs and outputs to train future models by default. Consumer accounts operate under different terms, and all three providers default to using conversations for model improvement unless you actively opt out.
-
Context window size determines how much text an LLM can process in a single interaction. GPT-4o’s 128K token limit is sufficient for most everyday tasks but can be a constraint when processing large codebases, lengthy research documents, or multi-file analyses.
-
As of July 2026, Gemini 3.0 Pro remains the lowest-cost option among the three at the API level for input-heavy workloads at $2.00 per million input tokens, compared to $3.00 for Claude Sonnet 4.6 and $5.00 for GPT-5.5.
-
The MIDS curriculum prepares you to work across the full data science stack, and LLM selection in the real world is driven by use case, not brand preference. That said, getting comfortable with API access across all three providers is more valuable than mastering any single one. Start with the model that fits the task you are working on, use the evaluation criteria in this piece to assess outputs critically, and treat each model as a tool in a broader analytical toolkit. The ability to evaluate and select the right LLM for a given problem is itself a skill that will serve you well across every role in the field.
Created by the online Master of Information and Data Science (MIDS) program from the UC Berkeley School of Information.