--- 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](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: ```python 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: ```python 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 ```json { "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: ```bibtex @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**.