The WangchanX-Legal-ThaiCCL-RAG dataset supports the development Retrieval-Augmented Generation (RAG) for Thai Legal question answering. This dataset is allows developers to finetune both retrieval model - to better retrieve relevant law section, and Large Language Model (LLM) - for instruction tuning. Our dataset supports Corporate and Commercial Law (thus ThaiCCL name). See legislation section for more details on supported legislations.
The dataset includes 35 legislations covering various laws, such as the Civil and Commercial Code, Securities and Exchange Act, and Petroleum Income Tax Act, etc.
The procedure for collecting the training data was as follows:
hard_negative_contexts) 2) rerank relevant law sections to put most relevant law section on top.hard_negative_answer.Given the curated approach, the training samples contain multiple positives.
The test set was curated using expert-formulated legal questions and answers containing only 21 major legislations. The test set was fully annotated manually using Legal experts. The data collection procedure was outlined as follows:
Unlike training set which contains multiple positives, the test set only contains a single positive law section. Additionally, there's no hard negative contexts and hard negative answers for the test set.
| Field Name | Type | Description |
|---|---|---|
| question | string | A legal question. |
| positive_contexts | list of dict | Sections from legal texts that directly answer or relate to the question. |
| hard_negative_contexts | list of dict | Legal sections retrieved by BGE-M3 but deemed irrelevant by legal experts. |
| positive_answer | string | The final, reviewed and corrected answer. |
| hard_negative_answer | string | The uncorrected answer before expert review. |
| 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 | β | β |
@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},
}
This dataset is provided under the MIT License.
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.
The WangchanX-Legal-ThaiCCL-RAG dataset supports the development Retrieval-Augmented Generation (RAG) for Thai Legal question answering. This dataset is allows developers to finetune both retrieval model - to better retrieve relevant law section, and Large Language Model (LLM) - for instruction tuning. Our dataset supports Corporate and Commercial Law (thus ThaiCCL name). See legislation section for more details on supported legislations.
The dataset includes 35 legislations covering various laws, such as the Civil and Commercial Code, Securities and Exchange Act, and Petroleum Income Tax Act, etc.
The procedure for collecting the training data was as follows:
hard_negative_contexts) 2) rerank relevant law sections to put most relevant law section on top.hard_negative_answer.Given the curated approach, the training samples contain multiple positives.
The test set was curated using expert-formulated legal questions and answers containing only 21 major legislations. The test set was fully annotated manually using Legal experts. The data collection procedure was outlined as follows:
Unlike training set which contains multiple positives, the test set only contains a single positive law section. Additionally, there's no hard negative contexts and hard negative answers for the test set.
| Field Name | Type | Description |
|---|---|---|
| question | string | A legal question. |
| positive_contexts | list of dict | Sections from legal texts that directly answer or relate to the question. |
| hard_negative_contexts | list of dict | Legal sections retrieved by BGE-M3 but deemed irrelevant by legal experts. |
| positive_answer | string | The final, reviewed and corrected answer. |
| hard_negative_answer | string | The uncorrected answer before expert review. |
| 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 | β | β |
@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},
}
This dataset is provided under the MIT License.
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.