Download README.md from Samurai007AK/ChapterEnd: direct link, hf CLI and curl.
- Browser
- Download file 9.28 kB
-
https://huggingface.co/datasets/Samurai007AK/ChapterEnd/resolve/main/README.md
- Command line
-
hf download hf://datasets/Samurai007AK/ChapterEnd/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Samurai007AK/ChapterEnd/resolve/main/README.md
license: cc-by-nc-sa-4.0
language:
- en
task_categories:
- text-retrieval
- question-answering
pretty_name: ChapterEnd
size_categories:
- 1K<n<10K
tags:
- retrieval
- rag
- benchmark
- evaluation
- textbooks
- openstax
- synthetic-vs-human
configs:
- config_name: human
default: true
data_files:
- split: test
path: human.jsonl
- config_name: generated
data_files:
- split: test
path: generated.jsonl
- config_name: corpus
data_files:
- split: corpus
path: corpus.jsonl
ChapterEnd
Real end-of-chapter questions from six open textbooks, side by side with LLM-written questions about the same sections.
I built it to answer one question: do retrieval scores measured on generated questions hold up on questions that people wrote? In my tests they don't. The same BM25 gets 91.7% Recall@1 on the generated questions here and 54.6% on the human ones.
Why this exists
I was reproducing STAIR, a paper from IBM Research that finds the right section of a book by reading its table of contents. Its benchmark, SearchTome, is made of questions written by an LLM, which is how most document benchmarks are built now. I wanted to see what happens with questions written by humans and couldn't find a test set for it.
OpenStax textbooks turned out to be a good source. Every chapter ends with review questions written by the book's authors, grouped by the section they belong to, so the correct answer comes with the question.
What the two kinds look like
Three sections, with one question of each kind:
| Section | Written by the textbook authors | Written by an LLM |
|---|---|---|
| Sleep and Why We Sleep | How could researchers determine if given areas of the brain are involved in the regulation of sleep? | What does comparative research indicate about the relationship between predatory risk and the amount of deep sleep in different species? |
| Overview of Photosynthesis | What two products result from photosynthesis? | What process provides the majority of energy for living organisms on Earth? |
| How To Organize Economies | What are the three ways that societies can organize themselves economically? | How does the scarcity of resources affect the media's decision to send reporters to cover an event? |
The LLM was shown one paragraph at a time, so its questions follow that paragraph closely. The authors ask about the section as a whole, often in words the text doesn't use.
The numbers
| Human | Generated | |
|---|---|---|
| Questions | 3,568 | 2,604 |
| Sections they point to | 492 (shared) | 492 (shared) |
| BM25 Recall@1 | 54.6% | 91.7% |
| BM25 Recall@5 | 82.7% | 98.6% |
Load it
from datasets import load_dataset
human = load_dataset("Samurai007AK/ChapterEnd", "human", split="test")
generated = load_dataset("Samurai007AK/ChapterEnd", "generated", split="test")
corpus = load_dataset("Samurai007AK/ChapterEnd", "corpus", split="corpus")
The task
You get a question and the book it comes from. Rank that book's sections so the one that answers the question is first. A section is an OpenStax lesson module, for example "2.1 Describe the Income Statement, Statement of Owner's Equity, Balance Sheet, and Statement of Cash Flows". Books have between 32 and 142 sections, so guessing at random gets 1 to 3% Recall@1.
The books are different from SearchTome's, so scores here can't be compared with scores there.
What's inside
| File | Rows | |
|---|---|---|
corpus.jsonl |
492 | one section per row |
human.jsonl |
3,568 | questions written by the textbook authors |
generated.jsonl |
2,604 | questions written by Mistral-7B-Instruct-v0.2 |
score.py |
Recall@1 and Recall@5 for a run file | |
bm25_baseline.py |
the BM25 baseline, also a template for a run file |
corpus.jsonl: module_id (the OpenStax page id), book, path (chapter and section title) and paragraphs (the section text as a list).
human.jsonl: qid, book, question (as printed), question_no_lo and lo_tagged (explained below), page_type (which end-of-chapter page it came from, such as "Review Questions") and gold (the module_id of the correct section).
generated.jsonl: qid, book, question, gold, and gold_paragraph (which paragraph of that section the question was written from).
| Book | Sections | Human | Generated |
|---|---|---|---|
| Principles of Economics 3e | 142 | 1,060 | 356 |
| Psychology 2e | 88 | 571 | 404 |
| Principles of Accounting, Volume 1 | 84 | 777 | 417 |
| Concepts of Biology | 82 | 351 | 517 |
| Principles of Accounting, Volume 2 | 64 | 665 | 440 |
| Business Law I Essentials 2e | 32 | 144 | 470 |
Scoring your own method
Write a JSONL file with one line per question, best section first. Only rank sections from the question's own book.
{"qid": "h0000", "ranking": ["046014ef-296a-4ef2-ae9d-8e58aec02bf3", "..."]}
python score.py human.jsonl my_run.jsonl
python score.py generated.jsonl my_run.jsonl
To reproduce the BM25 numbers, run pip install rank_bm25 numpy and then python bm25_baseline.py.
Two things that fooled me
My first results on the human questions were wrong twice, for reasons worth knowing if you build something similar.
The first time, every method scored far lower than made sense. The end-of-chapter pages themselves ("Review Questions", "Key Terms", "Summary") were in my corpus, and they contain the questions word for word, so every retriever found the page that quotes the question. BM25 did this for 442 of 450 questions I sampled. The corpus here contains lesson sections only.
The second time, one method looked suspiciously good on accounting. 1,441 accounting questions start with a learning-objective tag like "LO 2.1", and that number is the number of the correct section 99.3% of the time. A model that reads the table of contents can match the digits and skip the question. question_no_lo has the tag removed and lo_tagged marks those questions, and score.py reports tagged and untagged questions separately.
Baselines
Recall@1 on the human questions. BM25 and the dense retriever score paragraphs, and a section gets the score of its best paragraph. The re-rankers re-order the retrieved candidates.
| Method | All | LO-tagged | Untagged |
|---|---|---|---|
| Dense retrieval, bge-base-en-v1.5 | 62.2 | 52.2 | 69.0 |
| bge-reranker-v2-m3, zero-shot | 58.2 | 44.9 | 67.2 |
| BM25 | 54.6 | 45.6 | 60.7 |
| bge-reranker-base, zero-shot | 53.0 | 40.6 | 61.4 |
| bge-reranker-base, fine-tuned on generated questions | 44.3 | 25.8 | 56.8 |
The last row surprised me most. Fine-tuning the re-ranker on generated questions improved it on generated questions and made it worse on human ones, from 53.0 to 44.3.
How it was built
Text and human questions come from the OpenStax archive API. On each end-of-chapter page the questions are grouped by lesson section, in order, so a question's correct section is the matching section of its chapter. Where the number of groups didn't match the number of sections I skipped the page (149 of 450). I dropped questions shorter than 25 characters and exact duplicates within a book.
For the generated set, Mistral-7B-Instruct-v0.2 wrote three questions per paragraph for a random sample of paragraphs from these books. The correct section is the one containing the paragraph. This file is the held-out test part of that set.
What it can't tell you
- It covers six books in English. I tried twelve more OpenStax books and left them out because their end-of-chapter pages didn't line up with their sections.
- The correct section is the one the book files the question under. Sometimes another section answers it too, so Recall@1 is a little harsh on every method.
- Some human questions aren't search queries. A few point at a figure or table and some ask for an opinion. I kept them as printed.
- The generated questions come from one model and one prompt. Another question writer may give a smaller or larger gap.
License and credit
All text and questions come from OpenStax textbooks (Rice University), licensed CC BY-NC-SA 4.0. This dataset carries the same license: credit OpenStax, no commercial use, share changes under the same terms. The two scripts are MIT. OpenStax did not create or endorse this dataset.
Books: Principles of Accounting, Volume 1 · Volume 2 · Business Law I Essentials 2e · Concepts of Biology · Principles of Economics 3e · Psychology 2e
Citation
@misc{konar2026chapterend,
author = {Arijit Konar},
title = {ChapterEnd: human-written textbook questions for section retrieval},
year = {2026},
url = {https://huggingface.co/datasets/Samurai007AK/ChapterEnd}
}