Datasets:
pretty_name: C3RD (Chinese Civil Case Retrieval Dataset)
language:
- zh
license: mit
task_categories:
- text-retrieval
tags:
- legal
- law
- chinese-law
- civil-law
- information-retrieval
configs:
- config_name: queries
default: true
data_files:
- split: train
path: data/queries/*.jsonl.gz
- config_name: documents
data_files:
- split: train
path: data/documents/*.jsonl.gz
- config_name: candidates
data_files:
- split: train
path: data/candidates/*.jsonl.gz
C3RD
Chinese Civil Case Retrieval Dataset(C3RD) comprises 1146 queries, each with 100 candidate civil cases documents.The statistic of C3RD is shown as follow:
| Dataset statistic | C3RD |
|---|---|
| Language | Chinese |
| Queries | 1,146 |
| Unique candidate documents | 92,656 |
| Query-document relations | 114,600 |
| Candidates per query | 100 |
| Relevant documents per query | 3–30 (11.43 on average) |
Background
Civil case retrieval presents unique challenges and opportunities. First, civil cases outnumber criminal cases, indicating a significant demand for their retrieval in real-world applications. Secondly, civil cases are inherently more complex to retrieve civil cases. Unlike the clearer facts in criminal cases, civil cases often have muddled facts, as both parties emphasize favorable aspects. Last but not least, there are no publicly available datasets for civil case retrieval. Hence, our proposed Chinese Civil Case Retrieval Dataset(C3RD) aims to fill this void. C3RD comprises 1146 queries, and each query has 100 candidate civil case documents.
The details of construction
To construct the C3RD dataset, we collect over 23 million civil case documents from China Judgements Online website, a resource published by the Supreme People's Court of China.
For a case document, fact section is typically presented by plaintiffs and defendants. Reasoning section is summarized by judges and involves the extraction of key elements. Judgement section is the final decision made by the court. These elements are distinctly partitioned in the documents and exhibit clear features. These divisions are pre-defined with regular expression matching during data collection. For example, reasoning section is split by specific markers 'The court believes that ...' and judgement section is split by 'The judgement is as follows: ...'. For label of referenced law articles, the extraction processing can be found in our source code.
Next, we proceeded to refine the corpus by applying a filtering process. The intent was to exclude cases that might be considered too brief or excessively lengthy. In addition, we discarded cases that had been withdrawn in order to focus on cases that had proceeded to full legal resolution.
After pre-processing, 8 million civil case documents are left. For retrieval purposes, we developed a criterion to identify relevant cases. According to a guidance document about relevant case retrieval published by the Supreme People's Court of China, a relevant case is defined as a case that shares similarities with a query case in aspects such as facts, cause reason and application of law articles. Based on this guidance, we design heuristic rules to filter cases related to the query. Specifically, we deem cases with the same legal cause reason and references to specific law articles as relevant cases.
We then randomly select the fact section of a case to serve as a query and remove that case from the pool of relevant candidates. Lastly, we adopted BM25 to search for negative candidates to complete the candidate pools. In this process, we apply several filtering methods to ensure the identified cases aren't related to the query. These measures are put in place to maximize the likelihood that the selected cases differ considerably from the query.
Finally, C3RD comprises 1146 queries, and each query has 100 candidate civil case documents.
Usage
The original per-query JSON release remains available from the MileCut Repo. This repository contains the normalized Hugging Face version described below.
from datasets import load_dataset
repo_id = "yefd/C3RD"
queries = load_dataset(repo_id, "queries", split="train")
documents = load_dataset(repo_id, "documents", split="train")
candidates = load_dataset(repo_id, "candidates", split="train")
print(queries)
print(documents)
print(candidates)
Expected row counts:
queries: 1,146
documents: 92,656
candidates: 114,600
Hugging Face dataset format
The original release stores one JSON file per query, with the candidate pool under ctxs and relevant candidate positions under gt_idx. This repository uses sharded, gzip-compressed JSON Lines and exposes three Hugging Face configurations so that large case documents are stored only once.
C3RD/
├── README.md
├── data/
│ ├── queries/
│ │ └── train-00000-of-00001.jsonl.gz
│ ├── documents/
│ │ └── train-00000-of-00010.jsonl.gz ...
│ └── candidates/
│ └── train-00000-of-00003.jsonl.gz ...
The original dataset does not provide an official train/validation/test partition. The train split in each configuration is only a Hugging Face container for the complete dataset; it should not be interpreted as an official training split.
queries configuration
Each row represents one retrieval query.
| Field | Type | Description |
|---|---|---|
query_id |
int64 |
Query identifier; equivalent to the original q_i. |
query |
string |
Fact section used as the retrieval query. |
query_case |
struct |
Full structured case from which the query was drawn. |
relevant_candidate_indices |
list[int64] |
Relevant positions in the 100-document candidate list; equivalent to gt_idx. |
relevant_case_ids |
list[string] |
Relevant document IDs resolved from the original indices. |
Example:
{
"query_id": 0,
"query": "原告彭正坤诉称,2018年1月29日……",
"query_case": {"case_id": "b70c33cebbff4e92845dac32017d02b7", ...},
"relevant_candidate_indices": [4, 28, 32, 37, 51, 57, 63, 98],
"relevant_case_ids": ["...", "..."],
}
documents configuration
Each row is one candidate civil case. Candidate documents are deduplicated by CaseId; the 114,600 original candidate occurrences correspond to 92,656 unique documents. All repeated records with the same ID were verified to contain identical data before deduplication.
| Field | Original field | Type | Description |
|---|---|---|---|
case_id |
CaseId |
string |
Unique case/document identifier. |
case_title |
Case |
string |
Case title. |
case_causes |
CaseCause |
list[string] |
Causes of action. |
procedure |
CaseProc |
string |
Judicial procedure. |
case_record |
CaseRecord |
string or null |
Procedural record. |
case_type |
CaseType |
string |
Case type. |
categories |
Category |
list[struct] |
First-level category, second-level category, and case cause. |
facts |
JudgeAccusation |
string |
Fact and allegation section. |
reasoning |
JudgeReason |
string |
Court reasoning. |
judgment |
JudgeResult |
string or null |
Judgment result. |
keywords |
Keywords |
list[string] |
Case keywords. |
legal_basis |
LegalBasis |
list[struct] |
Referenced laws and articles. |
parties |
Parties |
list[struct] |
Party names, entity types, and roles. |
Nested field names are normalized as follows:
Category.cat_1→categories.level_1Category.cat_2→categories.level_2LegalBasis.terms→legal_basis.articleParties.LegalEntity→parties.entity_typeParties.Prop→parties.role
Some original Parties values use a column-oriented list of one-key dictionaries. They are losslessly reconstructed into one structured object per party while preserving the original order.
candidates configuration
Each row represents one query-document relation. This table preserves the complete 100-document candidate pool and the original candidate positions.
| Field | Type | Description |
|---|---|---|
query_id |
int64 |
Foreign key to queries.query_id. |
candidate_index |
int64 |
Original candidate position, from 0 to 99. |
case_id |
string |
Foreign key to documents.case_id. |
relevance |
int64 |
Binary relevance label: 1 for relevant and 0 for non-relevant. |
The dataset contains 13,096 relevant and 101,504 non-relevant query-document relations.
Baseline
For evaluation, we implement several existing retrieval models on C3RD as baselines. This will provide a comprehensive view of the characteristics and its applicability for different retrieval methods. The results are shown in Table.
| Metrics | P@5 | P@10 | MAP@10 | NDCG@10 | NDCG@20 | NDCG@30 | MRR |
|---|---|---|---|---|---|---|---|
| BM25 | 0.5079 | 0.4146 | 0.4835 | 0.5642 | 0.5810 | 0.5993 | 0.6929 |
| BERT-Civil(dual, w/o training) | 0.5670 | 0.4773 | 0.7419 | 0.6235 | 0.6528 | 0.6841 | 0.7455 |
| BERT-Chinese(dual) | 0.7108 | 0.6231 | 0.6999 | 0.7786 | 0.8208 | 0.8451 | 0.8149 |
| BERT-Civil(dual) | 0.7732 | 0.6736 | 0.7905 | 0.8546 | 0.8813 | 0.8978 | 0.8788 |
| BERT-Civil(cross) | 0.7609 | 0.6355 | 0.7682 | 0.8406 | 0.8669 | 0.8863 | 0.9137 |
In the table, dual and cross denote dual encoder and cross encoder, respectively.
@inproceedings{ye2024milecut,
title = {MileCut: A Multi-view Truncation Framework for Legal Case Retrieval},
author = {Ye, Fuda and Li, Shuangyin},
booktitle = {Proceedings of the ACM Web Conference 2024},
year = {2024},
doi = {10.1145/3589334.3645349}
}