codelion commited on
Commit
3443369
·
verified ·
1 Parent(s): a9f7840

typed-decisions: 400 cases, 2000 typed decisions across 4 workflows

Browse files
AUDIT.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Typed Decisions dataset audit
2
+
3
+ Gold labels are a **teacher signal** from a ~4B-class endpoint, not ground truth. The benchmark measures how well a small model reproduces a larger one's typed decisions; it does not claim the teacher is correct.
4
+
5
+ ## agent_trace_observability
6
+
7
+ 100 cases, 100 distinct states (100.0%), 100% with generated text, 3.00 endpoint attempts per case.
8
+
9
+ | Question | Type | Labels | Majority (95% LB) | Entropy | Mean conf | Sample TV | Top factor | MI/H | Flags |
10
+ |---|---|---|---|---|---|---|---|---|---|
11
+ | `outcome` | choice | 4 | success 50% (40%) | 1.16 | 0.46 | 0.27 | violated_constraint | 0.394 | ok |
12
+ | `action` | choice | 4 | human_review 36% (27%) | 1.17 | 0.37 | 0.26 | violated_constraint | 0.214 | ok |
13
+ | `needs_review` | noul | 2 | false 55% (45%) | 0.69 | 0.51 | 0.14 | violated_constraint | 0.278 | ok |
14
+ | `risk` | score | 4 | 0 34% (25%) | 1.35 | 0.54 | 0.24 | irreversible_action | 0.430 | ok |
15
+ | `urgency` | score | 4 | 0 37% (28%) | 1.27 | 0.42 | 0.27 | violated_constraint | 0.347 | ok |
16
+
17
+ ## customer_service
18
+
19
+ 100 cases, 100 distinct states (100.0%), 100% with generated text, 3.01 endpoint attempts per case.
20
+
21
+ | Question | Type | Labels | Majority (95% LB) | Entropy | Mean conf | Sample TV | Top factor | MI/H | Flags |
22
+ |---|---|---|---|---|---|---|---|---|---|
23
+ | `category` | choice | 5 | billing 38% (29%) | 1.45 | 0.83 | 0.09 | topic | 0.869 | ok |
24
+ | `action` | choice | 4 | escalate_to_human 52% (42%) | 1.17 | 0.50 | 0.32 | topic | 0.363 | ok |
25
+ | `needs_human` | noul | 2 | true 67% (57%) | 0.63 | 0.45 | 0.17 | topic | 0.178 | ok |
26
+ | `urgency` | score | 3 | 2 42% (33%) | 1.02 | 0.57 | 0.23 | tone | 0.236 | ok |
27
+ | `churn_risk` | score | 4 | 2 47% (38%) | 1.15 | 0.59 | 0.19 | topic | 0.352 | ok |
28
+
29
+ ## invoice_processing
30
+
31
+ 100 cases, 100 distinct states (100.0%), 100% with generated text, 3.25 endpoint attempts per case.
32
+
33
+ | Question | Type | Labels | Majority (95% LB) | Entropy | Mean conf | Sample TV | Top factor | MI/H | Flags |
34
+ |---|---|---|---|---|---|---|---|---|---|
35
+ | `disposition` | choice | 4 | approve 45% (36%) | 1.13 | 0.54 | 0.30 | issue | 0.545 | ok |
36
+ | `matches_order` | noul | 2 | true 54% (44%) | 0.69 | 0.80 | 0.12 | issue | 0.834 | ok |
37
+ | `duplicate` | noul | 2 | false 89% (81%) | 0.35 | 0.83 | 0.09 | issue | 0.681 | ok |
38
+ | `discrepancy_severity` | score | 4 | 0 47% (38%) | 1.06 | 0.63 | 0.23 | issue | 0.615 | ok |
39
+ | `urgency` | score | 3 | 2 51% (41%) | 1.01 | 0.54 | 0.23 | days_until_due | 0.373 | ok |
40
+
41
+ ## security_incidents
42
+
43
+ 100 cases, 100 distinct states (100.0%), 96% with generated text, 3.04 endpoint attempts per case.
44
+
45
+ | Question | Type | Labels | Majority (95% LB) | Entropy | Mean conf | Sample TV | Top factor | MI/H | Flags |
46
+ |---|---|---|---|---|---|---|---|---|---|
47
+ | `disposition` | choice | 4 | investigate 73% (64%) | 0.85 | 0.42 | 0.21 | rule | 0.368 | ok |
48
+ | `true_positive` | noul | 2 | true 71% (61%) | 0.60 | 0.37 | 0.13 | rule | 0.231 | ok |
49
+ | `credential_compromise` | noul | 2 | true 54% (44%) | 0.69 | 0.31 | 0.14 | rule | 0.175 | ok |
50
+ | `severity` | score | 5 | 3 49% (39%) | 1.22 | 0.49 | 0.22 | rule | 0.177 | ok |
51
+ | `urgency` | score | 4 | 3 49% (39%) | 1.07 | 0.43 | 0.23 | rule | 0.209 | ok |
52
+
53
+ **0 flag(s) raised.**
54
+
55
+ `MI/H` is the mutual information between the gold label and the most informative sampled latent factor, divided by the label's entropy: the fraction of the label's uncertainty explained by a single known input factor. It is a lower bound on learnability, since a model sees the whole state and not just one factor. A value near zero is the v1 failure -- gold independent of the input.
README.md ADDED
@@ -0,0 +1,212 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ pretty_name: Typed Decisions
6
+ size_categories:
7
+ - n<1K
8
+ task_categories:
9
+ - text-classification
10
+ tags:
11
+ - structured-decisions
12
+ - calibration
13
+ - probabilistic-classification
14
+ - system-one
15
+ - workflow-evaluation
16
+ - synthetic
17
+ configs:
18
+ - config_name: customer_service
19
+ data_files:
20
+ - split: train
21
+ path: customer_service/train-*.parquet
22
+ - split: validation
23
+ path: customer_service/validation-*.parquet
24
+ - split: test
25
+ path: customer_service/test-*.parquet
26
+ - config_name: security_incidents
27
+ data_files:
28
+ - split: train
29
+ path: security_incidents/train-*.parquet
30
+ - split: validation
31
+ path: security_incidents/validation-*.parquet
32
+ - split: test
33
+ path: security_incidents/test-*.parquet
34
+ - config_name: invoice_processing
35
+ data_files:
36
+ - split: train
37
+ path: invoice_processing/train-*.parquet
38
+ - split: validation
39
+ path: invoice_processing/validation-*.parquet
40
+ - split: test
41
+ path: invoice_processing/test-*.parquet
42
+ - config_name: agent_trace_observability
43
+ data_files:
44
+ - split: train
45
+ path: agent_trace_observability/train-*.parquet
46
+ - split: validation
47
+ path: agent_trace_observability/validation-*.parquet
48
+ - split: test
49
+ path: agent_trace_observability/test-*.parquet
50
+ - config_name: all
51
+ data_files:
52
+ - split: train
53
+ path: all/train-*.parquet
54
+ - split: validation
55
+ path: all/validation-*.parquet
56
+ - split: test
57
+ path: all/test-*.parquet
58
+ ---
59
+
60
+ # Typed Decisions
61
+
62
+ A benchmark for **typed probabilistic decisions over shared state**: given one
63
+ piece of unstructured state, answer several typed questions at once, each with a
64
+ calibrated probability distribution rather than a single label.
65
+
66
+ It follows the System One decision schema used by
67
+ [TypeSafe AI](https://typesafe.ai) — three question primitives (`noul`, `choice`,
68
+ `score`) — so a row is directly replayable against any API that implements that
69
+ shape. This is an **independent** benchmark built to study the architecture; it
70
+ is not affiliated with TypeSafe, and it is not a reproduction of their Jev model.
71
+
72
+ ## What it is for
73
+
74
+ The question behind the dataset: *does decomposing a workflow into typed
75
+ probabilistic decisions — especially with a shared encoder — give a favourable
76
+ accuracy / calibration / latency trade-off compared with direct classification
77
+ or with prompting an LLM?*
78
+
79
+ Answering that needs a benchmark where several typed questions share one input,
80
+ where the answers are genuinely probabilistic, and where latency per decision is
81
+ measurable. That is what this is.
82
+
83
+ ## The three question types
84
+
85
+ | Type | Answer | Shape |
86
+ |---|---|---|
87
+ | `noul` | yes/no | a single probability that the statement is true |
88
+ | `choice` | one of N labels | a distribution over labels, plus confidence |
89
+ | `score` | an ordered rubric | a distribution over integer levels, plus an *expected* score that may fall between levels |
90
+
91
+ Every option carries a written description (`criteria`). The descriptions are
92
+ part of the input: a bare label list is a different, easier task.
93
+
94
+ ## Workflows
95
+
96
+ | Workflow | Decision | Cases |
97
+ |---|---|---|
98
+ | `customer_service` | Determine the appropriate assistant response and action from a customer thread and account state. | 100 |
99
+ | `security_incidents` | Decide whether a security alert should be closed, investigated, or contained, from alert data and machine history. | 100 |
100
+ | `invoice_processing` | Review a vendor bill against the order and delivery to determine payment, hold or rejection. | 100 |
101
+ | `agent_trace_observability` | Assess an agent run to decide whether human review is needed, and how urgent it is. | 100 |
102
+
103
+ Each case asks **5 questions over one shared state**.
104
+
105
+ ## Columns
106
+
107
+ | Column | Description |
108
+ |---|---|
109
+ | `id` | Case identifier |
110
+ | `workflow` | Which workflow the case belongs to |
111
+ | `state` | JSON. The unstructured state — the model's input |
112
+ | `questions` | JSON. The question set, with instructions and criteria |
113
+ | `gold` | JSON. Full gold answers including every probability |
114
+ | `factors` | JSON. Latent factors used to build the case. **For auditing only — not model input** |
115
+ | `label_agreement` | JSON. Per question, how much the teacher samples disagreed |
116
+ | `<question>__label` | Discrete gold answer |
117
+ | `<question>__confidence` | Gold confidence, on the System One scale |
118
+ | `<question>__probabilities` | JSON. Full gold distribution |
119
+ | `<question>__score` | Expected score (`score` questions) |
120
+ | `<question>__probability_true` | Probability of yes (`noul` questions) |
121
+
122
+ `state` and `questions` together are exactly the body of a `POST /v1/systemone`
123
+ request, so a row can be replayed without reshaping.
124
+
125
+ ## Usage
126
+
127
+ ```python
128
+ from datasets import load_dataset
129
+ import json
130
+
131
+ ds = load_dataset("codelion/typed-decisions", "customer_service", split="test")
132
+ row = ds[0]
133
+
134
+ state = json.loads(row["state"])
135
+ questions = json.loads(row["questions"])
136
+ gold = json.loads(row["gold"])
137
+
138
+ print(row["category__label"], row["category__confidence"])
139
+ print(gold["urgency"]["probabilities"]) # distribution over rubric levels
140
+ ```
141
+
142
+ Scoring should use the **full distributions**, not just the argmax: the point of
143
+ the benchmark is calibration. Report log loss, Brier score and ECE alongside
144
+ accuracy.
145
+
146
+ ## How it was built
147
+
148
+ 1. **Latent skeleton sampled.** Each case starts from independently drawn
149
+ factors (topic, tone, tenure, severity, discrepancy type, whether a
150
+ constraint was violated, …) from spaces large enough that states essentially
151
+ never repeat.
152
+ 2. **State rendered**, with free text written by a model conditioned on the
153
+ skeleton where the task is textual (customer threads, alert narratives) and
154
+ left structured where it genuinely is (invoices, agent traces).
155
+ 3. **Labelled by a teacher endpoint**, sampled 3 times per case at
156
+ temperature 0.7; the gold is the **mean of the sampled
157
+ distributions**. Averaging over distributions rather than argmax labels is
158
+ what makes the gold soft where the decision is genuinely ambiguous.
159
+ 4. **Audited before release** — see `AUDIT.md`.
160
+
161
+ ## Honest limitations
162
+
163
+ **The gold is a teacher signal, not ground truth.** It comes from a model of
164
+ roughly 4B-class capability, sampled three times and averaged. The benchmark
165
+ measures how well a system reproduces that teacher's typed decisions — the
166
+ distillation question a small decision model actually faces. It is **not** a
167
+ claim that the teacher's answers are correct, and teacher errors are present:
168
+ in the pilot it missed a duplicate invoice whose ID literally matched a prior
169
+ one.
170
+
171
+ **The states are synthetic.** They are built from sampled factors and generated
172
+ text, not drawn from real support queues, SIEMs or accounts-payable systems.
173
+ Results here describe architecture and systems behaviour, not real-world
174
+ accuracy.
175
+
176
+ **It is small.** 400 cases, 2000 typed decisions. Enough for
177
+ decision-level metrics; thin for strong per-workflow claims. The generator is
178
+ seeded and extensible, so the dataset can grow without invalidating these cases.
179
+
180
+ **Splits are dealt by case index, not stratified by label.** Assignment is
181
+ exactly balanced in size and fully reproducible, but per-split *label* balance is
182
+ whatever chance gives.
183
+
184
+ ## What the audit checks
185
+
186
+ The **v1 prototype** failed in a way nothing caught until models had been benchmarked
187
+ on it: its decisions were sampled independently of the input, so four of five
188
+ questions were pure noise, and every input string appeared in all three splits.
189
+ v2 gates on that:
190
+
191
+ - **Diversity** — distinct states, and whether any repeat.
192
+ - **Learnability** — mutual information between the gold and the known latent
193
+ factors, as a fraction of label entropy. Near zero is the v1 failure.
194
+ - **Label balance** — whether a question collapses onto one answer, tested on
195
+ the Wilson lower bound so a rare-but-real event is not condemned by a small
196
+ sample.
197
+ - **Stability** — how much the teacher samples disagreed per question.
198
+ - **Softness** — how much gold mass sits away from the argmax, since all-one-hot
199
+ gold makes calibration untestable.
200
+
201
+ Current audit: **0 flag(s)**.
202
+
203
+ ## Citation
204
+
205
+ ```bibtex
206
+ @misc{typeddecisions,
207
+ title = {Typed Decisions: a benchmark for typed probabilistic decisions over shared state},
208
+ author = {Sharma, Asankhaya},
209
+ year = {2026},
210
+ url = {https://huggingface.co/datasets/codelion/typed-decisions}
211
+ }
212
+ ```
agent_trace_observability/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8657f0565dd8b7df91c300c2423e83c358d6eef85a3cfde0d06cbd55ccca6a1d
3
+ size 33838
agent_trace_observability/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17aec045c98eda1cc48dd76300c88ba68772db86bb7efdc14528480b9cbaacec
3
+ size 58131
agent_trace_observability/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:029693f27f46e1afd0feef8aedae96095fc6a37c2d9e49c2a14e5ca24db6c1e7
3
+ size 33454
all/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9fd727b84084b72337fead6179679b10c878fde87bd35148b3bf7049a1377264
3
+ size 57848
all/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d713af9dc7e24c393ce17d523724c11d114ba8bacc9a3df4fa05ca8b97b36a5c
3
+ size 164208
all/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4082612f494392a0e1aa10066d226f4b64d4307da6519f8bf206014393068e70
3
+ size 57493
customer_service/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf63e27320f6183869ba8b61b1bb37837ae5a0aaad28e4d16391dad8d27d95e6
3
+ size 45545
customer_service/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa2f6eba9ee6c121a48e5a662f1e1a82c5aa9fe8cfae1d8c16a0c8cd3b35c083
3
+ size 89774
customer_service/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1231df615d84efd588a15310f30a7f3c5143ae517fe750c661649d36307201d
3
+ size 44516
invoice_processing/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06ebe11dd258de57198a3ebd234b274a8acbaeff9b8868b8a1dcf5987d53568c
3
+ size 35725
invoice_processing/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd9a62ae2f5622ee707f4a9c0e526a518cdc508ebd2867d40db68a0f737abedf
3
+ size 64073
invoice_processing/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:992fc8e6244c3b867b68410a629e80b464d2696e65c25f625645c5af9dd9caf6
3
+ size 35538
security_incidents/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b23dfd868ca75214f24bf6a16a0022e10f7214dd7fb882049af4e6cd6dd4c0bf
3
+ size 37141
security_incidents/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ffaeeafc23053ae896ed575b04d570751305938c38b101a44bc557b8ac6e6a89
3
+ size 69884
security_incidents/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f45915cd05e65c5b63467d034fdc72b692faf4df8de971b4cb6a75de0fa344fb
3
+ size 37736