Datasets:
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationError
Exception: CastError
Message: Couldn't cast
text: string
label: string
label_id: int64
raw_text: string
note: string
seed: string
to
{'text': Value('string'), 'label': Value('string'), 'label_id': Value('int64'), 'seed': Value('string')}
because column names don't match
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1779, in _prepare_split_single
for key, table in generator:
^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 299, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 128, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2321, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2249, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
text: string
label: string
label_id: int64
raw_text: string
note: string
seed: string
to
{'text': Value('string'), 'label': Value('string'), 'label_id': Value('int64'), 'seed': Value('string')}
because column names don't match
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1348, in compute_config_parquet_and_info_response
parquet_operations = convert_to_parquet(builder)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 980, in convert_to_parquet
builder.download_and_prepare(
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 882, in download_and_prepare
self._download_and_prepare(
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 943, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1646, in _prepare_split
for job_id, done, content in self._prepare_split_single(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1832, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
text string | label string | label_id int64 | seed string |
|---|---|---|---|
[dm][reply_to:100951][in_flight:1] APPROVE. | APPROVE | 0 | approve |
[dm][reply_to:100952][in_flight:2] APPROVE. | APPROVE | 0 | approve |
[dm][reply_to:100953][in_flight:3] APPROVE. | APPROVE | 0 | approve |
[dm][no_reply_to][in_flight:1] APPROVE. | APPROVE | 0 | approve |
[dm][reply_to:100955][in_flight:1] Approve? | APPROVE | 0 | approve |
[dm][reply_to:100956][in_flight:2] Approve? | APPROVE | 0 | approve |
[dm][reply_to:100957][in_flight:3] Approve? | APPROVE | 0 | approve |
[dm][no_reply_to][in_flight:1] Approve? | APPROVE | 0 | approve |
[dm][reply_to:100959][in_flight:1] APPROVE | APPROVE | 0 | approve |
[dm][reply_to:100960][in_flight:2] APPROVE | APPROVE | 0 | approve |
[dm][reply_to:100961][in_flight:3] APPROVE | APPROVE | 0 | approve |
[dm][no_reply_to][in_flight:1] APPROVE | APPROVE | 0 | approve |
[dm][reply_to:100963][in_flight:1] approve? | APPROVE | 0 | approve |
[dm][reply_to:100964][in_flight:2] approve? | APPROVE | 0 | approve |
[dm][reply_to:100965][in_flight:3] approve? | APPROVE | 0 | approve |
[dm][no_reply_to][in_flight:1] approve? | APPROVE | 0 | approve |
[dm][reply_to:100967][in_flight:1] Approve? | APPROVE | 0 | approve |
[dm][reply_to:100968][in_flight:2] Approve? | APPROVE | 0 | approve |
[dm][reply_to:100969][in_flight:3] Approve? | APPROVE | 0 | approve |
[dm][no_reply_to][in_flight:1] Approve? | APPROVE | 0 | approve |
[dm][reply_to:100971][in_flight:1] approve? | APPROVE | 0 | approve |
[dm][reply_to:100972][in_flight:2] approve? | APPROVE | 0 | approve |
[dm][reply_to:100973][in_flight:3] approve? | APPROVE | 0 | approve |
[dm][no_reply_to][in_flight:1] approve? | APPROVE | 0 | approve |
[dm][reply_to:101951][in_flight:1] yes? | APPROVE | 0 | yes |
[dm][reply_to:101952][in_flight:2] yes? | APPROVE | 0 | yes |
[dm][reply_to:101953][in_flight:3] yes? | APPROVE | 0 | yes |
[dm][no_reply_to][in_flight:1] yes? | APPROVE | 0 | yes |
[dm][reply_to:101955][in_flight:1] yes? | APPROVE | 0 | yes |
[dm][reply_to:101956][in_flight:2] yes? | APPROVE | 0 | yes |
[dm][reply_to:101957][in_flight:3] yes? | APPROVE | 0 | yes |
[dm][no_reply_to][in_flight:1] yes? | APPROVE | 0 | yes |
[dm][reply_to:101959][in_flight:1] yes! | APPROVE | 0 | yes |
[dm][reply_to:101960][in_flight:2] yes! | APPROVE | 0 | yes |
[dm][reply_to:101961][in_flight:3] yes! | APPROVE | 0 | yes |
[dm][no_reply_to][in_flight:1] yes! | APPROVE | 0 | yes |
[dm][reply_to:101963][in_flight:1] yes | APPROVE | 0 | yes |
[dm][reply_to:101964][in_flight:2] yes | APPROVE | 0 | yes |
[dm][reply_to:101965][in_flight:3] yes | APPROVE | 0 | yes |
[dm][no_reply_to][in_flight:1] yes | APPROVE | 0 | yes |
[dm][reply_to:101967][in_flight:1] yes | APPROVE | 0 | yes |
[dm][reply_to:101968][in_flight:2] yes | APPROVE | 0 | yes |
[dm][reply_to:101969][in_flight:3] yes | APPROVE | 0 | yes |
[dm][no_reply_to][in_flight:1] yes | APPROVE | 0 | yes |
[dm][reply_to:101971][in_flight:1] Yes | APPROVE | 0 | yes |
[dm][reply_to:101972][in_flight:2] Yes | APPROVE | 0 | yes |
[dm][reply_to:101973][in_flight:3] Yes | APPROVE | 0 | yes |
[dm][no_reply_to][in_flight:1] Yes | APPROVE | 0 | yes |
[dm][reply_to:102951][in_flight:1] Ok? | APPROVE | 0 | ok |
[dm][reply_to:102952][in_flight:2] Ok? | APPROVE | 0 | ok |
[dm][reply_to:102953][in_flight:3] Ok? | APPROVE | 0 | ok |
[dm][no_reply_to][in_flight:1] Ok? | APPROVE | 0 | ok |
[dm][reply_to:102955][in_flight:1] Ok! | APPROVE | 0 | ok |
[dm][reply_to:102956][in_flight:2] Ok! | APPROVE | 0 | ok |
[dm][reply_to:102957][in_flight:3] Ok! | APPROVE | 0 | ok |
[dm][no_reply_to][in_flight:1] Ok! | APPROVE | 0 | ok |
[dm][reply_to:102959][in_flight:1] ok? | APPROVE | 0 | ok |
[dm][reply_to:102960][in_flight:2] ok? | APPROVE | 0 | ok |
[dm][reply_to:102961][in_flight:3] ok? | APPROVE | 0 | ok |
[dm][no_reply_to][in_flight:1] ok? | APPROVE | 0 | ok |
[dm][reply_to:102963][in_flight:1] Ok | APPROVE | 0 | ok |
[dm][reply_to:102964][in_flight:2] Ok | APPROVE | 0 | ok |
[dm][reply_to:102965][in_flight:3] Ok | APPROVE | 0 | ok |
[dm][no_reply_to][in_flight:1] Ok | APPROVE | 0 | ok |
[dm][reply_to:102967][in_flight:1] ok? | APPROVE | 0 | ok |
[dm][reply_to:102968][in_flight:2] ok? | APPROVE | 0 | ok |
[dm][reply_to:102969][in_flight:3] ok? | APPROVE | 0 | ok |
[dm][no_reply_to][in_flight:1] ok? | APPROVE | 0 | ok |
[dm][reply_to:102971][in_flight:1] Ok! | APPROVE | 0 | ok |
[dm][reply_to:102972][in_flight:2] Ok! | APPROVE | 0 | ok |
[dm][reply_to:102973][in_flight:3] Ok! | APPROVE | 0 | ok |
[dm][no_reply_to][in_flight:1] Ok! | APPROVE | 0 | ok |
[dm][reply_to:103951][in_flight:1] okay? | APPROVE | 0 | okay |
[dm][reply_to:103952][in_flight:2] okay? | APPROVE | 0 | okay |
[dm][reply_to:103953][in_flight:3] okay? | APPROVE | 0 | okay |
[dm][no_reply_to][in_flight:1] okay? | APPROVE | 0 | okay |
[dm][reply_to:103955][in_flight:1] OKAY. | APPROVE | 0 | okay |
[dm][reply_to:103956][in_flight:2] OKAY. | APPROVE | 0 | okay |
[dm][reply_to:103957][in_flight:3] OKAY. | APPROVE | 0 | okay |
[dm][no_reply_to][in_flight:1] OKAY. | APPROVE | 0 | okay |
[dm][reply_to:103959][in_flight:1] okay. | APPROVE | 0 | okay |
[dm][reply_to:103960][in_flight:2] okay. | APPROVE | 0 | okay |
[dm][reply_to:103961][in_flight:3] okay. | APPROVE | 0 | okay |
[dm][no_reply_to][in_flight:1] okay. | APPROVE | 0 | okay |
[dm][reply_to:103963][in_flight:1] Okay | APPROVE | 0 | okay |
[dm][reply_to:103964][in_flight:2] Okay | APPROVE | 0 | okay |
[dm][reply_to:103965][in_flight:3] Okay | APPROVE | 0 | okay |
[dm][no_reply_to][in_flight:1] Okay | APPROVE | 0 | okay |
[dm][reply_to:103967][in_flight:1] okay | APPROVE | 0 | okay |
[dm][reply_to:103968][in_flight:2] okay | APPROVE | 0 | okay |
[dm][reply_to:103969][in_flight:3] okay | APPROVE | 0 | okay |
[dm][no_reply_to][in_flight:1] okay | APPROVE | 0 | okay |
[dm][reply_to:103971][in_flight:1] OKAY | APPROVE | 0 | okay |
[dm][reply_to:103972][in_flight:2] OKAY | APPROVE | 0 | okay |
[dm][reply_to:103973][in_flight:3] OKAY | APPROVE | 0 | okay |
[dm][no_reply_to][in_flight:1] OKAY | APPROVE | 0 | okay |
[dm][reply_to:104951][in_flight:1] Execute? | APPROVE | 0 | execute |
[dm][reply_to:104952][in_flight:2] Execute? | APPROVE | 0 | execute |
[dm][reply_to:104953][in_flight:3] Execute? | APPROVE | 0 | execute |
[dm][no_reply_to][in_flight:1] Execute? | APPROVE | 0 | execute |
trade-decision-classifier-v1-dataset
Human-curated + synthetically augmented dataset for training trading-agent reply classifiers. Companion to DoDataThings/distilbert-trade-decision-classifier-v1.
Why this dataset
Trading agents that DM trade proposals to a human reviewer and accept free-form text replies need a way to convert those replies into discrete actions. There's no off-the-shelf dataset for this — sentiment classifiers don't capture the action space, and general intent classifiers don't understand the resize / reprice / defer distinctions specific to trade decisions.
This dataset fills that gap with a balanced, hand-curated 6-label corpus covering canonical replies and adversarial cases. The taxonomy and seeds were iterated against a working trading-agent reply distribution over multiple training cycles.
TL;DR
- 25,200 training rows generated by augmenting 1,047 human-written seed phrases via case / punctuation / whitespace and structural-prefix expansion (~24× per seed). Seeds are natural reply phrasings, not LLM-generated text.
- 175 held-out eval rows, hand-curated, adversarial-leaning, zero-leakage verified against training.
- 6 balanced classes — between 4,080 and 4,608 rows each.
- Reproducible — re-running the generator script with
--seed-rng 42produces byte-identical output.
Class distribution
| Label | Train | Eval | What it covers |
|---|---|---|---|
| APPROVE | 4,152 | 30 | Execute as proposed. "yes", "approve", "let's go" |
| DECLINE | 4,128 | 30 | Kill the proposal. "no", "pass", "kill it" |
| HOLD | 4,152 | 34 | Active deferral. "hold off", "checking", "leaning approve" |
| COUNTER_SIZE | 4,080 | 30 | Approve at different share count. "size 10", "dump half" |
| COUNTER_PRICE | 4,080 | 25 | Approve at different limit price. "at $49", "limit 50" |
| UNCLEAR | 4,608 | 26 | No committable position. Multi-intent, off-topic, ambiguous. |
UNCLEAR is slightly larger because it includes template-generated multi-intent examples using a 100-ticker pool (see Variation dimensions below).
Schema
Each row is a JSON object:
{
"text": "[dm][reply_to:131967][in_flight:1] Reject!",
"label": "DECLINE",
"label_id": 1,
"seed": "reject"
}
Fields:
text— the prefixed input fed to the modellabel— string labellabel_id— int [0, 5]seed(train only) — original seed phrase, or_ticker_tmpl_<...>for template-generated rowsraw_text(eval only) — original text before prefix wrapnote(eval only) — curator's category note
Label ID mapping:
{"APPROVE": 0, "DECLINE": 1, "HOLD": 2,
"COUNTER_SIZE": 3, "COUNTER_PRICE": 4, "UNCLEAR": 5}
Structural prefix scheme
Every row's text field starts with three tags carrying chat context:
[dm|group][reply_to:N|no_reply_to][in_flight:K]
These give the model context that pure text would not — "yes" with 1 proposal in flight is APPROVE; "yes" with 3 in flight and no quote-reply is structurally ambiguous and trained as UNCLEAR.
The prefix is concatenated into the input string and tokenized as regular subword pieces — no special-token registration required.
Variation dimensions
Each of the 1,047 human-written seeds expands to ~24 training rows via two stacked variation axes:
1. Surface variants (6 per seed, randomly sampled):
- Case: lowercase / title / uppercase / as_is
- Punctuation: none /
./!/? - Whitespace: none / leading 2 spaces / trailing 2 spaces
2. Structural prefix variants (4 per surface form):
(reply_to: present, in_flight: 1)(reply_to: present, in_flight: 2)(reply_to: present, in_flight: 3)(reply_to: absent, in_flight: 1)— single-default rule
Additionally, the UNCLEAR class includes 480 template-generated rows using a 100-ticker pool (mega-caps, ETFs, ADRs, mid-caps, speculative names) and 20 multi-intent templates ("approve {A} not {B}", "yes {A} no {B}", "swap {A} for {B}", etc.). This teaches the model the multi-intent PATTERN across diverse ticker tokens without bias toward any specific ticker. The model generalizes to ticker pairs it has never seen in training.
Zero-leakage verification
Eval phrases are NEVER present in training:
import json
training_seeds = set(
json.loads(l)["seed"].strip().lower()
for l in open("training.jsonl")
)
overlaps = sum(
1 for l in open("eval.jsonl")
if json.loads(l)["raw_text"].strip().lower() in training_seeds
)
assert overlaps == 0
This is enforced on every regeneration. The eval set's adversarial value depends on the model learning patterns it can generalize to novel phrasings, not memorizing surface forms.
Design decisions
Author-written seeds, not LLM-generated. The 1,047 seed phrases reflect natural reply phrasings a human would actually type — short, casual, sometimes with typos, sometimes with adjacency to system commands. Seeds were hand-written and iteratively reviewed against eval failures.
Programmatic augmentation, not LLM expansion. Surface variation is deterministic — case/punctuation/whitespace flipping plus structural-prefix combinations. No language model generates content. This keeps the dataset auditable and reproducible.
Six labels with COUNTER_PRICE separated from COUNTER_SIZE. Earlier prototypes used five labels. The sixth (COUNTER_PRICE) was added because resize ("size 10") and reprice ("at $49") require different downstream extraction — share count vs limit price — and conflating them would force the consumer to disambiguate post-classification.
Balanced classes by design. All classes are within 4,080–4,608 rows (~13% spread). Class weighting in training becomes functionally uniform, simplifying the training loss and removing a configuration knob.
Eval set adversarial-leaning. The held-out 175 examples lean toward edge cases that surfaced during iterative training — casual register ("yup", "yeppers"), action metaphors ("press the button"), negation-as-deferral ("not now", "dont fire yet"), and multi-intent ambiguity ("yes but actually no"). Easy canonical examples are under-represented in eval intentionally.
Intended downstream task
Train a classifier that routes short free-form text replies on trade proposals into one of 6 action intents:
APPROVE execute as proposed
DECLINE kill the proposal
HOLD defer the decision
COUNTER_SIZE execute at a different share count
COUNTER_PRICE execute at a different limit price
UNCLEAR cannot safely commit (refuse)
The data assumes the consumer pairs the model with a confidence threshold, deterministic safety rails (budget/position limits), and a fallback confirmation mechanism. The dataset is NOT intended for standalone-classifier deployments without those layers.
Loading
from datasets import load_dataset
ds = load_dataset("DoDataThings/trade-decision-classifier-v1-dataset")
ds["train"] # 25,200 rows
ds["test"] # 175 rows (held out, used for eval — never trained on)
Or directly:
import json
train = [json.loads(l) for l in open("training.jsonl")]
test = [json.loads(l) for l in open("eval.jsonl")]
Trained model
A reference classifier trained on this dataset: DoDataThings/distilbert-trade-decision-classifier-v1. Reaches macro F1 0.954 on the held-out eval set with zero high-confidence misclassifications.
Limitations
- Surface coverage. The 1,047 human-written seeds reflect representative reply phrasings curated through 12 training iterations against an adversarial eval set. Real production replies will still exceed seed coverage on long-tail phrasing; expect ~5% of replies to land at the confidence floor and route to confirmation fallback.
- Class boundaries on multi-intent inputs ("approve but cut size") are ambiguous; eval labels reflect a single curator's judgment.
- The "more shares" eval row is architecturally ambiguous (resize intent without a number) — a model trained on this dataset will correctly emit UNCLEAR rather than COUNTER_SIZE, which is safe behavior but reads as a miss against the eval label.
- English-only. No localization in v1.
License
Apache 2.0.
- Downloads last month
- 10