ChartSense_11k / README.md
Avinaash's picture
Dataset card
a3266e1 verified
|
Raw
History Blame Contribute Delete
12.7 kB
metadata
license: cc-by-4.0
language:
  - en
task_categories:
  - text-generation
tags:
  - data-visualization
  - chart
  - reasoning
  - synthetic
  - sft
  - conversational
size_categories:
  - 10K<n<100K
configs:
  - config_name: default
    data_files: data/train-*.parquet

ChartSense 11k

This is a supervised fine tuning dataset that teaches a small language model to behave like a data analyst on chart and data visualization work, i.e.

  1. it should be able to see through the user's words,
  2. resolve underspecified asks,
  3. push back if required,
  4. critique flawed charts, and
  5. answer the question the chart is a means to.

Built for the AutoScientist Challenge by Adaption Labs.

This is the full build: both slices grown to their current size. The two partial builds, ChartSense_8645_web_enriched and ChartSense_8827_corpus_enriched, hold one slice at the original size so each slice's contribution can be measured separately.

What it is

11,434 conversations between a person with data and an analyst, each paired with the analyst's full reasoning. The analyst reads a table, works out what the person actually wants, decides how to show it, writes runnable code, and checks its own arithmetic before answering.

Conversations 11,434
Supervised training lines 13,242
Average completion 8,112 characters
Completion range 1,567 to 19,666 characters

A conversation with two supervised turns, such as one where the analyst asks a question and then answers based on a user response, contributes two lines that share their earlier turns. That is why 11,434 conversations give 13,242 training lines.

How it was built

two kinds of seed  ->  trajectory  ->  teacher model  ->  training row
   web article           the spec      Muse Spark 1.2     conversation
   corpus row          for one example                    + thinking block

1. Two kinds of seed. Every example starts from real material, never from a blank page.

  • Web seeds produce 5,626 conversations, drawn from 3,019 articles about data and charts. The article text and its chart images are downloaded before generation, so the teacher is reading the real post rather than recalling it. Where there are more conversations than articles, an article is reused under a different specification, never the same one.
  • Corpus seeds produce 5,808 conversations from 5,689 rows of four existing visualization corpora. Each brings a real schema, real gold code or a real answer set.

The two kinds produce different data on purpose. A corpus seed hands over an actual table, so the analyst works with real columns. A web seed hands over a world and a problem, so the table has to be built to fit it.

2. Behaviour patterns define the trajectory. Before any model is called, a specification is drawn for each example. It fixes what the user wants, how clearly they ask, who they are, how long the conversation runs, and which behaviours the analyst must exercise.

Those behaviours were chosen from the ways models actually fail on data visualization tasks: charting a question instead of answering it, accepting a vague word like "top" without resolving it against the data, ignoring a stated library, going along with a false claim, or reviewing a chart without recomputing what it asserts. Each behaviour is paired with a cause that has to be visibly present in the user's message, so the example cannot exercise a behaviour the conversation never provoked.

The draw runs against fixed quotas with a ledger correcting drift, uses no model calls, and a fixed random seed reproduces the whole thing.

3. A teacher model writes the example. The seed material and the specification go to Muse Spark 1.2 at xhigh reasoning effort, which writes the table, the conversation and the thinking.

4. Validation. Every row is checked against its own specification. Rows that fail are regenerated rather than patched, and rows that cannot be regenerated are dropped.

The thinking block

Each training row's completion opens with a thinking block, then the reply. It uses a closed set of nine XML tagged sections, in a fixed order, and only the ones a given turn needs.

Tag What it holds
<understand_data> What one row is, each column's type and range, units, and the quirks: duplicates, blanks, constant columns, mixed types
<find_data> What was selected, what was ignored, and why
<understand_request> The task in analytic terms, the specific gap if there is one, and the decision: proceed, assume, ask, repair or push back
<clean_reshape> The transform plan with a reason per step, and every derived number computed
<chart_choice> Candidate charts killed using this table's own numbers, then the winner, or an explicit decision not to chart
<chart_spec> The encoding plan before code: axes, colour, the title stating the finding, annotations, where caveats live
<language> Which library and why
<read_chart> For any chart in play, what each mark encodes, then whether the metric is sensible, the values recompute, what pattern shows, and what else could explain it
<verify> Re-derives every number the reply will state, then runs a five point check against Tufte's principles

The <chart_choice> rule is the one that most shapes the reasoning. A rejected option has to be killed with a count, a value or a ratio from the table in front of it. "A pie is poor for small categories" does not count, because it is true of every dataset. "Binning collapses the 32 points into 3 near-equal bars" does, because it stops being true if the table changes.

Row format

Parquet shards under data/, in chat format with four columns.

messages     the whole conversation, ending on the assistant turn to be learned
slice        "web" or "corpus"
trajectory   the specification the example was built from
out_tags     what the teacher determined about the example
  • messages is a list of {role, content}, alternating user and assistant and always ending on an assistant turn. That final assistant message is the training target: it holds the thinking block wrapped in <think> and </think>, then the reply. Every earlier assistant turn is conversation history and carries a plain reply with no thinking block.
  • slice is web or corpus, naming which kind of seed the example came from. The two are different populations, so filter on this if you want one or the other rather than the pool.
  • trajectory is the specification the example was built from. It carries the row id, the tags, supervises naming which turn this row supervises, and near_dup_of. Two fields are reshaped so the schema is stable: triggers is a list of {behaviour, cause} rather than a map keyed by behaviour number, and the corpus seed's source row is carried as JSON text in seed.row_json.
  • out_tags holds what the teacher determined: chart type, library, topic, which thinking sections fired, the flaw shown, the data source and the table's dimensions. The model is not trained on it.

Conversations run 2 to 12 messages: 7,322 rows are a single exchange and 5,920 are longer threads.

The eight behaviours

Each row exercises one to three behaviours, and each has a visible cause.

Behaviour The cause looks like Conversations
Resolve an underspecified goal "the request names a time frame loosely ('recent', 'lately') that the data can read two ways" 3,202
See through the user's words "the user asks what they should use for this data, handing over the choice" 1,308
Iterate in small steps "the user pastes a chart they already have and asks for one small change to it, nothing else" 2,052
Handle raw and messy data "the table arrives with duplicate rows and stray columns the task does not need" 2,977
Honour the user's stack "the user's pasted matplotlib code makes the library unambiguous and the reply must stay in it" 2,970
Handle a bad request or wrong claim "the user asks for a chart form that will not work at this cardinality, and a defensible repaired version exists" 2,702
Answer the question, not just chart it "the user asks a question whose answer requires computing over the data, not looking at it" 1,817
Assess a chart critically "the user asks for a review; the chart is sound and the verdict must say so, naming what was checked" 2,761

Composition

What the user wants done

Conversations
Clean up and reshape raw data 2,977
Build a chart from scratch 2,266
Make one small change to an existing chart 2,052
Review a chart critically 1,827
Get an answer, chart at most a by-product 1,378
Reproduce a chart they have seen 934

How clear the request is. 5,128 fully answerable as asked. 5,182 with a gap the analyst fills and states as an assumption. 1,124 with a gap that genuinely needs one question, because two readings change the output.

Conversation shape. 9,626 rows supervise the final turn only. 1,124 supervise an ask, 684 a pushback, and 1,808 the resolution that follows one of those. Turn counts run 2, 4, 6, 8, 10 and 12, with 6,338 single exchanges and 5,096 longer threads.

Charts and code. 589 distinct chart types, led by bar 4,283, line 2,115, pie 501, scatter 480, horizontal bar 326, heatmap 270. Libraries are matplotlib 6,920, plotly 1,434, altair 1,003, seaborn 732, vega-lite 395, Chart.js 375.

Flawed charts. 2,359 conversations paste a chart with a real fault for the analyst to find: truncated axes, cherry-picked windows, radius-scaled bubbles, inverted axes, manufactured second axes, loaded titles, flattering category order, missing units. The corrected version appears only in the reply, never as input.

Unanswerable requests. 565 conversations ask for something the data cannot support. The correct reply says so plainly and states what the data can support instead.

Tables. Average 33.9 rows by 5.8 columns, ranging 2 to 80 rows. The pasted table is always the entire dataset, so every number in a reply can be checked against it.

Sources

Web seeds

Source Conversations
OpenReview papers and reviews 2,991
Andrew Gelman's blog 750
Junk Charts 651
We Have The Data 383
Kieran Healy 328
Randal Olson 313
Road to Larissa 100
Sportsball 81
PAIR 29

Corpus seeds

Corpus Conversations
VisCode-200K 2,470
nvBench 2.0 1,536
ChartGPT 907
Chart2Code-160k 895

Only training splits were read. Development and test splits were never loaded, so no test row can reach the output by any path.

Known limits

  • Prompt versions are not uniform. The instructions were revised as faults were found. 443 web rows came from an earlier version whose rules for pushback turns were weaker. Every row that failed validation was regenerated, so all rows pass, but those 443 were written under a weaker prompt.
  • The teacher occasionally drops a question mark at the end of an ask turn. Those rows were corrected by appending a single ? and changing nothing else; in every case the question was already the final sentence. Expect roughly 6% of ask turns to need it on any regenerated batch.
  • About 1% of assistant turns in the conversation history are acknowledgements carrying no numbers, which the instructions ask the teacher to avoid.
  • Flaw and chart type labels are free text, so the same fault appears under several spellings, e.g. truncated y-axis and truncated_y_axis. Normalise before using them as a filter.
  • The corpus slice is machine generated at source. All four corpora are themselves synthetic, unlike the web articles.
  • nvBench 2.0 and ChartGPT share a lineage. Both descend from Spider, so they were capped as one source rather than two.
  • The two slices are different populations. Sample from them deliberately rather than as one pool.
  • 906 of the 11,434 conversations are near-duplicates of another conversation, by design, so the model sees the same request over differently shaped data. trajectory.near_dup_of names the partner. Split on that field, or a random split will put a pair either side of the train and test line.
  • A conversation with two supervised turns repeats its trajectory across both of its lines, so trajectory.id is not unique per line. Group on it if you need one record per conversation.

Licensing

Released under CC-BY-4.0.