Datasets:
File size: 8,966 Bytes
808d247 1a92a8d 808d247 14668c2 808d247 14668c2 808d247 14668c2 808d247 1a92a8d 016e3a3 69d034a 1a92a8d 42244d2 016e3a3 1a92a8d | 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 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | ---
license: mit
pretty_name: Cosimo CFA/FRM Synthetic Reasoning Dataset
language:
- en
task_categories:
- question-answering
- text-generation
tags:
- finance
- cfa
- frm
- synthetic
- reasoning
- chain-of-thought
- dpo
- orpo
- preference-optimization
- exam
size_categories:
- 10K<n<100K
dataset_info:
- config_name: default
features:
- name: id
dtype: string
- name: program
dtype: string
- name: topic
dtype: string
- name: subtopic
dtype: string
- name: difficulty
dtype: string
- name: question_type
dtype: string
- name: question
dtype: string
- name: answer
dtype: string
- name: distractors
list: string
- name: reasoning_trace
dtype: string
- name: verified
dtype: bool
- name: verification
struct:
- name: answer_matches_recomputation
dtype: bool
- name: flawed_answer_concrete
dtype: string
- name: method
dtype: string
- name: recomputed
dtype: bool
- name: seed
dtype: int64
- name: template
dtype: string
- name: metadata
struct:
- name: difficulty
dtype: string
- name: generator
dtype: string
- name: generator_version
dtype: string
- name: pitfalls_addressed
list: string
- name: question_type
dtype: string
- name: seed
dtype: int64
- name: source
dtype: string
- name: subtopic
dtype: string
- name: topic
dtype: string
- name: preference_pair
struct:
- name: chosen
struct:
- name: answer
dtype: string
- name: reasoning_trace
dtype: string
- name: pitfall
dtype: string
- name: rejected
struct:
- name: answer
dtype: string
- name: reasoning_trace
dtype: string
splits:
- name: cfa_level_i
num_bytes: 33862988
num_examples: 33000
- name: cfa_level_ii
num_bytes: 11679506
num_examples: 12000
- name: cfa_level_iii
num_bytes: 8906918
num_examples: 9000
- name: frm_part_1
num_bytes: 8894989
num_examples: 10000
- name: frm_part_2
num_bytes: 6619198
num_examples: 7000
download_size: 9642224
dataset_size: 69963599
- config_name: preference_pairs
features:
- name: id
dtype: string
- name: program
dtype: string
- name: topic
dtype: string
- name: subtopic
dtype: string
- name: difficulty
dtype: string
- name: question_type
dtype: string
- name: prompt
dtype: string
- name: chosen
struct:
- name: answer
dtype: string
- name: reasoning_trace
dtype: string
- name: rejected
struct:
- name: answer
dtype: string
- name: reasoning_trace
dtype: string
- name: pitfall
dtype: string
- name: answer
dtype: string
splits:
- name: train
num_bytes: 18935143
num_examples: 24711
download_size: 2898321
dataset_size: 18935143
configs:
- config_name: default
data_files:
- split: cfa_level_i
path: data/cfa_level_i-*
- split: cfa_level_ii
path: data/cfa_level_ii-*
- split: cfa_level_iii
path: data/cfa_level_iii-*
- split: frm_part_1
path: data/frm_part_1-*
- split: frm_part_2
path: data/frm_part_2-*
- config_name: preference_pairs
data_files:
- split: train
path: preference_pairs/train-*
---
# Cosimo: Synthetic CFA/FRM Financial Reasoning Dataset
Cosimo is a **synthetic, code-verified** financial-exam question dataset for
training reasoning models and preference-tuned (DPO/ORPO) models. It contains
**71,000** original, numerically-grounded questions spanning the CFA Level I–III
and FRM Part 1/2 curricula, each with a step-by-step chain-of-thought reasoning
trace.
Every numerical answer is **computed by reference code, never sampled from a
language model**. Reasoning traces are *derived from* the computed
intermediates, so they are numerically consistent by construction. About 35% of
records additionally carry a **preference pair** — a verified strong trace
(`chosen`) versus a flawed trace committing exactly one targeted pitfall error
(`rejected`) — ready for DPO/ORPO training.
This dataset was built for
[**Cosimo**](https://github.com/btech-software/cosimo), a project fine-tuning a
compact model (Phi-4-mini-flash, 3.8B) into a financial-reasoning specialist
using [Unsloth](https://github.com/unslothai/unsloth).
## Composition
| Program | Records | Split name |
|---|---|---|
| CFA Level I | 33,000 | `cfa_level_i` |
| CFA Level II | 12,000 | `cfa_level_ii` |
| CFA Level III | 9,000 | `cfa_level_iii` |
| FRM Part 1 | 10,000 | `frm_part_1` |
| FRM Part 2 | 7,000 | `frm_part_2` |
| **Total** | **71,000** | |
Coverage spans 59 topic × subtopic cells across quantitative methods, fixed
income, derivatives, equity valuation, portfolio management, market/credit/
operational/liquidity risk, economics, FSA, ethics-adjacent performance topics,
and more. Question types: `Calculation`, `Vignette`, `Constructed Response`,
and `MCQ`. Difficulty tiers follow the program level (e.g. `L1_Easy` …
`L3_Hard`, `FRM1_*`, `FRM2_*`).
## Configs
### `default` — full records, one split per program
```python
from datasets import load_dataset
ds = load_dataset("btech-software/cosimo-cfa-frm-71k", "default")
ds["cfa_level_i"][0]
```
Each record:
| Field | Description |
|---|---|
| `id` | `cosimo_<program>_<seq>_<sha>` — content hash of question + verified answer |
| `program` | `CFA_Level_I` … `FRM_Part_2` |
| `topic` / `subtopic` | curriculum taxonomy cell |
| `difficulty` | tiered difficulty label |
| `question_type` | `Calculation`, `Vignette`, `Constructed Response`, `MCQ` |
| `question` | original question text |
| `answer` | correct answer (computed) |
| `distractors` | plausible wrong options (empty for constructed-response) |
| `reasoning_trace` | step-by-step CoT with formulas and explicit assumptions |
| `verified` | `true` — only verified records are shipped |
| `verification` | method, template, seed, recomputation flags |
| `metadata` | pitfalls addressed, generator name/version, seed |
| `preference_pair` | `chosen`/`rejected` traces + `pitfall` (null on ~65% of rows) |
### `preference_pairs` — flattened DPO/ORPO rows
24,711 rows with `prompt`, `chosen` (`{answer, reasoning_trace}`), `rejected`
(`{answer, reasoning_trace}`), and the named `pitfall` the rejected trace
commits (e.g. *"geometric vs arithmetic"*, *"annuity due vs ordinary"*, *"sign
flip"*). The rejected answer is guaranteed numerically different from the
correct answer.
```python
prefs = load_dataset("btech-software/cosimo-cfa-frm-71k", "preference_pairs")
def to_dpo(row):
return {
"prompt": row["prompt"],
"chosen": row["chosen"]["reasoning_trace"],
"rejected": row["rejected"]["reasoning_trace"],
}
dpo = prefs["train"].map(to_dpo, remove_columns=prefs["train"].column_names)
```
## Integrity guarantees
The full corpus passes a 4-axis verification gate (100% on all axes at release):
1. **Answers are computed, not guessed.** Every template computes its result
numerically; the verification gate re-runs the template from the stored seed
and compares the recomputed answer to the persisted one.
2. **Traces are derived from computed numbers.** Trace text references the
already-computed intermediates and is byte-identical under deterministic
recomputation.
3. **Concrete preference pairs.** Every `rejected` answer is verified to differ
numerically from the correct answer.
4. **Clean distractors.** No distractor numerically equals the correct answer.
Generation is deterministic per `(program, template, variant)` with
content-hashed IDs, so every record is independently reproducible from its
stored seed.
## Limitations
- **Structural novelty is bounded by 71 distinct question stems** (templates);
within a stem, records differ in sampled numbers, entities, and phrasing.
Deduplicate by `metadata.generator` if you need stem-level splits.
- Content is synthetic exam-*style* material aligned to public learning
objectives; it is not a substitute for official curriculum or mock exams.
- English only.
## Provenance and trademarks
All questions are **original synthetic content** generated from independently
written templates inspired only by publicly available learning outcome
statements. **No proprietary CFA Institute or GARP exam items were used.**
CFA® is a registered trademark of CFA Institute; FRM® is a registered
trademark of the Global Association of Risk Professionals (GARP). This dataset
is not affiliated with, endorsed by, or sponsored by CFA Institute or GARP.
## License
MIT. Attribution appreciated:
```bibtex
@misc{cosimo2026,
title = {Cosimo Financial Dataset: A Synthetic, Code-Verified CFA/FRM Financial Reasoning Dataset},
author = {Sant'Anna, Bruno},
year = {2026},
url = {https://huggingface.co/datasets/btech-software/cosimo-cfa-frm-71k}
}
```
|