File size: 2,179 Bytes
eb2b670
 
7d1ac01
74048bb
eb2b670
74048bb
 
 
 
 
 
 
 
7d1ac01
 
74048bb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language:
- zh
license: cc-by-sa-4.0
configs:
- config_name: Data
  data_files: CaseGen.json
task_categories:
- text-generation
tags:
- legal
- chinese
- multi-stage-generation
---

# CaseGen: A Benchmark for Multi-Stage Legal Case Documents Generation

<div align="center">
<img src="./fig/CaseGen.png" style="width: 40%;height: 40%">
</div>

**CaseGen** is a benchmark designed to evaluate large language models (LLMs) in the generation of legal case documents in the Chinese legal domain. The dataset includes 500 real-world legal case instances, each structured into seven sections: Prosecution, Defense, Evidence, Events, Facts, Reasoning, and Judgment. It supports four key tasks: drafting defense statements, writing trial facts, composing legal reasoning, and generating judgment results.

This repository contains both the dataset and the code for evaluating the performance of LLMs in generating legal case documents. It provides a multi-stage generation task framework and an automated evaluation pipeline using LLMs as evaluators.


## Task Description

CaseGen includes four key tasks:

1. **Drafting Defense Statements**: Respond to the prosecution’s claims based on evidence.
2. **Writing Trial Facts**: Construct trial facts by verifying the true course of events.
3. **Composing Legal Reasoning**: Analyze the case facts and apply legal principles for the court's reasoning.
4. **Generating Judgment Results**: Formulate the final ruling based on trial facts and legal reasoning.


## Data

The data was collected from publicly available legal resources, with a strong emphasis on maintaining data integrity and quality. The case documents have been pre-processed and annotated by legal experts. Evidence details are annotated for completeness, and the data is formatted in JSON for ease of use.
An example of a case is:
```json
{
    "id": 0,
    "title": " ",
    "full_text": " ",
    "defense": " ",
    "fact": " ",
    "reasoning": " ",
    "event": { },
    "evidence": { }
}
```

## License
CaseGen is released under the **CC BY-NC-SA 4.0** license. It is available for non-commercial academic use. Commercial use requires additional authorization.