Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
parquet
Languages:
English
Size:
10K - 100K
License:
File size: 12,690 Bytes
a3266e1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | ---
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.
|