LawInstruct
收藏资源简介:
LawInstruct数据集由斯坦福大学、约翰霍普金斯大学等机构联合创建,是首个面向法律领域的指令数据集。该数据集覆盖17个司法管辖区、24种语言,包含1200万个训练示例,涵盖问答、蕴含、摘要和信息提取等法律任务。每个示例都以定制的指令形式呈现,并配有相应的输出。LawInstruc整合了58个经过标注的高质量数据集,这些数据集源自多个法律任务与专业领域。该数据集的推出,旨在提升大模型在法律推理领域的性能,为法律领域内的信息处理和决策制定能力的发展提供了宝贵资源。
The LawInstruct dataset, co-created by institutions including Stanford University and Johns Hopkins University, is the first instruction dataset dedicated to the legal domain. Spanning 17 jurisdictions and 24 languages, this dataset contains 12 million training examples covering legal tasks such as question answering, entailment, summarization, and information extraction. Each sample is presented in the form of a customized instruction paired with a corresponding output. LawInstruct integrates 58 high-quality labeled datasets sourced from diverse legal tasks and professional domains. The release of this dataset aims to enhance the performance of large language models (LLMs) in legal reasoning, providing a valuable resource for advancing information processing and decision-making capabilities within the legal domain.
数据集概述
数据集生成方法
- 将原始数据上传至huggingface hub。
- 在
instruction_datasets文件夹中添加一个类,该类继承自AbstractDataset并实现抽象方法get_data。get_data方法应产生包含以下字段的数据点:- "instruction_language": 指令语言
- "prompt_language": 提示语言
- "answer_language": 答案语言
- "instruction": 模型执行的指令
- "prompt": 模型输入的提示
- "answer": 提供的解决方案答案
- "task_type": 任务类型(例如"summarization")
- "jurisdiction": 示例的司法管辖区(例如"US")
- "subset": 数据集的子集(例如"swiss_judgment_prediction")
- 将数据集添加到
build_instruction_datasets.py中的列表,并运行脚本以生成数据集。
数据集内容
- 使用GPT4生成了每个任务的1到5个种子指令的10个改写版本。
数据集改进建议
- 改进huggingface数据集加载脚本,支持不同数量和语言的指令动态加载。
未来可能添加的数据集
- Swiss Citation Extraction
- MultiLegalNeg Datasets
- 使用相同的指令库(如果适用)
- 增加指令库中的示例并多样化
可能重新考虑的数据集
- IR Datasets: GerDALIR, Covid Law Matching, BSARD, SwissIR
- Summarization Datasets: Dutch Legal Summarization, LegalSum, Indian/Australian Summarization, Cookie Policy Summarization, BVA Summarization, LegalCaseReports Summ
- 其他数据集: BVACItationPrediction, Cornell eRulemaking Corpus, US Caselaw Segmentation, MultiLegalSBD, Contract extraction dataset, CASS, LegalLinking, Privacy Policies, MakeThisYourLastTime, ECHR Argument Mining




