File size: 4,597 Bytes
684534f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
eed5cdb
 
 
4075b8e
eed5cdb
684534f
 
 
4075b8e
 
684534f
 
 
 
 
 
 
 
eed5cdb
 
 
 
 
684534f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4075b8e
684534f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: cc-by-nc-sa-4.0
pretty_name: "islamlab — Islamic Sciences Training Sets"
language:
  - ar
task_categories:
  - text-generation
  - text-retrieval
  - question-answering
size_categories:
  - 1M<n<10M
tags:
  - islam
  - arabic
  - classical-arabic
  - continued-pretraining
  - retrieval
  - citation
  - rag
configs:
  - config_name: cpt
    default: true
    data_files:
    - split: train
      path: cpt/train-*.parquet
  - config_name: retrieval
    data_files:
    - split: train
      path: retrieval/train-*.parquet
  - config_name: attribution
    data_files:
    - split: train
      path: attribution/train-*.parquet
  - config_name: eval_retrieval
    data_files:
    - split: test
      path: eval_retrieval/test-*.parquet
  - config_name: eval_attribution
    data_files:
    - split: test
      path: eval_attribution/test-*.parquet
---

# islamlab — Islamic Sciences Training Sets

Training data derived from
[`islamlab/islamic-sciences`](https://huggingface.co/datasets/islamlab/islamic-sciences):
text for domain adaptation, retrieval pairs with hard negatives, and citation
questions whose answers are read out of the corpus rather than written by a
model.

> **Nothing here is generated.** Questions come from a fixed set of templates
> and every answer is a field already present in the corpus. That buys a
> narrow dataset in exchange for one that cannot teach a model a fact the
> sources do not contain.

## Subsets

| config | split | rows | what it is |
|---|---|---:|---|
| `cpt` | train | 780,149 | Apparatus-free, deduplicated text with a provenance header — 3.21B characters |
| `retrieval` | train | 906,691 | A section heading as the query, a passage from that section as the positive, and hard negatives drawn from elsewhere in the same book |
| `attribution` | train | 130,825 | Citation questions with exact answers |
| `eval_retrieval` | test | 26,933 | Same shape, held-out works only |
| `eval_attribution` | test | 32,895 | Same shape, held-out works only |

## The held-out split

The holdout is at the level of the **work**, not the row: 118 of the
4,022 works are assigned to evaluation by a hash of their identifier,
and no line of their text appears in `cpt`, `retrieval` or `attribution`. A
model trained on the train configs has therefore never read the books it is
evaluated on. The assignment is deterministic, so it is the same for everyone.

## The tasks in `attribution`

| task | question | rows (train) |
|---|---|---:|
| `author` | من مؤلف هذا النص؟ | 26,165 |
| `title` | من أي كتاب أُخذ هذا النص؟ | 26,165 |
| `science` | في أي علم يُصنَّف هذا الكتاب؟ | 26,165 |
| `century` | في أي قرن هجري توفي المؤلف؟ | 26,165 |
| `locus` | في أي جزء وصفحة يقع هذا النص؟ | 26,165 |

`messages` is a JSON-encoded chat turn — parse it with `json.loads`. `answer`
holds the exact expected string. The `locus` task deliberately includes the
honest negative: where the source records no pagination, the answer is
*لم تُثبَت الصفحة في هذه النسخة* rather than an invented page.

## Retrieval negatives

Negatives come from **the same book** as the positive, which is what makes
them hard: a chapter of al-Ḥāwī al-Kabīr is separated from another chapter of
al-Ḥāwī al-Kabīr by subject alone, not by vocabulary, register or period.
`negatives` is a JSON-encoded list of strings.

```python
import json
from datasets import load_dataset

d = load_dataset("islamlab/islamic-sciences-training", "retrieval", split="train")
row = d[0]
negatives = json.loads(row["negatives"])
```

## Where this sits

| Dataset | What it holds |
|---|---|
| [`islamlab/islamic-sciences`](https://huggingface.co/datasets/islamlab/islamic-sciences) | The corpus itself — eight sciences, 4,022 works |
| **`islamlab/islamic-sciences-training`** | The training products above |
| [`quranlab/*`](https://huggingface.co/quranlab) · [`risaleinur/*`](https://huggingface.co/risaleinur) | Qur'an and hadith; the Risale-i Nur corpus |

## License

Derived from a corpus licensed **CC BY-NC-SA 4.0**, and carries the same
terms. Credits are in
[`SOURCES.md`](https://huggingface.co/datasets/islamlab/islamic-sciences/blob/main/SOURCES.md)
on the corpus, which is where the works themselves are acknowledged.

## Citation

```bibtex
@misc{islamlab_islamic_sciences_training,
  title  = {islamlab — Islamic Sciences Training Sets},
  author = {islamlab contributors},
  year   = {2026},
  howpublished = {Hugging Face Datasets}
}
```