VISAI-AI/nitibench-statute
📜 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… See the full description on the dataset page: https://huggingface.co/datasets/VISAI-AI/nitibench-statute.
📜 NitiBench-Statute: Thai Legal Corpus for RAG
Part of the [NitiBench Project](https://github.com/vistec-AI/nitibench/)
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.
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.
