File size: 7,946 Bytes
88fc127 086f6f9 88fc127 2e3cb57 d96fbc0 2e3cb57 be490e5 2e3cb57 d094b91 70090b3 d094b91 70090b3 2e3cb57 086f6f9 2e3cb57 bd75f5a 086f6f9 bd75f5a 0b6c332 2e3cb57 cb26d47 bd75f5a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
---
license: mit
task_categories:
- sentence-similarity
- text-generation
tags:
- legal
- RAG
- LCLM
size_categories:
- 10K<n<100K
configs:
- config_name: default
data_files:
- split: ccl
path: data/ccl-*
- split: tax
path: data/tax-*
dataset_info:
features:
- name: question
dtype: string
- name: answer
dtype: string
- name: relevant_laws
list:
- name: law_name
dtype: string
- name: section_content
dtype: string
- name: section_num
dtype: string
- name: reference_answer
dtype: string
- name: reference_laws
list:
- name: law_name
dtype: string
- name: section_content
dtype: string
- name: section_num
dtype: string
splits:
- name: ccl
num_bytes: 18873695
num_examples: 3729
- name: tax
num_bytes: 2227708
num_examples: 50
download_size: 4780889
dataset_size: 21101403
---
# π©π»ββοΈ NitiBench: A Thai Legal Benchmark for RAG
**[[π Technical Report](https://arxiv.org/pdf/2502.10868)] | [[π¨βπ» Github Repository](https://github.com/vistec-AI/nitibench/)]**
This dataset provides the **test** data for evaluating LLM frameworks, such as RAG or LCLM. The benchmark consists of two datasets:
- [NitiBench-CCL](#οΈ-nitibench-ccl)
- [NitiBench-Tax](#-nitibench-tax)
## ποΈ NitiBench-CCL
Derived from the [WangchanX-Legal-ThaiCCL-RAG Dataset](https://huggingface.co/datasets/airesearch/WangchanX-Legal-ThaiCCL-RAG), our version includes an additional preprocessing step in which we separate the reasoning process from the final answer. The dataset contains 35 pieces of legislation related to **C**orporate and **C**ommercial **L**aw (CCL). Information about the 35 pieces of legislation is provided in the table below:
| Legislation | Legal Terminology | Training | Test |
|-------------|-------------------|----------|------|
| Organic Act on Counter Corruption, B.E. 2561 | organic law | β | |
| Civil and Commercial Code | code | β | β |
| Revenue Code | code | β | β |
| Accounting Act, B.E. 2543 | act | β | β |
| Accounting Profession Act, B.E. 2547 | act | β | β |
| Act on Disciplinary Offenses of Government Officials Performing Duties in Agencies Other than Government Agencies, B.E. 2534 | act | β | |
| Act on Offences of Officials Working in State Agencies or Organizations, B.E. 2502 | act | β | |
| Act on Offences Relating to Registered Partnerships, Limited Partnerships, Companies Limited, Associations and Foundations, B.E. 2499 | act | β | β |
| Act on the Establishment of Government Organizations, B.E. 2496 | act | β | |
| Act on the Management of Shares and Stocks of Ministers, B.E. 2543 | act | β | |
| Act Repealing the Agricultural Futures Trading Act, B.E. 2542 B.E. 2558 | act | β | |
| Budget Procedure Act, B.E. 2561 | act | β | |
| Business Registration Act, B.E. 2499 | act | β | β |
| Chamber of Commerce Act, B.E. 2509 | act | β | β |
| Derivatives Act, B.E. 2546 | act | β | β |
| Energy Conservation Promotion Act, B.E. 2535 | act | β | β |
| Energy Industry Act, B.E. 2550 | act | β | β |
| Financial Institutions Business Act, B.E. 2551 | act | β | β |
| Fiscal Discipline Act, B.E. 2561 | act | β | |
| Foreign Business Act, B.E. 2542 | act | β | β |
| Government Procurement and Supplies Management Act, B.E. 2560 | act | β | |
| National Economic and Social Development Act, B.E. 2561 | act | β | |
| Petroleum Income Tax Act, B.E. 2514 | act | β | β |
| Provident Fund Act, B.E. 2530 | act | β | β |
| Public Limited Companies Act, B.E. 2535 | act | β | β |
| Secured Transactions Act, B.E. 2558 | act | β | β |
| Securities and Exchange Act, B.E. 2535 | act | β | β |
| State Enterprise Capital Act, B.E. 2542 | act | β | |
| State Enterprise Committee and Personnel Qualifications Standards Act, B.E. 2518 | act | β | |
| State Enterprise Development and Governance Act, B.E. 2562 | act | β | |
| State Enterprise Labor Relations Act, B.E. 2543 | act | β | |
| Trade Association Act, B.E. 2509 | act | β | β |
| Trust for Transactions in Capital Market Act, B.E. 2550 | act | β | β |
| Emergency Decree on Digital Asset Businesses, B.E. 2561 | emergency decree | β | |
| Emergency Decree on Special Purpose Juristic Person for Securitization, B.E. 2540 | emergency decree | β | β |
The training split of `nitibench-ccl` can be found in the [WangchanX-Legal-ThaiCCL-RAG dataset](https://huggingface.co/datasets/airesearch/WangchanX-Legal-ThaiCCL-RAG).
### Data Format
Each data point contains four columns:
- `question: str` β A question relevant to the `relevant_laws`.
- `answer: str` β The original answer generated by an LLM, which has been revised and edited by legal experts to include both the reasoning steps and the final answer.
- `relevant_laws: List[Dict[str, str]]` β A list of relevant law name, section, and contents.
- `reference_answer: str` β The answer to the question based on the `relevant_laws`, provided without the reasoning steps.
- `reference_laws: List[Dict[str, str]]` - A list of referenced law mentioned in `relevant_laws` column.
Formally, given the data triple \((q, T=\{p_1, p_2, \dots, p_K\}, y)\), \(q\) represents the `question`, \(T\) represents `relevant_laws`, and \(y\) represents the `answer`.
### Data Curation
Using the notation described above, the data was curated as follows:
1. Queries (\(q\)) and answers (\(y\)) were manually crafted by legal experts based on a single section sampled from the legal texts of the 35 pieces of legislation.
2. For each data triple \((q, T, y)\), the manually crafted question was carefully quality-assured by a second legal expert.
Thus, for the test data, there is only one positive per query (\(|T|=1\)). The diagram below shows how the test data was collected.

## πΈ NitiBench-Tax
This subset provides a question, relevant laws, and an answer for each data point. Instead of having legal experts manually craft the questions, we scraped the data from a reliable source: the [Revenue Department Website](https://rd.go.th). This subset contains Tax Ruling Cases officially provided by the Revenue Department since 2021. As a result, this subset is considerably more challenging, as it requires extensive legal reasoning both for searching for relevant documents and for generating the answer. The data collection procedure is illustrated in the figure below:

### Data Format
This split uses the same format as described in the [NitiBench-CCL split](#data-format).
## Contact
For any inquiries or concerns, please reach out to us via email: [Chompakorn Chaksangchaichot](mailto:[email protected]).
## Citation
```
@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**.
## Acknowledgment
We sincerely appreciate the generous support from the WangchanX program sponsorsβPTT, SCB, and SCBXβwhose funding made this project possible. We are also grateful for the invaluable collaboration with VISTEC, which was crucial in bringing this project to fruition.
<br>
<div style="display: flex; align-items: center; gap: 20px;">
Sponsored by
<img src="./assets/VISAI_Logo_Horizontal.png" style="height:30px;" alt="VISAI Logo">
<img src="./assets/Logo_vistec.png" style="height:30px;" alt="VISTEC Logo">
</div> |