Apply to my task
arXiv:2610.30072 ★ 80 Oct 21, 2026

ChartMind: Teaching an Analyst Agent to Decide for Itself When to Look at a Chart and When to Look at the Numbers

Key result

Finding: agents read charts well but almost never draw them on their own. Some models don't build charts at all, even with the tool right there. Others draw in every second task, but not where a chart matters most. The ChartMind method lets you teach an analyst agent to choose the result format itself: numbers to the console or a chart as an image. No fine-tuning. The selection rules sit in short files, and the agent opens them before the relevant step of the analysis. Result: *models that never drew before start drawing, and the quality of visual evidence in reports goes up.

01

TL;DR

ChartMind is a way to teach a data-analysis agent (the kind that runs code and reads tables) to choose the form of its intermediate results: print the numbers, or draw a chart and look at it. The agent is not retrained. Instead it gets a set of small rule documents. Some describe how to choose and verify analytical operations. Others say when you need text, when you need a chart, and when you need both. The rules were produced like this: the same tasks were run several times in different modes, a judge scored the results, and only edits that improved the score on held-out tasks made it into the set.

The headline finding: agents can read charts, but they almost never draw them on their own. Give a model both tools and some models never build a chart at all. Others build one in roughly every second task, but not where charts matter most. And answer quality doesn't depend on how often a model draws. "Just hand it a plotting tool" doesn't work. Each model has its own habit for picking a format, and that habit has nothing to do with its abilities.

Charts and text complement each other. Charts win on tasks about change over time, patterns and anomalies. Numbers win where you need an exact value, a specific row or a condition check. Format-choice rules written into a document raised report quality, especially the quality of visual evidence. Models that never drew before started doing it.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

Method Blueprint

STEP 1: Run each task several times in different modes
        (free / text only / charts only, with a ban on
        repeating chart types) → a set of trajectories

STEP 2: A judge scores the final outcome and labels each key step
        (helpful / useless / harmful) → labeled trajectories

STEP 3: A builder compares trajectories and writes rules
        into documents of two families:
        • "analysis" — how to choose and verify operations
        • "representation" — when text, when a chart, when both

STEP 4: Validation gate — an edit stays only if quality on
        held-out tasks strictly improved → a frozen package

STEP 5: The working agent first reads the document descriptions,
        then opens the relevant ones → solves the task using the rules

Steps 1–4 are the rule "factory"; step 5 is where the rules get used. If you don't write code, step 5 is available right away (an instructions file), and steps 1–4 can be repeated by hand; see the adaptations below.

03

Example in Action

Task: An Amazon seller exported a CSV with a year of sales: 40 SKUs, daily data, returns, price, stock levels. They need to understand why revenue dipped in October and, separately, compute the exact total of returns for one SKU. The work is done by an agent with command-line access, such as Claude Code, which can open images saved to disk.

Prompt (in the agent's instructions file):

<ExperienceAccess>
Before analyzing the export sales_2025.csv, read experience/INDEX.md.
It lists the documents with descriptions. Open only the ones that fit
the current step of the analysis.
</ExperienceAccess>

<RepresentationRules>
- Time series, trends, seasonality, outliers, anomalies →
  build a chart, save it as PNG, look at it, then describe
  what you see in words.
- Exact value, sum, finding a row, checking a condition
  ("only SKUs with returns > 5%") → print the numbers to the console.
- If a chart reveals a suspicious stretch → confirm it with numbers
  from the table before drawing a conclusion.
- Before each intermediate result, write one line:
  I choose text / chart / both — and why.
</RepresentationRules>

Task: explain the revenue dip in October 2025 and compute
the exact total of returns for SKU AMZ-48213 in dollars.

Result: The agent will first label its format choice for each step. For the October dip it will plot revenue by day and by SKU and describe where the drop shows up and which SKUs caused it. It will double-check the suspicious stretch against numbers from the table. The returns total for the SKU gets printed as a number, no chart. The final output: an explanation of the dip backed by both the chart and the numbers, plus the exact returns total.

04

Why It Works

The weakness. By default a model follows its habitual path, and for most models that path is textual: print the table, calculate, answer. Even when a chart is needed (a trend, an anomaly), the agent doesn't build one. It's not that it can't read images. It just doesn't choose that path. Some models barely draw, others draw a lot. Answer quality doesn't depend on drawing frequency.

The strength. Models follow explicit rules well, especially when those rules sit in a document and get read at the right moment. Both a chart and a table carry enough information for a good answer. The format choice can be captured as a rule: "if the task is about a trend, chart; if it's about an exact number, text."

How the method exploits this. ChartMind moves the format choice out of "model habit" and into an explicit document. Representation rules and analysis rules work together. The first raise the quality of visual evidence, the second raise the accuracy of conclusions. The documents live as separate files with short descriptions, so the agent reads only what it needs and the context doesn't bloat.

Control knobs: - The list of chart triggers → extend it for your domain (funnels, cohorts, seasonality) so the agent doesn't skip visual tasks. - The line "I choose text / chart / both — and why" → makes the choice visible, so you can catch where the agent ignores the rule. Drop it to save tokens. - The requirement to confirm a chart with numbers → boosts accuracy. Loosen it for quick exploration. - The number of documents → split by topic with short descriptions. Then the agent opens 1–2 files instead of the whole rulebook.

05

Prompt Template

The method stores experience as a set of documents: an index plus separate files with the fields name, description, category. The paper doesn't publish the text of the rules themselves, so the content below is a starter draft. It's based on the patterns from the study (charts for time, patterns and anomalies; text for exact values and checks). Fill in the rest with your own rules.

1. Agent instructions (CLAUDE.md / system prompt):

<ExperienceAccess>
You have a folder experience/ with experience documents.
1. Before starting a {task_type} task, read experience/INDEX.md —
   it holds the names and descriptions of the documents.
2. Open only the documents relevant to the current step of the analysis.
3. At each intermediate step, state in one line:
   result format: text / chart / both — and which rule applies.
4. Do not edit the experience/ folder — it is read-only.
</ExperienceAccess>

2. experience/INDEX.md:

# Experience index
- analysis_{number}_{topic}.md — {what_it_covers}  [category: analysis]
- repr_{number}_{topic}.md — {what_it_covers}  [category: representation]

3. Representation document (experience/repr_01_when_chart.md):

---
name: repr_when_chart
description: When to show an intermediate result as a chart and when as numbers
category: representation
---
Chart (save a PNG, look at it, describe it in words) if the step is about:
- {change_over_time}
- {finding_a_pattern}
- {anomalies_and_outliers}

Text (print the numbers) if the step is about:
- {exact_value_or_sum}
- {finding_a_specific_row}
- {checking_a_condition}

Both: the chart found a suspicious spot → confirm it with numbers.

How to use the result next: {rule_after_chart}

4. Analysis document (experience/analysis_01_verify.md):

---
name: analysis_verify
description: How to choose and verify analytical operations
category: analysis
---
- Before concluding, cross-check {key_metric} two different ways.
- If a breakdown gives an unexpected result, check {common_data_trap}.
- {other_rules_from_your_experience}

What to fill in: {task_type} is your kind of analysis (sales, funnel, finance). The other placeholders are your rules, ideally drawn from real past runs (see the adaptation below).

🚀 Quick start — paste into a chat:

Here is a template for a set of experience documents for an analyst agent (based on the ChartMind method).
Adapt it to my task: {describe what data you analyze and what questions you ask}.
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask what data you have, which questions come up most often and where the agent usually slips. It needs that to replace generic rules with chart and text triggers tailored to your domain. The structural pattern (index, metadata, two rule families) it takes from the template.

06

Limitations

⚠️ The effect is modest: on overall metrics the gain is a few points, and on exact-answer tasks with a strong base model it's even smaller. The only noticeable jump is in the quality of visual evidence. Don't expect "we added a rule about charts" to double your accuracy.

⚠️ The paper's rules aren't published: the available text doesn't include the experience documents themselves. The template above is a starter draft based on the patterns, not a copy of the original. Test your own rules on your own data.

⚠️ Charts hurt where precision matters: for looking up a value, a sum or checking conditions, text is better. A rule like "always draw a chart" does harm.

⚠️ You need an environment with images: the agent must be able to save an image and then "see" it. In a plain chat without code execution you can't reproduce this.

⚠️ The full loop is engineering: the automated "rule factory" with a judge and validation gates is code. You can repeat a simplified version by hand, but with less rigor.

⚠️ Evaluation is automatic and some slices are small: all answers were graded by an LLM judge. Some question types are represented by just a handful of tasks, such as forecasting and conditional reasoning. The single rule package was built on one model.

07

How They Tested It

First the authors checked whether agents need charts at all. They took 200 tasks on enterprise tables from InsightBench and ran each in four modes with the same agent: no tools, text only, charts only and free choice. The charts-only mode turned out no worse than text-only. So a chart is enough to answer the question, and the agent can read what it drew itself.

Next they gave the agents free choice. It turned out the models behave completely differently. One combined text and charts in about half of the tasks; two others almost always stuck to text. Drawing frequency didn't correlate with quality. A breakdown by question type showed complementarity: charts win on temporal change, patterns and anomalies; text wins on exact reading and conditional checks. The free mode didn't inherit the chart advantage where charts are stronger.

ChartMind grew out of this. To collect rules you need trajectories with charts, and the model doesn't produce them on its own. So each task was forced to be solved several times: freely, text only, and in three chart variants where each next one couldn't repeat the chart types of the previous one. A judge scored the outcome and labeled steps as helpful, useless or harmful. A "builder" compared trajectories and wrote rules, and the validation gates let an edit through only if quality on held-out tasks strictly went up.

They tested on three external benchmarks (reports, long-horizon research, exact-answer tasks) and four models. Results improved everywhere, and models that never drew charts picked up the habit. Ablations showed that every part matters: - without the forced-chart runs, the visual part barely grows; - without the validation gates, the gain is noticeably smaller; - analysis rules alone improve accuracy; - representation rules alone improve the visual part; - together the rules give the best result.

The practical takeaway: rules about "what to compute" and "how to show it" are best kept together, but in separate documents.

08

Adaptations and Extrapolations

💡 Context adaptation: a manual ChartMind loop in chats. Without code you can repeat a simplified version: 1. Take 5–10 typical questions about your data. 2. Have the agent solve each one twice: once "numbers only," once "charts only." 3. Ask another model or a fresh chat to act as the judge:

Here are two solutions to the same task and a reference answer. Score each from 0 to 1.
Label the key steps: helpful / useless / harmful.
Separately, say whether the chosen format (text or chart) helped or got in the way.
Then derive 3–5 rules: when tasks like these need text and when they need a chart.
  1. Write the rules into a repr_*.md document and test them on new questions that weren't in the first sample. If quality didn't improve, reject the rule (that's your stand-in for the validation gate).

🔧 Technique: add "confirm the chart with numbers" to the instructions → fewer false conclusions. Charts are great at showing where something looks off, but bad at exact values. Requiring a number check on the suspicious spot lowers the risk of concluding from a picture.

🔧 Technique: drop the line "I choose text / chart / both — and why" → save tokens. Keep it during debugging while you check whether the agent follows the rules. Remove it in production.

Extrapolation: "experience" as skills. The structure from the paper (an index, a document description, on-demand loading) matches how skills and instruction files work in modern agents. Split the rules for your analyst agent into separate skills by topic. The agent reads the descriptions and opens the full text only when needed. That saves context, and the format-choice rules end up right next to the calculation rules.

09

Resources

  • Paper: Charts as Epistemic Actions for Experience-Driven Agentic Data Analysis
  • Authors: Xinzhe Wang, Xudong Weng, Zang Li (Tencent), Shaolei Zhang (Renmin University of China)
  • Benchmarks used: ProbeBench (200 tasks based on InsightBench), DAComp-DA, DDR-Bench, DSBench
  • Foundational concept: ReAct (Yao et al., 2023)

Research digest

Key result

Finding: agents read charts well but almost never draw them on their own. Some models don't build charts at all, even with the tool right there. Others draw in every second task, but not where a chart matters most. The ChartMind method lets you teach an analyst agent to choose the result format itself: numbers to the console or a chart as an image. No fine-tuning. The selection rules sit in short files, and the agent opens them before the relevant step of the analysis. Result: *models that never drew before start drawing, and the quality of visual evidence in reports goes up.

Principle

The rules fall into two families. The first is about analysis: how to choose and verify operations. The second is about representation: when you need text, when a chart, and when both at once. The contrast is simple. Charts are for trends, patterns and anomalies. Numbers are for exact values, finding a row and checking a condition. If a chart reveals a suspicious stretch, confirm it with numbers from the table. Only then draw a conclusion. It's like an X-ray and a blood test: one shows where it hurts, the other names the cause.

Why it works

A model takes its habitual path, and for most models that path is verbal: print the table, calculate, answer. It reads images fine. It just doesn't choose that path on its own. The funny part: drawing frequency has no effect on answer quality. Models that draw often don't beat models that draw rarely. What matters is drawing at the right moment. The format choice can be written as a rule, and models follow explicit rules from a document well. Files with short descriptions don't bloat the context. The agent opens the 1-2 it needs, not the whole rulebook. The rules were tested honestly. An edit got into the set only if quality on held-out tasks strictly improved. The effect is modest, though: a few points on overall metrics. The only noticeable jump is in visual evidence.

When to apply

Data analysis by an agent that runs code → tasks where you need to both explain a trend and name an exact number. For example: why revenue dipped in October and exactly how much was refunded for one SKU. Especially useful when your agent never builds charts or builds them at random. NOT for a plain chat without code execution: the agent has nowhere to save an image and look at it. For exact-answer-only tasks the gain is minimal. A rule like "always draw a chart" does harm there.

Mini recipe

1. Create an experience/ folder: put an INDEX.md in it with a list of files. Each file has a name, a short description and a category: analysis or representation. 2. Write a format rule: time, patterns, anomalies - chart (save a PNG, look at it, describe it in words). Exact number, sum, finding a row, checking a condition - numbers to the console. 3. Add a safety net: the chart found something odd - confirm it with numbers, then conclude. 4. Make the agent label its choice: before each intermediate result, one line: text / chart / both and why. That way you immediately see where it ignores the rule. 5. Extend the triggers for your domain: funnels, cohorts, seasonality. Use cases from real past runs where the agent got it wrong. 6. Don't let the agent edit the folder: it's read-only. You change the rules, after testing them on your own tasks. 7. Once everything works, drop the format-choice label: you'll save tokens.

Examples

[BAD]: `Analyze sales_2025.csv, why revenue fell in October, and count returns for AMZ-48213` [GOOD]: `Before analyzing sales_2025.csv, read experience/INDEX.md and open only the relevant documents. Trends, seasonality, anomalies: build a chart, save a PNG, look at it and describe it in words. Exact sum, finding a row, checking a condition: print the numbers. If the chart shows a suspicious stretch, confirm it with numbers from the table. Before each result, write one line: text / chart / both, and why. Task: explain the revenue dip in October 2025 and compute the exact total of returns for SKU AMZ-48213 in dollars.` With the bad request the agent will print tables and probably won't draw a chart. With the good one it will plot revenue by day and SKU, find the drop and verify it with numbers. It will print the returns total as a number, no image.

In plain words

Data-analysis AI agents behave like blindfolded bookkeepers by default: they bury you in walls of numbers even when all you need is to spot a trend at a glance. The problem isn't blindness — multimodal models read images just fine — they simply never think to draw a chart for themselves to figure things out faster. The ChartMind method fixes this flaw without retraining, turning visualization into a tool for the agent's own thinking.

It's like trying to get out of a dense forest by reading an endless list of GPS coordinates off a sheet instead of just unfolding the map. The model stubbornly juggles dozens of table rows in its head and inevitably flubs it where one look at the curve would instantly reveal the revenue drop. Plowing down the usual text-only rut is a sure way to drown in numbers and miss the heart of the problem.

The framework's creators didn't bother with expensive fine-tuning; they simply handed the agent a playbook of practical rules, picked through tough testing. The logic is simple: exact sum — use text output from code; trends and outliers — build a clear chart; a complex audit — switch to hybrid mode. The models were fed tasks, an outside judge scored the results, and only the patterns that actually prevent mistakes made it into the final instructions.

The study ran on business reports, but the principle is completely universal. You can set up Claude Code or any other autonomous assistant with terminal access the same way for server logs, marketing or complex databases. Instead of mindlessly parsing gigabytes, the agent learns to pick the best working format on its own and becomes a thinking data researcher.

Bottom line: stop making LLMs 'just crunch the numbers' through blind console output. Without the ability to switch to charts at the right moment, complex analytics keeps turning into a mush of hallucinations. An external rulebook for behavior plugs this hole without spending a single dollar on training. Let the agent check itself against reality visually, or keep chasing phantom conclusions from crooked tables.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on ChartMind: Teaching an Analyst Agent to Decide for Itself When to Look at a Chart and When to Look at the Numbers arXiv:2610.30072

Sign in to apply this study New accounts get 50 free credits.