dataset_info:
features:
- name: law_code
dtype: string
- name: law_name
dtype: string
- name: section_num
dtype: string
- name: section_content
dtype: string
- name: reference
list:
- name: include
dtype: bool
- name: law_name
dtype: string
- name: section_num
dtype: string
splits:
- name: ccl
num_bytes: 8145015
num_examples: 5127
download_size: 1777237
dataset_size: 8145015
configs:
- config_name: default
data_files:
- split: ccl
path: data/ccl-*
license: mit
📜 NitiBench-Statute: Thai Legal Corpus for RAG
Part of the NitiBench Project
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).
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.
🚀 Quick Start
Loading the Dataset
You can easily load this dataset using the Hugging Face datasets library:
from datasets import load_dataset
# Load the statute corpus
dataset = load_dataset("vistec-AI/nitibench-statute", split="ccl")
# Example: Print the first section
print(dataset[0])
Usage for RAG (Context Pool)
To use this as a retrieval source, you typically iterate through the section_content to create embeddings:
documents = []
ids = []
for row in dataset:
# Use 'section_content' as the text chunk to be indexed
documents.append(row['section_content'])
# Use 'law_code' or a combination of name+section as ID
ids.append(f"row['law_code']-row['section_num']")
# ... Proceed to pass `documents` to your VectorDB or Retriever (e.g., FAISS, ChromaDB, BM25)
📊 Dataset Statistics
- Total Documents: 5,127 sections
- Total Legislations: 35 Legislation (Corporate and Commercial Law)
- Language: Thai
📂 Data Structure
Each row represents a specific section of a law.
| Column Name | Type | Description |
|---|---|---|
law_code |
str |
Unique identifier for the specific law section (e.g., ก0123-1B-0001). |
law_name |
str |
The official full name of the legislation (e.g., พระราชบัญญัติการประกอบกิจการพลังงาน พ.ศ. 2550). |
section_num |
str |
The specific section number within the Act (e.g., 26). |
section_content |
str |
The full text content to be used for retrieval. This includes the law name, section number, and the provision text combined. |
reference |
list |
A list of cross-references to other laws (if applicable). |
Example Data Point
{
"law_code": "ก0123-1B-0001",
"law_name": "พระราชบัญญัติการประกอบกิจการพลังงาน พ.ศ. 2550",
"section_num": "26",
"section_content": "พระราชบัญญัติการประกอบกิจการพลังงาน พ.ศ. 2550 มาตรา 26 ก่อนการออกระเบียบ ข้อบังคับ ประกาศ หรือข้อกำหนดใดของคณะกรรมการซึ่งจะมีผลกระทบต่อบุคคล...",
"reference": []
}
📝 Citation
If you use this dataset in your research, please cite the NitiBench paper:
@inproceedings{akarajaradwong-etal-2025-nitibench,
title = "{N}iti{B}ench: Benchmarking {LLM} Frameworks on {T}hai Legal Question Answering Capabilities",
author = "Akarajaradwong, Pawitsapak and
Pothavorn, Pirat and
Chaksangchaichot, Chompakorn and
Tasawong, Panuthep and
Nopparatbundit, Thitiwat and
Pratai, Keerakiat and
Nutanong, Sarana",
booktitle = "Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing",
month = nov,
year = "2025",
publisher = "Association for Computational Linguistics",
}
@misc{akarajaradwong2025nitibenchcomprehensivestudiesllm,
title={NitiBench: A Comprehensive Studies of LLM Frameworks Capabilities for Thai Legal Question Answering},
author={Pawitsapak Akarajaradwong and Pirat Pothavorn and Chompakorn Chaksangchaichot and Panuthep Tasawong and Thitiwat Nopparatbundit and Sarana Nutanong},
year={2025},
eprint={2502.10868},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2502.10868},
}
⚖️ License
This dataset is provided under the MIT License.