ShiZhi: Legal LLM for Court View Generation
- ShiZhi is a Chinese lightweight large language model designed for generating the 'Court View' section of criminal case documents from factual descriptions.
- It employs a 0.5B-parameter Transformer decoder fine-tuned on the CCVG dataset, achieving 58.5 BLEU-1 and 86.1% charge prediction accuracy.
- Its development showcases the impact of domain-specific fine-tuning in legal NLP while highlighting challenges like repetition and statute update errors.
Searching arXiv for ShiZhi and closely related legal generation work to ground the article in current literature. ShiZhi is a Chinese lightweight LLM for Criminal Court View Generation (CVG), the task of automatically generating the “Court View” section of a criminal case document from its factual description (Hou et al., 10 Oct 2025). In Chinese criminal jurisprudence, the Court View typically contains the legal rationale—how the court interprets and applies facts to legal statutes—and the ultimate charges brought against the defendant. ShiZhi is a 0.5 billion-parameter Transformer decoder initialized from Qwen2-0.5B-Instruct and fine-tuned on the Chinese Court View Generation (CCVG) dataset of 110,234 criminal cases. The reported results are 58.5 BLEU-1 on court view generation and 86.1\% accuracy with 92.5\% macro F1 on charge prediction, and the model is presented as the first LLM specifically designed for court view generation (Hou et al., 10 Oct 2025).
1. Task definition and problem setting
Criminal Court View Generation refers to the automatic generation of the “Court View” section in a criminal case document, given only its factual description (Hou et al., 10 Oct 2025). The task is difficult because case facts vary widely in complexity and detail, legal reasoning must be both precise and coherent, and factual consistency must be strictly preserved. The paper further notes that general-purpose LLMs, despite strong open-domain generation capacity, often lack focused exposure to legal terminology, statutory references, and charge-specific reasoning patterns; as a result, they may hallucinate legal provisions or misstate charges (Hou et al., 10 Oct 2025).
ShiZhi is framed as a domain-specific response to this problem. Rather than treating CVG as generic summarization, it is trained end-to-end on paired fact–court-view data so that the model can internalize legal reasoning schemas and charge-correlated phrasing patterns. A plausible implication is that ShiZhi occupies a narrow but technically important point in legal NLP: it targets long-form, statute-sensitive generation while remaining tightly coupled to downstream charge correctness.
2. CCVG dataset construction
The Chinese Court View Generation dataset, CCVG, was constructed by harvesting criminal case judgments from China Judgments Online covering 1985–2021 (Hou et al., 10 Oct 2025). Documents lacking clear fact or court view sections were discarded, with extraction performed via regular expressions keyed on “after identification” and “the court holds that,” respectively. After filtering, 110,234 cases were retained.
The data were partitioned into a 90/10 train/test split, with 11,023 cases held out for evaluation, and a further 1,000-case subset of the training set held out for validation. Length-based filtering removed samples where either the fact or court view was shorter than 50 tokens or exceeded 512 tokens. The resulting splits and text-length statistics are as follows (Hou et al., 10 Oct 2025).
| Subset | # Cases | Length statistics |
|---|---|---|
| Train | 99,211 | Fact: 417.9 ± 175.2; View: 300.9 ± 119.5 |
| Dev | 1,000 | Fact: 412.3 ± 170.4; View: 298.7 ± 117.8 |
| Test | 11,023 | Fact: 408.1 ± 161.6; View: 299.5 ± 116.3 |
The paper also reports that the 50 most frequent charges cover over 95 % of cases, which informed the decision to treat charge prediction as a closed-set classification subtask (Hou et al., 10 Oct 2025). This design choice is consequential: it couples generative evaluation with a label-space assumption that is narrower than unrestricted legal classification, but better aligned with the empirical distribution of the collected corpus.
3. Model architecture and training regime
ShiZhi is a 0.5 billion-parameter Transformer decoder model initialized from Qwen2-0.5B-Instruct (Hou et al., 10 Oct 2025). Its architecture comprises 24 self-attention blocks, each with hidden dimension , 16 attention heads, and a feed-forward layer of size 4096, yielding approximately parameters. Given an input fact sequence , the model generates the court view token by token.
Training minimizes the standard cross-entropy objective
where denotes previously generated tokens (Hou et al., 10 Oct 2025). Domain-adaptive fine-tuning is performed using the Swift toolkit. The prompts are structured with a system field instructing the model to assume the role of a judge, a query field containing the fact description followed by the prefix “Court View:”, a response field containing the target court view, and a charge field containing the charge label (Hou et al., 10 Oct 2025).
The reported training hyperparameters are 3 epochs, batch size 4, learning rate , maximum sequence length 512 tokens, and a single NVIDIA RTX 4090 (Hou et al., 10 Oct 2025). This setup is notable because the model is explicitly lightweight. This suggests that, for CVG, domain-adaptive fine-tuning on high-quality legal supervision may be more important than large parameter count alone.
4. Evaluation protocol and quantitative performance
ShiZhi is evaluated along two axes: generation quality and charge prediction (Hou et al., 10 Oct 2025). Text quality is assessed with ROUGE-1/2/L and BLEU-1/2/N, while charge prediction is measured by accuracy and macro-averaged F1. The paper gives the BLEU-1 definition as
where is the reference length, is the candidate length, is the 0-gram precision, and 1 uniform weights (Hou et al., 10 Oct 2025).
Against the Qwen2-0.5B-Instruct baseline, ShiZhi reports the following results (Hou et al., 10 Oct 2025).
| Model | BLEU (B-1 / B-2 / B-N) | Charge (Acc / MF1) |
|---|---|---|
| Qwen2-0.5B-Instruct | 11.1 / 6.3 / 2.9 | 17.3 / 29.5 |
| ShiZhi (full fine-tune) | 58.5 / 51.0 / 41.7 | 86.1 / 92.5 |
The paper states that an ablation removing domain-specific fine-tuning—described as zero-shot Qwen2—shows performance collapsing to near-random levels, underscoring the value of CCVG (Hou et al., 10 Oct 2025). A likely misconception is that ShiZhi should be evaluated only as a text generator; in the reported setup, charge prediction is a coequal evaluation dimension, and much of the empirical significance of the model lies in the joint improvement of long-form legal reasoning and charge correctness.
5. Output characteristics, strengths, and error modes
The analysis attributes ShiZhi’s gains to fine-tuning on CCVG, which enables the model to learn consistent legal phrasing, including statutory citations and standard rationale structures, and to map factual cues to appropriate charges (Hou et al., 10 Oct 2025). Human inspection of generated outputs is reported to show improved factual grounding, with details such as monetary amounts or dates preserved, together with coherent legal argumentation practice.
The same analysis identifies several recurring failure modes (Hou et al., 10 Oct 2025). One is occasional repetition when facts are overly verbose. A second is rare misclassification between closely related charges, with “fraud” versus “embezzlement” given as an example. A third is outdated statute citations for cases near the 1985 boundary. These errors are informative because they indicate that the model’s weaknesses are not restricted to surface fluency; they involve temporal legal alignment, fine-grained inter-charge discrimination, and robustness to long factual contexts.
This error profile suggests that ShiZhi’s behavior is shaped by both corpus distribution and task formulation. In particular, the closed-set treatment of charges may improve classification stability for common accusations while leaving boundary cases vulnerable when legal distinctions are semantically subtle.
6. Position within legal AI and stated future directions
ShiZhi is described as a model whose primary contributions are the CCVG dataset of 110K+ fact–view pairs, the demonstration that a lightweight 0.5B LLM can achieve high legal fidelity when domain-tuned, and extensive evaluation showing significant gains in both generation quality and charge accuracy (Hou et al., 10 Oct 2025). Within legal artificial intelligence, this places ShiZhi at the intersection of case-conditioned text generation, legal reasoning formalization, and supervised charge inference.
The paper’s future directions are explicit (Hou et al., 10 Oct 2025). They include extending CCVG to cover post-2021 judgments, scaling ShiZhi to larger parameter counts, multilingual adaptation for comparative law, and integrating external legal knowledge bases to further reduce hallucinations. Each direction addresses a distinct limitation: temporal coverage, model capacity, jurisdictional scope, and factual-legal grounding. Taken together, these proposals indicate a research agenda in which specialized legal LLMs are not merely smaller versions of general-purpose models, but systems whose utility depends on curated legal corpora, charge-sensitive supervision, and tighter control over statutory consistency.