Datasets:
Update README.md
#2
by PBuakhaw - opened
README.md
CHANGED
|
@@ -21,67 +21,6 @@ configs:
|
|
| 21 |
data_files: labels.jsonl
|
| 22 |
---
|
| 23 |
|
| 24 |
-
# Deka retrieval
|
| 25 |
-
|
| 26 |
-
A legal case retrieval (LCR) benchmark on Thai Supreme Court decisions (คำพิพากษาฎีกา, *deka*):
|
| 27 |
-
given a case, retrieve the prior cases that bear on it out of the full 9,998-case pool. Thailand
|
| 28 |
-
is a civil-law jurisdiction, so relevance is defined over case components — charge, facts, issue,
|
| 29 |
-
outcome — rather than citation links between judgments, and that criterion is what yields the four
|
| 30 |
-
label quadrants below. Candidates were mined with a dense retriever and adjudicated by an LLM
|
| 31 |
-
judge, and every anchor carries three query registers. Anonymous release accompanying a paper
|
| 32 |
-
under review.
|
| 33 |
-
|
| 34 |
-
## Files
|
| 35 |
-
|
| 36 |
-
| file | rows | schema |
|
| 37 |
-
|---|---|---|
|
| 38 |
-
| `corpus.jsonl` | 9,998 | `_id`, `deka_code`, `long_text`, `metadata{deka_no, year, fact, reasoning, laws, crimes, case_type, case_type_group, issue, decision}` |
|
| 39 |
-
| `queries.jsonl` | 1,381 | `_id`, `long_text`, `lay_query`, `lawyer_query`, `metadata{…, split}` |
|
| 40 |
-
| `labels.jsonl` | 1,381 | `query_id`, `deka`, `split`, `mined`, `easy_pos[]`, `hard_pos[]`, `hard_neg[]`, `easy_neg[]`, `anomaly[]` |
|
| 41 |
-
|
| 42 |
-
Every entry in a label list is `{candidate_id, deka, score, why, mining_query}` — `candidate_id`
|
| 43 |
-
joins to `corpus._id`, `mining_query` records which query text surfaced that candidate.
|
| 44 |
-
|
| 45 |
-
## Query registers
|
| 46 |
-
|
| 47 |
-
Each anchor carries three usable query forms, which retrieve very differently:
|
| 48 |
-
|
| 49 |
-
- `lay_query` — how a layperson would describe the situation (short, non-technical)
|
| 50 |
-
- `lawyer_query` — how a lawyer would phrase it (statutory language)
|
| 51 |
-
- `metadata.fact` — the case's own fact section, i.e. the symmetric case-to-case setting
|
| 52 |
-
|
| 53 |
-
## Splits
|
| 54 |
-
|
| 55 |
-
`labels.jsonl` is authoritative. Anchors are split `train` 1,176 / `eval` 100 / `test` 105.
|
| 56 |
-
|
| 57 |
-
**Excluded:** 191 anchors marked `keep_test` are not part of this release. In `queries.jsonl`,
|
| 58 |
-
100 rows whose `metadata.split` disagreed with `labels.jsonl` have been corrected to the label
|
| 59 |
-
value, so the two files now agree row for row.
|
| 60 |
-
|
| 61 |
-
The 9,998-case corpus is untouched and shared by every split.
|
| 62 |
-
|
| 63 |
-
## Heuristic case criteria
|
| 64 |
-
|
| 65 |
-
- `easy_pos` — same charge, same decision outcome
|
| 66 |
-
- `hard_pos` — same charge, different outcome
|
| 67 |
-
- `hard_neg` — retrieved as similar, judged not relevant
|
| 68 |
-
- `easy_neg` — clearly unrelated
|
| 69 |
-
- `anomaly` — candidates the judge could not place cleanly; not relevant by default
|
| 70 |
-
|
| 71 |
-
Roughly one candidate per list per anchor (1,401 entries per list across 1,381 anchors);
|
| 72 |
-
175 anchors have no `anomaly` entry.
|
| 73 |
-
|
| 74 |
-
## Caveats
|
| 75 |
-
|
| 76 |
-
- Positives are **mined, not exhaustively annotated**. A case absent from `easy_pos`/`hard_pos`
|
| 77 |
-
is not certified irrelevant, so recall computed on this data is a lower bound.
|
| 78 |
-
- Judgements come from an LLM judge over retrieved candidates; they inherit both the retriever's
|
| 79 |
-
blind spots and the judge's.
|
| 80 |
-
- `issue[]` and `decision` were extracted from `long_text` by rule, not by hand.
|
| 81 |
-
- Decisions are published court documents, but they name parties and describe offences — treat
|
| 82 |
-
the text as sensitive and do not use it to profile individuals.
|
| 83 |
-
- Absolute retrieval quality is low (best dense R@10 ≈ 31 on fact queries); this is a research
|
| 84 |
-
bed, not a solved task.
|
| 85 |
|
| 86 |
## Loading
|
| 87 |
|
|
@@ -91,6 +30,4 @@ from datasets import load_dataset
|
|
| 91 |
corpus = load_dataset("anonymousresearch123/deka-retrieval", "corpus", split="train")
|
| 92 |
queries = load_dataset("anonymousresearch123/deka-retrieval", "queries", split="train")
|
| 93 |
labels = load_dataset("anonymousresearch123/deka-retrieval", "labels", split="train")
|
| 94 |
-
``
|
| 95 |
-
|
| 96 |
-
Each config is a single file; filter `metadata.split` / `split` for train / eval / test.
|
|
|
|
| 21 |
data_files: labels.jsonl
|
| 22 |
---
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
## Loading
|
| 26 |
|
|
|
|
| 30 |
corpus = load_dataset("anonymousresearch123/deka-retrieval", "corpus", split="train")
|
| 31 |
queries = load_dataset("anonymousresearch123/deka-retrieval", "queries", split="train")
|
| 32 |
labels = load_dataset("anonymousresearch123/deka-retrieval", "labels", split="train")
|
| 33 |
+
``
|
|
|
|
|
|