Datasets:

Modalities:
Text
Formats:
parquet
ArXiv:
License:
Pawitsapak commited on
Commit
af10c85
·
verified ·
1 Parent(s): dbef536

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +103 -0
README.md CHANGED
@@ -28,4 +28,107 @@ configs:
28
  data_files:
29
  - split: ccl
30
  path: data/ccl-*
 
31
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  data_files:
29
  - split: ccl
30
  path: data/ccl-*
31
+ license: mit
32
  ---
33
+
34
+ # 📜 NitiBench-Statute: Thai Legal Corpus for RAG
35
+
36
+ **Part of the [NitiBench Project](https://github.com/vistec-AI/nitibench/)**
37
+
38
+ This dataset contains the complete corpus of legal sections used in the **NitiBench** benchmark (CCL and Tax subset). It comprises **5,127 legal sections** extracted from **35 Thai legislations** (primarily focusing on Corporate and Commercial Law).
39
+
40
+ It is designed to be used as a **Context Pool (Knowledge Base)** for Retrieval-Augmented Generation (RAG) pipelines. Researchers and developers can load this dataset to populate vector databases or search indices to reproduce NitiBench baselines or evaluate new retrieval strategies.
41
+
42
+ ## 🚀 Quick Start
43
+
44
+ ### Loading the Dataset
45
+ You can easily load this dataset using the Hugging Face `datasets` library:
46
+
47
+ ```python
48
+ from datasets import load_dataset
49
+
50
+ # Load the statute corpus
51
+ dataset = load_dataset("vistec-AI/nitibench-statute", split="train")
52
+
53
+ # Example: Print the first section
54
+ print(dataset[0])
55
+ ```
56
+
57
+ ### Usage for RAG (Context Pool)
58
+ To use this as a retrieval source, you typically iterate through the `section_content` to create embeddings:
59
+
60
+ ```python
61
+ documents = []
62
+ ids = []
63
+
64
+ for row in dataset:
65
+ # Use 'section_content' as the text chunk to be indexed
66
+ documents.append(row['section_content'])
67
+ # Use 'law_code' or a combination of name+section as ID
68
+ ids.append(row['law_code'])
69
+
70
+ # ... Proceed to pass `documents` to your VectorDB or Retriever (e.g., FAISS, ChromaDB, BM25)
71
+ ```
72
+
73
+ ## 📊 Dataset Statistics
74
+
75
+ * **Total Documents:** 5,127 sections
76
+ * **Total Legislations:** 35 Legislation (Corporate and Commercial Law)
77
+ * **Language:** Thai
78
+
79
+ ## 📂 Data Structure
80
+
81
+ Each row represents a specific section of a law.
82
+
83
+ | Column Name | Type | Description |
84
+ |:--- |:--- |:--- |
85
+ | `law_code` | `str` | Unique identifier for the specific law section (e.g., `ก0123-1B-0001`). |
86
+ | `law_name` | `str` | The official full name of the legislation (e.g., `พระราชบัญญัติการประกอบกิจการพลังงาน พ.ศ. 2550`). |
87
+ | `section_num` | `str` | The specific section number within the Act (e.g., `26`). |
88
+ | `section_content` | `str` | The full text content to be used for retrieval. This includes the law name, section number, and the provision text combined. |
89
+ | `reference` | `list` | A list of cross-references to other laws (if applicable). |
90
+
91
+ ### Example Data Point
92
+ ```json
93
+ {
94
+ "law_code": "ก0123-1B-0001",
95
+ "law_name": "พระราชบัญญัติการประกอบกิจการพลังงาน พ.ศ. 2550",
96
+ "section_num": "26",
97
+ "section_content": "พระราชบัญญัติการประกอบกิจการพลังงาน พ.ศ. 2550 มาตรา 26 ก่อนการออกระเบียบ ข้อบังคับ ประกาศ หรือข้อกำหนดใดของคณะกรรมการซึ่งจะมีผลกระทบต่อบุคคล...",
98
+ "reference": []
99
+ }
100
+ ```
101
+
102
+ ## 📝 Citation
103
+
104
+ If you use this dataset in your research, please cite the NitiBench paper:
105
+
106
+ ```bibtex
107
+ @inproceedings{akarajaradwong-etal-2025-nitibench,
108
+ title = "{N}iti{B}ench: Benchmarking {LLM} Frameworks on {T}hai Legal Question Answering Capabilities",
109
+ author = "Akarajaradwong, Pawitsapak and
110
+ Pothavorn, Pirat and
111
+ Chaksangchaichot, Chompakorn and
112
+ Tasawong, Panuthep and
113
+ Nopparatbundit, Thitiwat and
114
+ Pratai, Keerakiat and
115
+ Nutanong, Sarana",
116
+ booktitle = "Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing",
117
+ month = nov,
118
+ year = "2025",
119
+ publisher = "Association for Computational Linguistics",
120
+ }
121
+
122
+ @misc{akarajaradwong2025nitibenchcomprehensivestudiesllm,
123
+ title={NitiBench: A Comprehensive Studies of LLM Frameworks Capabilities for Thai Legal Question Answering},
124
+ author={Pawitsapak Akarajaradwong and Pirat Pothavorn and Chompakorn Chaksangchaichot and Panuthep Tasawong and Thitiwat Nopparatbundit and Sarana Nutanong},
125
+ year={2025},
126
+ eprint={2502.10868},
127
+ archivePrefix={arXiv},
128
+ primaryClass={cs.CL},
129
+ url={https://arxiv.org/abs/2502.10868},
130
+ }
131
+ ```
132
+
133
+ ## ⚖️ License
134
+ This dataset is provided under the **MIT License**.