Datasets:
Modalities:
Text
Formats:
parquet
Languages:
English
Size:
100K - 1M
ArXiv:
Tags:
multi-hop-question-answering
hotpotqa
evidence-selection
question-decomposition
chain-of-thought
supervised-fine-tuning
License:
File size: 14,637 Bytes
93a180e 7f3a1d4 93a180e 7f3a1d4 93a180e 7f3a1d4 93a180e 7f3a1d4 93a180e 43d0573 499f1c2 43d0573 93a180e 7f3a1d4 93a180e 7f3a1d4 93a180e 499f1c2 7f3a1d4 93a180e 7f3a1d4 93a180e 7f3a1d4 43d0573 7f3a1d4 ca40870 7f3a1d4 43d0573 7f3a1d4 43d0573 7f3a1d4 43d0573 7f3a1d4 43d0573 7f3a1d4 43d0573 7f3a1d4 93a180e 7f3a1d4 | 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 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | ---
language:
- en
license: cc-by-sa-4.0
pretty_name: Bactrainus HotpotQA Training Suite
task_categories:
- question-answering
- text-generation
tags:
- multi-hop-question-answering
- hotpotqa
- evidence-selection
- question-decomposition
- chain-of-thought
- supervised-fine-tuning
- bactrainus
size_categories:
- 100K<n<1M
arxiv: "2501.06286"
configs:
- config_name: structured
data_files:
- split: train
path: data/structured/train-*.parquet
- config_name: reader-sft
data_files:
- split: train
path: data/reader-sft/train-*.parquet
- config_name: cot-reader-sft
data_files:
- split: train
path: data/cot-reader-sft/train-*.parquet
- config_name: paragraph-selector-sft
data_files:
- split: train
path: data/paragraph-selector-sft/train-*.parquet
- config_name: question-decomposer-sft
data_files:
- split: train
path: data/question-decomposer-sft/train-*.parquet
- config_name: sentence-selector-sft
data_files:
- split: train
path: data/sentence-selector-sft/train-*.parquet
- config_name: decomposed-sentence-selector-sft
data_files:
- split: train
path: data/decomposed-sentence-selector-sft/train-*.parquet
- config_name: joint-selector-reader-sft
data_files:
- split: train
path: data/joint-selector-reader-sft/train-*.parquet
---
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; border: 1px solid #cbd5e1; border-radius: 16px; overflow: hidden; background: #ffffff; margin-bottom: 28px;">
<div style="background: linear-gradient(135deg, #1f4e79 0%, #12263a 100%); padding: 26px; color: white;">
<div style="display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;">
<h1 style="margin: 0; font-size: 28px; font-weight: 800; color: white; border: none;">Bactrainus HotpotQA Training Suite</h1>
<span style="background: #0f766e; color: white; font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 20px; letter-spacing: 0.5px;">COMPLETE RELEASE</span>
</div>
<p style="margin: 9px 0 0 0; font-size: 15px; color: #dbeafe; font-weight: 500;">One canonical HotpotQA source, eight clean and ID-aligned training views.</p>
</div>
<div style="display: flex; gap: 8px; flex-wrap: wrap; padding: 13px 24px; background: #f8fafc; border-bottom: 1px solid #e2e8f0;">
<span style="background: #dbeafe; color: #1e40af; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; border: 1px solid #bfdbfe;">90,447 SOURCE IDs</span>
<span style="background: #ccfbf1; color: #115e59; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; border: 1px solid #99f6e4;">8 CONFIGURATIONS</span>
<span style="background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; border: 1px solid #fde68a;">SFT READY</span>
<span style="background: #ede9fe; color: #5b21b6; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; border: 1px solid #ddd6fe;">ID-ALIGNED</span>
<span style="background: #dcfce7; color: #166534; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; border: 1px solid #bbf7d0;">CC BY-SA 4.0</span>
</div>
<div style="padding: 22px 24px; color: #334155; line-height: 1.65; font-size: 14px;">
<p style="margin: 0;">The Bactrainus training suite turns the complete <strong>90,447-example</strong> HotpotQA <code>distractor/train</code> split into a canonical structured dataset and seven ready-to-train chat-formatted SFT configurations. Every row keeps the official HotpotQA identifier as <code>source_id</code>, so the same example can be followed across paragraph selection, decomposition, sentence selection, evidence-grounded reasoning, and answer generation without relying on row order.</p>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 18px;">
<div style="border: 1px solid #bfdbfe; border-radius: 9px; background: #eff6ff; padding: 13px;">
<strong style="display: block; color: #1f4e79; margin-bottom: 4px;">Traceable provenance</strong>
<span style="font-size: 13px;">Pinned upstream revision, machine-readable source manifest, and reviewed annotation patches.</span>
</div>
<div style="border: 1px solid #99f6e4; border-radius: 9px; background: #f0fdfa; padding: 13px;">
<strong style="display: block; color: #115e59; margin-bottom: 4px;">Complete modular coverage</strong>
<span style="font-size: 13px;">Reader, CoT, paragraph selector, decomposer, sentence selector, and joint SFT data.</span>
</div>
<div style="border: 1px solid #fde68a; border-radius: 9px; background: #fffbeb; padding: 13px;">
<strong style="display: block; color: #92400e; margin-bottom: 4px;">Strict integrity checks</strong>
<span style="font-size: 13px;">Schema, evidence bounds, task labels, row counts, ID equality, and 80 shard checksums.</span>
</div>
</div>
</div>
</div>
<p align="center">
<img src="assets/data.png" alt="Bactrainus HotpotQA training-data artwork" width="507">
</p>
## At a glance
| Property | Value |
|---|---|
| Upstream dataset | [`hotpotqa/hotpot_qa`](https://huggingface.co/datasets/hotpotqa/hotpot_qa) |
| Upstream revision | `1908d6afbbead072334abe2965f91bd2709910ab` |
| Upstream configuration | `distractor` |
| Published split | `train` |
| Source examples | 90,447 |
| Candidate paragraphs | 2-10 as supplied upstream; 89,609 examples contain 10 |
| Dataset configurations | 8 |
| Identity key | `source_id` |
| Storage | Sharded Parquet with Zstandard compression |
| License | CC BY-SA 4.0 |
### How the data follows the Bactrainus pipeline
The eight configurations expose the same evidence flow in progressively more specialized training views. The structured records preserve the question, all supplied candidate paragraphs, answer, and supporting facts. The SFT views then supervise paragraph selection, optional question decomposition, sentence-level evidence selection, and answer generation, either as separate modules or as a joint selector-reader task. Every view retains the same `source_id`, so examples can be joined without relying on row position.
<p align="center">
<img src="architecture.svg" alt="Bactrainus modular architecture" width="900">
</p>
<p align="center"><em>Canonical records are transformed into task-specific conversations while preserving a shared source identity across the modular pipeline.</em></p>
## Load the data
```python
from datasets import load_dataset
dataset = load_dataset(
"bactrianus/bactrainus-hotpotqa",
"cot-reader-sft",
split="train",
revision="v1.0.0",
)
print(dataset.num_rows) # 90447
print(dataset[0]["source_id"])
print(dataset[0]["messages"])
```
For a reproducible experiment, pin the immutable release tag:
```python
dataset = load_dataset(
"bactrianus/bactrainus-hotpotqa",
"structured",
split="train",
revision="v1.0.0",
)
```
## Configurations
Each configuration contains exactly 90,447 unique `source_id` values.
| Configuration | What the model sees | Training target |
|---|---|---|
| `structured` | Canonical question and the complete candidate set | Answer, paragraph titles, and supporting facts as typed fields |
| `reader-sft` | Question and gold supporting sentences | Final short answer |
| `cot-reader-sft` | Question and gold supporting sentences | Ordered evidence trace followed by the answer |
| `paragraph-selector-sft` | Question and the complete candidate set | Minimal supporting paragraph titles |
| `question-decomposer-sft` | Question and selected supporting paragraphs | Ordered, paragraph-grounded sub-questions |
| `sentence-selector-sft` | Question and selected supporting paragraphs | Supporting title/index pairs |
| `decomposed-sentence-selector-sft` | Question, sub-questions, and selected paragraphs | Supporting title/index pairs |
| `joint-selector-reader-sft` | Question and the complete candidate set | Supporting title/index pairs and final answer |
The seven SFT views are deterministic transformations of `structured`. The CoT
view is a traceable **evidence trace**: each step copies an annotated supporting
sentence and records its exact title and zero-based sentence index. The
decomposition view is generated from the
paragraphs available after paragraph selection and is therefore complete,
stable, and reproducible.
## Record formats
### Canonical `structured` record
```json
{
"source_id": "official-hotpotqa-id",
"question": "...",
"answer": "...",
"question_type": "bridge",
"difficulty": "hard",
"candidate_paragraphs": [
{"title": "...", "sentences": ["...", "..."]}
],
"supporting_facts": [
{"title": "...", "sentence_index": 1}
],
"gold_paragraph_titles": ["..."]
}
```
The candidate paragraphs preserve upstream count and order. Every supporting title
must resolve to one of those paragraphs and every sentence index is checked
against the corresponding sentence list.
### SFT record
```json
{
"source_id": "official-hotpotqa-id",
"task": "cot_reader",
"messages": [
{"role": "system", "content": "..."},
{"role": "user", "content": "..."},
{"role": "assistant", "content": "...training target..."}
]
}
```
The data stores framework-neutral chat turns. Apply the native chat template of
the chosen base model during tokenization; no tokenizer-specific control tokens
are embedded in the Parquet files.
### CoT target shape
```text
rationale:
1. [Paragraph title, sentence 0] Exact annotated evidence sentence.
2. [Second title, sentence 2] Exact annotated evidence sentence.
answer: ***FINAL ANSWER***
```
### Decomposition target shape
```text
sub-questions:
1. What information in "First paragraph" is needed to answer the original question?
2. How does the relevant information in "Second paragraph" combine with the previous evidence to determine the answer?
```
## How the suite is built
The release builder downloads the immutable upstream revision by default,
normalizes the Hugging Face feature layout, constructs every view from the same
typed record, writes Parquet shards in a private staging directory, and installs
them only after strict validation succeeds.
```bash
git clone https://github.com/Iman998/bactrainus.git
cd bactrainus
python -m pip install -e ".[data]"
# From the dataset-package directory:
python scripts/build_release.py --root .
python scripts/validate_release.py --root .
```
A complete official JSON or JSONL export can also be used:
```bash
python scripts/build_release.py hotpot_train_v1.1.json --root .
```
`SOURCE_MANIFEST.json` records the upstream repository, immutable revision,
configuration, split, row count, identity key, and published configurations.
`CHECKSUMS.sha256` records every Parquet shard digest.
The pinned upstream split contains 22 supporting-fact entries whose sentence
indices are outside their annotated paragraphs. `SOURCE_PATCHES.json` records
each affected `source_id`, original index, action, and replacement when needed.
This reviewed repair covers 0.010% of supporting-fact entries, retains all
90,447 questions, and is applied before any SFT view is constructed.
## Integrity guarantees
The validator enforces:
- exactly 90,447 rows and 90,447 unique IDs in every configuration;
- identical `source_id` sets across all eight configurations;
- the exact upstream two-to-ten paragraph distribution, including 89,609 ten-paragraph records;
- valid evidence titles and zero-based sentence bounds;
- exact task identifiers and ordered `system` / `user` / `assistant` messages;
- the documented 17,972 easy, 56,814 medium, and 15,661 hard examples; and
- SHA-256 coverage for every published Parquet shard.
No development examples, model predictions, score tables, notebooks,
credentials, or checkpoints are bundled with the training suite.
## Recommended use
Use `structured` when designing a new task representation or auditing evidence.
Use an SFT configuration when training the corresponding modular component.
The IDs make it straightforward to combine configurations without fuzzy joins:
```python
reader = load_dataset(
"bactrianus/bactrainus-hotpotqa",
"reader-sft",
split="train",
revision="v1.0.0",
)
decomposer = load_dataset(
"bactrianus/bactrainus-hotpotqa",
"question-decomposer-sft",
split="train",
revision="v1.0.0",
)
assert set(reader["source_id"]) == set(decomposer["source_id"])
```
This repository is training data, not an independent held-out benchmark. Follow
the official HotpotQA protocol for benchmark reporting and disclose preprocessing,
prompt, retrieval, and answer-normalization choices.
## Limitations
- The suite inherits factual, coverage, annotation, and social biases from
Wikipedia and HotpotQA.
- The distractor setting supplies a bounded candidate set and does not measure
open-corpus retrieval.
- Supporting facts are dataset annotations and may not exhaust every relevant
sentence.
- Gold-grounded CoT and decomposition targets favor traceability and
reproducibility over stylistic diversity.
- Prompt wording is one clean task formulation and may need adaptation for a
different model family.
## License and attribution
This dataset is released under
[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/), consistent with
the upstream HotpotQA license. Redistributions and adaptations must preserve
attribution and use a compatible ShareAlike license. See
[`ATTRIBUTION.md`](ATTRIBUTION.md) for the complete attribution statement.
## Citation
If you use this training suite, cite the Bactrainus article. Retain the
upstream HotpotQA attribution described in [`ATTRIBUTION.md`](ATTRIBUTION.md)
when redistributing or adapting the data.
```bibtex
@article{barati2025bactrainus,
title = {Bactrainus: Optimizing Large Language Models for Multi-hop Complex Question Answering Tasks},
author = {Barati, Iman and Ghafouri, Arash and Minaei-Bidgoli, Behrouz},
journal = {arXiv preprint arXiv:2501.06286},
year = {2025},
url = {https://arxiv.org/abs/2501.06286}
}
```
## Links
- Models: <https://huggingface.co/bactrianus>
- Clean code: <https://github.com/Iman998/bactrainus>
- Article archive: <https://arxiv.org/abs/2501.06286>
For the full method, experiments, and interpretation, read the
[Bactrainus article on arXiv](https://arxiv.org/abs/2501.06286).
|