datatomcp

ChatGPT and Claude CSV limits: analyze big files without uploading them

Upload a large CSV to ChatGPT or Claude and one of three things happens: the upload is refused, the file is silently truncated to what fits in the context window, or the answer comes back with totals that look plausible but were never actually computed. This guide explains why, and how to get exact answers from big files.

Why big CSVs break in AI chats

Context windows are measured in tokens, not rows. A 50,000-row orders file is about 4 MB of text, millions of tokens’ worth of numbers and email addresses. Pasted into a chat, most of it either doesn’t fit or crowds out the conversation. Work out the tokens and cost for your own file. Prices per token vary about a hundredfold between models; this LLM API pricing comparison shows what one question about a pasted sheet costs on each.

Reading is not computing. When a model reads rows and “adds them up”, it is predicting text. For a handful of rows that’s fine. For thousands it drifts, and nothing in the answer tells you it did. Why ChatGPT and Claude get spreadsheet totals wrong has outside receipts and what we measured.

Code interpreters help, but only per session. ChatGPT’s data analysis can run real code on an upload, within file-size limits. But the file is a one-off copy: it doesn’t follow your spreadsheet as it changes, and other agents or automations can’t use it.

The alternative: let the model query the data

Keep the file in a database and give the model tools to query it. The model decides what to ask; the database computes the answer.

With our 50,000-row test file, the question “orders and revenue from France in September” looks like this:

Paste the file Query it
Sent to the model ~4,118,185 bytes 32 bytes
Who computes the total The model, reading rows DuckDB
Result An estimate {"orders":277,"revenue":50279.5}

How to set it up with datatomcp

  1. Import the file. Sign in at app.datatomcp.com and upload the CSV (20 MB and 100,000 rows on the free plan; 200 MB and 2 million rows on Pro), paste a CSV link, or pick a Google Sheet.
  2. Check the import report. Unparseable lines are listed with line numbers instead of failing the whole file, and suspicious columns (numbers stored as text, mixed date formats) are flagged for you to confirm.
datatomcp import report for a messy CSV: an amount column stored as text with an Apply fix button, mixed date formats and EUR/eur case variants 3. **Connect your AI.** Add `https://app.datatomcp.com/mcp` as a custom connector in Claude ([steps](/guides/connect-google-sheets-to-claude)) or ChatGPT ([steps](/guides/chatgpt-custom-connector-spreadsheet)). 4. **Ask normally.** The model calls `aggregate` for totals and breakdowns, `query_rows` for specific records and `distinct_values` to find the exact spelling of filter values.

FAQ

Is there a row limit per answer? query_rows returns up to 1,000 rows per call and tells the model when more matched, so it can page or switch to an aggregate. Aggregates run over the whole dataset.

Does my data go to the AI provider? Only the results the model asks for: a total, a few rows. The dataset itself stays on datatomcp’s EU servers and is never used for training. More on what that means for GDPR: GDPR-compliant AI on company data.

What if Claude says CSV isn’t supported? That message is about attaching the file. With a connector, nothing is attached; Claude queries the dataset through tools.