yassineyz/MoroccoRegQA
Dataset Card for MoroccoRegQA Dataset Details Dataset Description MoroccoRegQA is an Arabic regulatory retrieval benchmark comprising 90 expert-annotated query–evidence pairs grounded in five Moroccan legal codes and a parsed corpus of 2,464 hierarchically structured articles (moroccanregdoc.json). Each query is provided in three forms — Moroccan Darija, Modern Standard Arabic (MSA), and English — and is linked to one or more gold evidence articles… See the full description on the dataset page: https://huggingface.co/datasets/yassineyz/MoroccoRegQA.
Dataset Card for MoroccoRegQA
Dataset Details
Dataset Description
MoroccoRegQA is an Arabic regulatory retrieval benchmark comprising 90 expert-annotated query–evidence pairs grounded in five Moroccan legal codes and a parsed corpus of 2,464 hierarchically structured articles (moroccanregdoc.json).
Each query is provided in three forms — Moroccan Darija, Modern Standard Arabic (MSA), and English — and is linked to one or more gold evidence articles requiring multi-hop reasoning across the statutory citation graph. The benchmark is designed to evaluate retrieval systems on Arabic morphological ambiguity, hidden definitional cross-references, and hierarchical document structure.
- Curated by: Yassine Yazidi
- Language(s): Arabic (Darija · MSA), English
- License: CC BY 4.0
Dataset Sources
- Repository: yassineyz/MoroccoRegQA
- Associated model: yassineyz/sah-rag-moroccoregq
- Paper: Enhancing Regulatory Query Resolution via Structural-Aware Hybrid Feature Encoding with Quantised Indexing and Citation-Seeded Graph Traversal (under review, 2025)
Repository Contents
Uses
Direct Use
- Evaluating Arabic legal retrieval systems (sparse, dense, graph-based)
- Multi-hop retrieval benchmarking on domain-specific, morphologically rich text
- Cross-lingual legal QA research (queries available in Darija, MSA, and English)
- Fine-tuning or evaluating RAG pipelines on Arabic statutory corpora
Out-of-Scope Use
This dataset is not intended for use as legal advice or as a source of authoritative legal interpretation. The corpus reflects the state of Moroccan law at the time of collection; some articles may have since been amended or abrogated.
Dataset Structure
Benchmark — MoroccoRegQA_v1.xlsx
Each row represents one annotated query. The fields are:
Example entry — MRQ-0003
{
"id": "MRQ-0003",
"domain": "Family Law (Moudawana)",
"query_darija": "شكون لي عندو الحق فالحضانة ديال الدراري من بعد الطلاق؟",
"query_arabic_msa": "من له الحق في حضانة الأطفال بعد الطلاق؟",
"query_english": "Who has the right to child custody after divorce?",
"evidence_ids": ["moudawana.art171", "moudawana.art166"],
"hop_count": 2,
"difficulty": "multi_hop",
"requires_definition": true,
"definition_term": "الحضانة",
"has_cross_reference": true
}Corpus — moroccanregdoc.json
The corpus represents each node in the statutory hierarchy as a JSON object. The hierarchical depth is encoded in the level field: 1 = book, 2 = part, 3 = chapter/section, 4 = article.
Example corpus nodes
{
"id": "commercial.art29",
"text": "يجوز لكل شخص أن يحصل على نسخة ...",
"level": 4,
"type": "article",
"law_code": "commercial",
"article_number": "29",
"title": "المادة 29",
"parent_id": "commercial.l1.3"
}{
"id": "commercial.l3.4",
"text": "الفرع الثاني: السجل التجاري المركزي",
"level": 3,
"type": "section",
"law_code": "commercial",
"article_number": "",
"title": "الثاني السجل التجاري المركزي",
"parent_id": "commercial.l1.3"
}The parent_id field encodes the full taxonomic lineage used by hierarchy-aware retrieval systems.
Dataset Creation
Curation Rationale
No Arabic regulatory retrieval benchmark with multi-hop annotation, trilingual query coverage, and explicit statutory citation-graph structure existed prior to this work. MoroccoRegQA was created to fill this gap and to enable reproducible evaluation of retrieval systems on the specific challenges of Arabic legal text.
Source Data
Data Collection and Processing
The corpus was collected from the official published texts of five Moroccan legal codes. Articles were parsed programmatically into a hierarchical JSON structure, with cross-references extracted by matching the statutory citation syntax (e.g. "كما هو محدد في المادة 78") using jurisdiction-specific regular expressions. No automated summarisation or paraphrasing was applied; all text is reproduced verbatim from the legal sources.
Legal Codes Covered
Annotations
Annotation Process
Queries were authored by a legal expert with knowledge of Moroccan statutory law. For each query, the annotator identified the minimal set of articles sufficient to answer it, along with the hop count (number of cross-reference hops required), difficulty level, and whether the answer depends on a definitional article. Queries were written in Darija first, then translated to MSA and English by the same annotator to ensure semantic fidelity.
Who are the Annotators?
Annotations were created by the dataset author (Yassine Yazidi), a researcher with domain knowledge of Moroccan regulatory law.
Personal and Sensitive Information
The dataset contains only publicly available statutory text. No personal, private, or sensitive information is present.
Evaluation Protocol
MoroccoRegQA uses the distractor protocol: the full 2,464-article corpus serves as the retrieval pool, so systems must discriminate gold evidence from semantically similar distractors. Metrics are reported at cut-offs k ∈ {5, 10, 20}: Recall@k, Precision@k, NDCG@k, MRR, and F1@k.
Bias, Risks, and Limitations
The benchmark covers five Moroccan legal codes; performance on other Arabic jurisdictions (Gulf, Egyptian, Levantine statutory systems) is not guaranteed and has not been evaluated. The corpus reflects the state of law at the time of collection; articles amended or abrogated after that date are not updated. The 90-query annotation set, while carefully curated, is limited in scale; researchers requiring broader coverage should treat results as indicative rather than definitive.
Recommendations
Systems trained or evaluated on MoroccoRegQA should not be deployed for legally binding advice without human legal expert review. Generation quality depends directly on retrieval quality; retrieval errors propagate into answer errors as illustrated in the accompanying paper.
Dataset Card Contact
Yassine Yazidi — HuggingFace profile email: yassine.yzd@gmail.com
Citation
@misc{yassine_yazidi_2026,
author = {Yassine Yazidi},
title = {MoroccoRegQA (Revision 033d47f)},
year = {2026},
url = {https://huggingface.co/datasets/yassineyz/MoroccoRegQA},
doi = {10.57967/hf/8843},
publisher = {Hugging Face}
}