Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
parquet
Languages:
English
Size:
10K - 100K
License:
| 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 | |
| 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**. | |
| ## What it is | |
| 10,038 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 | 10,038 | | |
| | Supervised training lines | 11,653 | | |
| | Average completion | 8,093 characters | | |
| | Completion range | 1,567 to 18,971 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 10,038 conversations give 11,653 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,019 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. | |
| There are more conversations than articles because an article is reused under | |
| a different specification, never under the same one. | |
| - **Corpus seeds** produce 5,019 conversations from 4,900 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. | |
| ## The trajectory tags | |
| Every example carries the specification it was built from. These are inputs given to the teacher to guide the | |
| generation. | |
| | Tag | What it fixes | Example | | |
| | --- | --- | --- | | |
| | `example_type` | The job the user is trying to finish | `judge` | | |
| | `clarity` | Whether the request is answerable as asked | `workable` | | |
| | `phrasing` | The grammatical form of the opening message | `command` | | |
| | `behaviours` | Which target behaviours the analyst must exercise | `[8, 6]` | | |
| | `triggers` | The cause of each behaviour, which must be visible in the prompt | `"8": "claims ride on the pasted chart and the numbers need recomputing before trusting it"` | | |
| | `uses_flawed_chart` | Whether a chart with a real fault is pasted in | `true` | | |
| | `data_distribution_specifics` | The shape the values hold | `seasonal: a repeating rise and fall over time with one clear peak` | | |
| | `turns` | Total turns in the finished conversation | `4` | | |
| | `supervise` | Which assistant turns become training rows, in order | `["final"]` | | |
| | `answerable` | Whether the data can support what was asked | `true` | | |
| | `role` | Who the user is | `reporter` | | |
| | `seed` | The source material: a link and description, or a corpus row id | OpenReview forum post | | |
| On corpus rows `data_distribution_specifics` usually reads `as seen in corpus | |
| source`, meaning nothing was imposed and the values keep whatever shape the real | |
| data had. Those rows carry an extra output tag, `observed_distribution`, | |
| recording the shape that turned out to be there, e.g. "one director at three, | |
| two at two, rest at one". | |
| ## 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. A trainer that | |
| splits a chat into a prompt and a completion at the last assistant turn gets | |
| the right target with no further configuration. | |
| - `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, described in the | |
| section above. It carries the row `id`, the twelve tags, `supervises` naming | |
| which turn this row supervises, and `near_dup_of`. Use it to filter, e.g. to | |
| take only pushback rows or to hold out every row that pastes a flawed chart. | |
| 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: 6,360 rows are a single exchange and 5,293 | |
| are longer threads. | |
| ## The eight behaviours | |
| Each row exercises one to three behaviours, and each has a visible cause. | |
| | Behaviour | The cause looks like | Rows | | |
| | --- | --- | --- | | |
| | Resolve an underspecified goal | "the request names a time frame loosely ('recent', 'lately') that the data can read two ways" | 2,793 | | |
| | See through the user's words | "the user asks what they should use for this data, handing over the choice" | 1,157 | | |
| | Iterate in small steps | "the user pastes a chart they already have and asks for one small change to it, nothing else" | 1,840 | | |
| | Handle raw and messy data | "the table arrives with duplicate rows and stray columns the task does not need" | 2,612 | | |
| | Honour the user's stack | "the user's pasted matplotlib code makes the library unambiguous and the reply must stay in it" | 2,615 | | |
| | 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,384 | | |
| | Answer the question, not just chart it | "the user asks a question whose answer requires computing over the data, not looking at it" | 1,587 | | |
| | 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,393 | | |
| ## Who is asking | |
| Ten roles to help guide the teacher to generate grounded user queries. Some user utterances from the dataset: | |
| > **reporter** — quick sidebar - are we still spending way more on English than everything else lately? need a number i can quote for the print note | |
| > **student** — Review my chart before I put it in my replication report — slides are due tomorrow and prof wants the 'best' categories highlighted. | |
| > **small business owner** — quick help? bank meeting tomorrow need a sales breakdown by category chart from Square - here's the raw dump bit messy after re-export last week: | |
| > **consultant** — deck tweak — can you make the peak pop a bit more? just that, nothing else. partner needs slide tonight — no seaborn, team standard is Chart.js | |
| > **web engineer** — Clean up this export and get me a chart of the best pages for tomorrow's product review. Has to be matplotlib — product page embed only takes matplotlib outputs. | |
| ## How they type | |
| The user utterances are varied: | |
| > **command** — Review this figure for my working paper draft before I send to coauthors — need a hard-nosed critique, not just approval. | |
| > **question** — Quick question for tomorrow's ops review deck — which service is our biggest headache right now? | |
| > **fragment** — quick sidebar - are we still spending way more on English than everything else lately? | |
| > **mixed** — hey - quick clean for the ops review deck tomorrow - need this incident export tidied and ready to drop in. | |
| ## Composition | |
| **What the user wants done** | |
| | | Rows | | |
| | --- | --- | | |
| | Clean up and reshape raw data | 2,612 | | |
| | Build a chart from scratch | 1,976 | | |
| | Make one small change to an existing chart | 1,840 | | |
| | Review a chart critically | 1,599 | | |
| | Get an answer, chart at most a by-product | 1,217 | | |
| | Reproduce a chart they have seen | 794 | | |
| **How clear the request is.** 4,509 fully answerable as asked. 4,516 with a gap | |
| the analyst fills and states as an assumption. 1,013 with a gap that genuinely | |
| needs one question, because two readings change the output. | |
| **Conversation shape.** 8,423 rows supervise the final turn only. 1,013 supervise | |
| an ask and its resolution. 602 supervise a pushback and its resolution. Turn | |
| counts run 2, 4, 6, 8, 10 and 12, with 5,476 single exchanges and 4,562 longer | |
| threads. | |
| **Charts and code.** 537 distinct chart types, led by bar 3,806, line 1,873, | |
| scatter 437, pie 404, horizontal bar 292, heatmap 234. Libraries are matplotlib | |
| 6,138, plotly 1,245, altair 837, seaborn 646, Vega-Lite 352, Chart.js 318. | |
| **Flawed charts.** 2,063 rows 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.** 492 rows 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 | Rows | | |
| | --- | --- | | |
| | OpenReview papers and reviews | 2,667 | | |
| | Andrew Gelman's blog | 667 | | |
| | Junk Charts | 589 | | |
| | We Have The Data | 345 | | |
| | Kieran Healy | 293 | | |
| | Randal Olson | 269 | | |
| | Road to Larissa | 90 | | |
| | Sportsball | 74 | | |
| | PAIR | 25 | | |
| **Corpus seeds** | |
| | Corpus | Rows | | |
| | --- | --- | | |
| | VisCode-200K | 2,222 | | |
| | nvBench 2.0 | 1,264 | | |
| | ChartGPT | 770 | | |
| | Chart2Code-160k | 763 | | |
| 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. | |
| 56 such 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 10,038 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 | |
| CC-BY-4.0 |