The best LLM for data analysis in November 2026 depends on where your data may go. Hosted frontier models lead: GPT-6.1 and Claude Opus 5.5 scored about 87% on BIRD's October 2026 Mini-Dev text-to-SQL set. For company data kept in-house, Qwen3.8-27B on one 24–32 GB GPU is the practical open pick, and SQL fine-tunes such as Kwai-AutoSQL-32B rival much larger models. Spreadsheet work remains hard for every model.
Quick picks for analysts and data teams
“Data analysis” covers three jobs that models handle very differently: writing SQL against a database, manipulating spreadsheets, and writing Python (usually pandas) to clean, join and summarise data. The picks below come from the public leaderboards for each job and from Hugging Face model cards, all checked on 23 November 2026.
| Situation | Pick | Why |
|---|---|---|
| Data may leave your network, hardest questions | GPT-6.1 or Claude Opus 5.5 | 87.27% and 87.13% on BIRD Mini-Dev (October 2026), well ahead of the open models in the same run |
| One 24–32 GB GPU, mixed SQL and Python | Qwen3.8-27B | Apache 2.0, 262K context, image input for charts; 74.51% on the BIRD test set inside the Blender-SQL pipeline |
| One 32 GB GPU, SQL only | Kwai-AutoSQL-32B | Apache 2.0 fine-tune of Qwen3-32B; 74.12% on the BIRD test set as a single model |
| Laptop or 8 GB GPU, SQLite | flash-sqlite-4b | 75.68% on the BIRD test set from a 4B model; trained for the SQLite dialect |
| One 80 GB GPU, many users | gpt-oss-120b | Fits one H100-class card in MXFP4; built-in Python tool calling |
| 128 GB workstation | Qwen3.8-Flash-Next | 68.33% on BIRD Mini-Dev, the best open-weight score in that run; read the licence first |
| Multi-GPU server, agentic SQL over a warehouse | GLM-5.2 or GLM-5.3 | GLM-5.2 powers the top Spider 2.0-Lite entry (76.23%) |
Two warnings before you pick. Benchmark rows come from different setups, so a single-model score, a pipeline score and a zero-shot baseline are not directly comparable. And the harness, meaning schema retrieval, execution feedback and self-checks, moves scores by more points than most model swaps do.
How the main data benchmarks work
Three public benchmarks cover most of what analysts do. Knowing what each one measures tells you how far to trust it.
BIRD (text-to-SQL). BIRD pairs natural-language questions with real databases that contain messy values, and scores execution accuracy: whether the generated query returns the same rows as the reference answer. Data engineers and database students score 92.96% on its hidden test set. In late October 2026 the top system, AT&T’s AskData, reached 83.40%. BIRD also keeps a separate single-model track for entries that use one trained model, and a 500-question Mini-Dev set in SQLite, MySQL and PostgreSQL. The BIRD team refreshed Mini-Dev on 28 October 2026, correcting annotations and replacing some questions, and published new baselines for current models.
Spider 2.0 (enterprise SQL workflows). Spider 2.0 was built to look like warehouse work: large schemas, cloud dialects such as Snowflake and BigQuery, and multi-step tasks. When it was published at ICLR 2025, an o1-preview code agent solved only 21.3% of its 632 tasks, against 91.2% on the older Spider 1.0 and 73.0% on BIRD. Agent systems have climbed fast since. On 23 November 2026 the top Spider 2.0-Lite entry scored 76.23%, and the Snowflake-only variant is led by systems above 90%.
SpreadsheetBench (Excel work). The first version has 912 tasks built from real questions on Excel forums, with multiple test spreadsheets per task. Version 2 has 321 expert-curated business workflows: building financial models from templates, debugging formulas and making charts. It is the closest public proxy for “can a model do my spreadsheet job”.
A fourth benchmark, DABstep, built from a financial analytics platform’s real questions, found in June 2025 that the best agent solved only 14.55% of its hard multi-step tasks. That result is from 2025 models, but it makes the same point as the others: multi-step analysis over real files is far harder than answering a single question about one table.
Whatever you pick, size the hardware before you buy: the VRAM calculator does the weights and cache arithmetic shown later in this guide for any model and context length.
Best LLM for SQL: closed, open and fine-tuned models compared
The BIRD leaderboards give the cleanest comparison of models for SQL generation, because the scoring is mechanical and the test set is hidden.
| Model or system | Type | Score | Set and date |
|---|---|---|---|
| GPT-6.1 | Closed | 87.27% | Mini-Dev 2026, three dialects, 28 Oct 2026 |
| Claude Opus 5.5 | Closed | 87.13% | Mini-Dev 2026, 28 Oct 2026 |
| Claude Sonnet 5.5 | Closed | 84.20% | Mini-Dev 2026, 28 Oct 2026 |
| Qwen3.8-Flash-Next | Open weight, Qwen Community License | 68.33% | Mini-Dev 2026, 28 Oct 2026 |
| DeepSeek-V4.1-Flash | Open weight, MIT | 59.67% | Mini-Dev 2026, 28 Oct 2026 |
| GLM-5.3 | Open weight | 49.40% | Mini-Dev 2026, 28 Oct 2026 |
| Qwen3.6-35B-A3B | Open weight, Apache 2.0 | 21.13% | Mini-Dev 2026, 28 Oct 2026 |
| flash-sqlite-4b | Open SQL fine-tune, Apache 2.0 | 75.68% | Test set, single-model track, 27 Oct 2026 |
| Blender-SQL with Qwen3.8-27B | Pipeline on an open model | 74.51% | Test set, 14 Oct 2026 |
| Kwai-AutoSQL-32B | Open SQL fine-tune, Apache 2.0 | 74.12% | Test set, single-model track, 19 Sep 2026 |
| OmniSQL-32B | Open SQL fine-tune, Apache 2.0 | 72.05% | Test set, 4 Mar 2025 |
The Mini-Dev rows and the test-set rows are different question sets and should not be compared with each other. Within each group, three patterns stand out.
First, the closed frontier models are far ahead when used plainly. On the refreshed Mini-Dev, the gap between Claude Opus 5.5 and the best open model is almost 19 points.
Second, fine-tuning and pipelines close much of that gap. A 4B model that writes SQL, repairs failed queries from the database’s error message and judges its own candidates scores 75.68% on the hidden test set. Its card says the scoring run used 32 candidates per question on a single 80 GB A100, so that accuracy costs many generations per answer.
Third, the zero-shot baseline for a small mixture-of-experts model can be poor. Qwen3.6-35B-A3B scored 21.13% on Mini-Dev, far below its general reputation. Do not assume a model that chats well writes good SQL without testing it on your own schema.
Independent work on self-hosted models points the same way. A study of open models on the BIRD development set, revised in October 2026, found that letting the model see execution errors and try again was the only technique that improved accuracy consistently, adding 1.2 to 4.4 points. Schema-linking tricks and majority voting did not pay for their extra tokens in that study.
Best LLM for Excel and spreadsheet analysis
Spreadsheets are harder than databases for language models. A sheet mixes several tables, merged headers, notes and formulas, and the task is often to change the file, not just answer a question.
SpreadsheetBench’s second version tested general models inside the same SWE-agent scaffold in March 2026:
| Model | Overall | Financial modelling | Formula debugging | Visualisation |
|---|---|---|---|---|
| Claude Opus 4.6 | 34.89% | 34.0% | 12.0% | 62.5% |
| GPT-5.2 | 26.79% | 33.0% | 8.0% | 45.83% |
| Gemini 3.1 Pro | 23.68% | 31.0% | 7.0% | 41.67% |
| GLM-5.0 (open weight) | 17.14% | 22.0% | 7.0% | 37.5% |
| DeepSeek-V3.2 (open weight) | 15.58% | 7.0% | 10.0% | 33.33% |
| Kimi K2.5 (open weight) | 14.64% | 15.0% | 4.0% | 41.67% |
| Qwen3.5-397B-A17B (open weight) | 11.22% | 10.0% | 3.0% | 25.0% |
Purpose-built spreadsheet agents do better on the same set: arito scored 54.51% in September 2026 and WPS AI 50.86% in August 2026. On the easier first version, Google’s Gemini in Google Sheets scored 70.48% (verified, March 2026), and Kingsoft’s Qingqiu Agent 83.11%.
None of the newer open models, such as Qwen3.8-27B or GLM-5.3, had a SpreadsheetBench 2 score on 23 November 2026, so treat the open-weight rows as a floor from older checkpoints.
What this means in practice:
- Formula debugging is the weakest skill everywhere. No general model passed more than 12% of those tasks. Keep a person on any change to a model that feeds a decision.
- Do not let the model do arithmetic in prose. Ask it to write the formula, or a short Python script with openpyxl or pandas, then run that and keep it as the audit trail.
- Flatten before you ask. Convert each logical table to a clean range or CSV with one header row first. Our article on why retrieval breaks on tables and spreadsheets covers the parsing side in depth.
Finance teams have extra constraints on top of this; our guide to LLMs for finance teams covers filings, statements and the controls around them.
Python and pandas: where coding models help analysts
For cleaning, reshaping and statistics, the most reliable pattern is code execution: the model writes pandas, a sandbox runs it, and the model reads the output, including errors, before answering. That turns the model from a calculator into a programmer whose work you can rerun.
Any strong coding model works here. Qwen3.8-27B, Gemma 4 31B and gpt-oss-120b all support function calling, and the gpt-oss card lists Python code execution among its native agentic capabilities. Our comparison of open-weight coding models ranks them on software tasks; for analysis, the differences matter less than three harness choices:
- Show the data’s shape, not the data. Pass column names, types, row counts and a small sample. Sending a whole file into the prompt wastes context and invites the model to “read” numbers instead of computing them.
- Run every step. A chain of reasoning that was never executed is a guess. Keep the notebook or script with the answer.
- Check counts at every join. Print row counts before and after each merge. A count that grows after a left join means duplicate keys on the right.
The CSV analyzer tool and the other data and analytics tools in VDF AI follow this pattern: the agent calls a tool that computes, rather than estimating figures itself.
Silent wrong answers: the accuracy risk that benchmarks miss
A query with a syntax error fails loudly. The dangerous errors run cleanly and return a plausible number. Benchmarks such as BIRD count these as wrong, but in daily use nobody has a reference answer to compare against.
| Error | What happens | Check that catches it |
|---|---|---|
| Join fan-out | Joining orders to a table with several rows per order multiplies revenue by that factor | Compare row counts and the sum before and after the join |
| Null exclusion | WHERE region <> 'EU' drops every row where region is blank | Count nulls in every filtered column |
| Wrong grain | Averaging daily averages instead of averaging the underlying rows | State the grain of the result in words |
| Wrong date basis | Order date used where the report uses invoice date | Name the date column in the answer |
| Invented column | The model uses a plausible column that does not exist, then a real one that means something else | Read the live schema before drafting |
| Prose arithmetic | The model adds numbers it read from a pasted table and drops a row | Never accept a figure that no code computed |
Two habits remove most of the risk. Make the model state, in one sentence, what the query counts: the population, the grain and what it excludes. And reconcile at least one number against a report the business already trusts before anyone uses the new figure.
Best local LLM for data analysis by hardware tier
Memory goes to two places: the model’s weights and the KV cache, which grows with every token of prompt and reply. Analysis prompts are moderate: a schema description, a few sample rows, the question and the conversation so far fit in about 32,000 tokens for most jobs. The table counts keys and values at 16 bits for 32,768 tokens, from each model’s config.json, plus the named 4-bit file. Add 1 to 2 GB for the runtime and compute buffers.
| Model | 4-bit file (repository) | KV cache at 32K | Total before overhead | Fits on |
|---|---|---|---|---|
| flash-sqlite-4b | 2.71 GB Q4_K_M (mradermacher/flash-sqlite-4b-GGUF) | 1.1 GB | 3.8 GB | Laptop GPU with 8 GB |
| gpt-oss-20b | 12.11 GB MXFP4 (ggml-org/gpt-oss-20b-GGUF) | 0.8 GB | 12.9 GB | One 16 GB GPU |
| Qwen3.8-27B | 16.56 GB UD-Q4_K_M (unsloth/Qwen3.8-27B-GGUF) | 2.1 GB | 18.7 GB | One 24 GB GPU |
| Kwai-AutoSQL-32B | 19.76 GB Q4_K_M (mradermacher/Kwai-AutoSQL-32B-GGUF) | 8.6 GB | 28.4 GB | One 32 GB GPU |
| gpt-oss-120b | 63.39 GB MXFP4 (ggml-org/gpt-oss-120b-GGUF) | 1.2 GB | 64.6 GB | One 80 GB GPU |
| Qwen3.8-Flash-Next | about 111 GB UD-Q4_K_XL in four parts (unsloth/Qwen3.8-Flash-Next-GGUF) | small; mostly linear attention | about 112 GB | 128 GB unified memory or two 80 GB GPUs |
The cache arithmetic is two (keys and values) × attention layers × KV heads × head dimension × 2 bytes × tokens. Qwen3.8-27B keeps a growing cache on only 16 of its 64 layers, with 4 KV heads of dimension 256, so it needs 65,536 bytes per token, or 2.1 GB at 32K. Kwai-AutoSQL-32B inherits Qwen3-32B’s 64 full-attention layers with 8 KV heads of dimension 128, which is 262,144 bytes per token, four times as much. A SQL fine-tune with the smaller file can still need more memory than a newer general model.
Two licence notes. Qwen3.8-Flash-Next uses the Qwen Community License 1.0. If you or an affiliate run a “Model as a Service” or “AI Work Assistant” business (an AI product built mainly for coding or office productivity), you need a separate licence from Qwen before any commercial use. Internal use is exempt only while the model, its outputs and its capabilities are not made available to any third party, and products above 100 million monthly users or US$20 million monthly revenue must display the model name. And flash-sqlite-4b was tuned for SQLite; test it on your own dialect before relying on it for Snowflake, BigQuery or T-SQL.
Keeping company data confidential during analysis
Analysis touches the most sensitive data a company has: customer records at row level, payroll, margins, unreleased results. Three facts shape the decision about where the model runs.
The schema is itself sensitive. Table and column names describe products, segments and processes. Even a tool that only sends the schema and never the rows discloses something.
Hosted spreadsheet features process data in the vendor’s cloud. Microsoft, for example, says Python in Excel runs the code in a container on the Microsoft Cloud inside your organisation’s compliance boundary, without network access and without keeping the data at rest. That is a reasonable design, but the processing still happens outside your network, and each hosted tool needs its own review.
Results travel too. Even when the warehouse stays put, the rows a query returns go back to the model for interpretation. If the model is hosted, those rows leave.
A model on your own GPUs removes the outside processor from each of these flows. The trade-off is the accuracy gap shown above, which you narrow with schema retrieval, execution feedback and a fine-tune where the dialect allows. Our article on private retrieval across SQL databases and document repositories covers the architecture, and the Academy lesson on retrieval over databases and tables walks through a build.
How VDF AI fits data analysis on your own servers
VDF AI is software you install on your own servers, in a private cloud or in an air-gapped network. VDF AI Router registers Ollama and custom on-prem deployments alongside cloud models, applies allow and deny lists, and its air-gap mode restricts routing to local models only. VDF AI Agents can use any OpenAI-compatible endpoint as an agent’s model, so a Qwen3.8-27B served by vLLM or llama.cpp can sit behind an analysis agent, and agents can be given database query tools and connected data sources.
Two agents in the catalogue map to the workflows in this guide. The AI SQL Analyst Agent writes read-only SQL against your live schema, checks it for join fan-out, null traps and scan cost, and explains in plain language what the query counts. The AI Data Analyst Agent turns a business question into testable claims, checks them with read-only queries, and returns the finding with the query, the rows it returned and the caveats that limit what it can support. Both run over read-only connections. Every run is captured in an audit log of input, retrieval, tool calls and output, and role-based access control comes with every plan. The data and analytics agents hub lists the related reporting, BI and data quality agents.
Sources
Primary documents, leaderboards and model cards, as retrieved on 23 November 2026.
- BIRD-SQL leaderboards, including the single-model track and Mini-Dev 2026
- Spider 2.0 leaderboard and Spider 2.0 paper, Lei et al., arXiv:2411.07763
- SpreadsheetBench leaderboard and task descriptions
- DABstep: Data Agent Benchmark for Multi-step Reasoning, arXiv:2506.23719
- How far do on-premises open LLMs get on Text-to-SQL?, arXiv:2606.29733
- Model cards: Qwen3.8-27B, Qwen3.8-Flash-Next and its licence, Kwai-AutoSQL-32B, flash-sqlite-4b, OmniSQL-32B, gpt-oss-120b, GLM-5.2
- GGUF builds: unsloth/Qwen3.8-27B-GGUF, unsloth/Qwen3.8-Flash-Next-GGUF, mradermacher/Kwai-AutoSQL-32B-GGUF, mradermacher/flash-sqlite-4b-GGUF, ggml-org/gpt-oss-20b-GGUF and ggml-org/gpt-oss-120b-GGUF
- Microsoft Support: Data security and Python in Excel
Analysing customer, finance or operations data that cannot leave your network? See how VDF AI Agents run read-only analysis on your own infrastructure, or book a demo.