bactrainus-hotpotqa / README.md
Iman998's picture
Pin the immutable release revision in the dataset card
f5a70de verified
|
Raw
History Blame Contribute Delete
14 kB
metadata
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

Bactrainus HotpotQA Training Suite

COMPLETE RELEASE

One canonical HotpotQA source, eight clean and ID-aligned training views.

90,447 SOURCE IDs 8 CONFIGURATIONS SFT READY ID-ALIGNED CC BY-SA 4.0

The Bactrainus training suite turns the complete 90,447-example HotpotQA distractor/train split into a canonical structured dataset and seven ready-to-train chat-formatted SFT configurations. Every row keeps the official HotpotQA identifier as source_id, so the same example can be followed across paragraph selection, decomposition, sentence selection, evidence-grounded reasoning, and answer generation without relying on row order.

Traceable provenance Pinned upstream revision, machine-readable source manifest, and reviewed annotation patches.
Complete modular coverage Reader, CoT, paragraph selector, decomposer, sentence selector, and joint SFT data.
Strict integrity checks Schema, evidence bounds, task labels, row counts, ID equality, and 80 shard checksums.

Bactrainus modular architecture

At a glance

Property Value
Upstream dataset 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

Load the data

from datasets import load_dataset

dataset = load_dataset(
    "bactrianus/bactrainus-hotpotqa",
    "cot-reader-sft",
    split="train",
)

print(dataset.num_rows)          # 90447
print(dataset[0]["source_id"])
print(dataset[0]["messages"])

For a reproducible experiment, pin the dataset commit:

dataset = load_dataset(
    "bactrianus/bactrainus-hotpotqa",
    "structured",
    split="train",
    revision="7f3a1d4d21f22aad7262d8ffd6520f31186b284d",
)

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

{
  "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

{
  "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

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

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.

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:

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:

reader = load_dataset(
    "bactrianus/bactrainus-hotpotqa", "reader-sft", split="train"
)
decomposer = load_dataset(
    "bactrianus/bactrainus-hotpotqa", "question-decomposer-sft", split="train"
)

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, consistent with the upstream HotpotQA license. Redistributions and adaptations must preserve attribution and use a compatible ShareAlike license. See ATTRIBUTION.md for the complete attribution statement.

Citation

If you use this training suite, cite both Bactrainus and HotpotQA:

@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}
}

@inproceedings{yang2018hotpotqa,
  title     = {{HotpotQA}: A Dataset for Diverse, Explainable Multi-hop Question Answering},
  author    = {Yang, Zhilin and Qi, Peng and Zhang, Saizheng and Bengio, Yoshua and Cohen, William W. and Salakhutdinov, Ruslan and Manning, Christopher D.},
  booktitle = {Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing},
  year      = {2018},
  pages     = {2369--2380},
  doi       = {10.18653/v1/D18-1259}
}

Links

For the full method, experiments, and interpretation, read the Bactrainus article on arXiv.