File size: 4,417 Bytes
667341d 9ee938c 667341d 53dbc72 | 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 | ---
license: agpl-3.0
license_name: sspl-1.0
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- split: validation
path: data/validation-*
dataset_info:
features:
- name: messages
list:
- name: role
dtype: string
- name: content
dtype: string
- name: metadata
struct:
- name: topic_path
list: string
- name: checker_score
dtype: int64
splits:
- name: train
num_bytes: 135701582
num_examples: 18098
- name: validation
num_bytes: 16079590
num_examples: 2012
download_size: 151672373
dataset_size: 151781172
---
# pythink-20k
**High-quality Python reasoning traces for training rigorous, step-by-step thinking.**
`pythink-20k` is a quality-controlled, synthetic, curated dataset of **20,000 executable Python reasoning plans**. Each example teaches a model to
break down complex problems into structured, verifiable steps using a consistent execution trace style.
This is an initial release focused on getting an initial dataset out for testing and experimentation. I expect that the quality is pretty good, but
quality is currently limited by the ability for existing models to represent thoughts as Python code.
## Why?
Current LLMs have very unstructured, undisciplined thoughts which are poorly comprehensible and often inefficient. Using a programming
language for thinking makes thoughts easier to audit, more structured, and more consistent.
Why Python?
- LLMs are excellent at Python already
- Python is more token-efficient than JSON, typescript, or other languages
## What’s in the Data?
Each example contains a full Python-based reasoning trace that:
- Uses short, action-oriented `# Next:` comments
- Performs actual modeling, calculation, validation, or simulation in code
- Stays in "plan mode" (does not output raw implementation code in other languages)
- Ends with a clean `finalAnswer`
The training data treats the **entire reasoning trace** as its response. This dataset will NOT train a model to answer the question. The whole
point is to train the model to consider **how the question should be thought about**, instead of rushing to reach a conclusion.
The outputs are generally executable Python code, meaning than many of the responses can be executed to get the real output.
### Example Format
```json
{
"messages": [
{
"role": "user",
"content": "Design a system that programmatically generates a TLS 2048-bit RSA certificate with 90-day validity..."
},
{
"role": "assistant",
"content": "# Next: validate RSA certificate requirements...\nrsaKeyBits = 2048\nvalidityDays = 90\n..."
}
],
"metadata": {
"topic_path": ["coding", "Network Servers and Daemons", "TLS/SSL Termination"],
"checker_score": 10
}
}
```
## Key Features
- **20k high-quality traces** (filtered with automated quality gate)
- Strong emphasis on **executable reasoning** rather than descriptive text
- Diverse domains: mathematics, coding, physics, philosophy, biology, and more
- Includes rich metadata (`checker_score`, topic path)
- Clean chat format ready for SFT
## Intended Use
This dataset is designed for:
- Supervised fine-tuning of reasoning models
- Training models to produce structured, verifiable reasoning traces
- Research on executable chain-of-thought and code-as-reasoning
- Building the foundation for more advanced agentic and memory-augmented systems
## Data Quality
All examples passed a multi-criteria quality filter including:
- Minimum checker score
- Presence of executable steps and validation logic
- Avoidance of target-language code leakage
- Reasonable length and structure
## Limitations
- Some traces may still contain minor stylistic inconsistencies.
- Focused on reasoning structure rather than factual correctness.
## License
AGPL-3.0
## Citation
If you use this dataset, please cite:
```bibtex
@misc{pythink-20k,
author = {NuclearManD},
title = {pythink-20k: High-Quality Python Reasoning Traces},
year = {2026},
howpublished = {\url{https://huggingface.co/datasets/NuclearManD/pythink-20k}}
}
```
## Future Releases
Planned improvements include:
- Higher quality filtering and human review
- Preference data (chosen vs rejected reasoning traces)
- Multi-turn and agentic reasoning examples
---
**Built as part of ongoing work on rigorous reasoning systems.**
|