--- license: mit language: - en - de - fr - it - es - pt - hy - ka - ne - sr - zh - fil - nl pretty_name: "LEGEX Inference Results: 4 Systems, 6 Runs on 19 Jurisdictions" size_categories: - 1K/inference_harvey.jsonl data//inference_harvey_2.jsonl data//inference_gemini.jsonl data//inference_gpt.jsonl data//inference_legora_1.jsonl data//inference_legora_2.jsonl prompts/prompts_harvey.jsonl prompts/prompts_harvey_2.jsonl prompts/prompts_legora_1.jsonl prompts/prompts_legora_2.jsonl ``` The `prompts/` files hold the per-column prompts as run, one record per (run, field): `model`, `inference_date`, `field`, `prompt`. ### Record schema Each record corresponds to one (judgment, system) pair: | Key | Type | Description | |---|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `case_id` | string | Identifier matching the goldenset `case_id`. | | `link` | string \| null | URL to the original judgment. | | `legal_subject_judgement` … `defendant_no1_ISIC1_industry_category` | string \| null | The 14 extracted fields, same schema as the goldensets. All values are strings (numbers as digit strings) so every column is single-typed, this fixes the `ArrowInvalid` load failure of the first CSV release. | | `model` | string | Model identifier emitted by the inference pipeline (see table above). | | `inference_date` | string | The date the producing run was executed/exported (e.g. `2026-08-01` for both Legora runs; `2026-05-18`/`2026-06-30` for Harvey), so run variants remain traceable per record. | | `error` | string \| null | Non-empty only if the model call failed for that case. | | `comment` | string \| null | Human-readable note listing every value changed during cleaning; `null` when the record needed no change. | | `original_input` | string | JSON object mapping each cleaned field to its 1:1 pre-cleaning value; `"{}"` when nothing changed. | See [goldensets](https://huggingface.co/datasets/legexbenchmark/goldensets) for a description of the data columns. ## Cleaning Long-form refusals ("…the date is not stated … N/A") and prose/citations by the model not following instructions were removed or standardized via a two-step, human-reviewed pipeline (`legex-refusals-scan` > review > `legex-refusals-apply`, see the [code repo](https://huggingface.co/datasets/legexbenchmark/code)). Every change is recorded per record in `comment` / `original_input`, so the raw model output can always be reconstructed. ## Coverage and known limitations - Only 15 of Spain's 129 annotated judgments have Harvey output (the ingest of the remaining case packets failed before the 2026-06-30 export and was not re-run); evaluation counts each system only on the judgments it actually produced output for, and reports per-system denominators. - Hong Kong `case_id`s that were shared by two different documents (one CFA case number covering e.g. a substantive judgment and a costs ruling) are disambiguated with the source document id, e.g. `FACV12/2022-DIS154422`, matching the goldensets release. - Inference ran on the full sampled case packets (up to 130 cases per jurisdiction), so files can contain more cases than the goldenset has expert-reviewed rows. Evaluation joins on `case_id` against the goldenset. - Some Harvey exports are partial: `es` has 15 rows, `np` 108, `ph` 115, `hk` 116, `rs` 126, `au` 128, `de` 129, all other files have 130. The `harvey_2` run shares most of these gaps: `es` 15, `hk` 102, `ph` 115, `rs` 126, `de` 129, all other files 130. - Legora returned empty review tables for Armenia (`am`), Georgia (`ge`), and most Nepalese (`np`) judgments — the rows exist but their fields are empty (Legora appears not to support non-Latin scripts). Evaluation counts each system only on the judgments it actually answered. Legora `hk` files have 116 rows. - For Switzerland, `gemini` and `gpt` emit `case_id`s with different separators than the goldenset (e.g. `4A_426/2024` vs `4A-426-2024`), join after normalising separators. - A few files contain duplicate `case_id` rows. ## Loading ```python import pandas as pd # One (jurisdiction, system) pair df = pd.read_json( "hf://datasets/legexbenchmark/inference-results/data/us/inference_gpt.jsonl", lines=True, ) ``` or with the `datasets` library (one config per system): ```python from datasets import load_dataset ds = load_dataset("legexbenchmark/inference-results", "harvey", split="switzerland") ds = load_dataset("legexbenchmark/inference-results", "gpt", split="united_states") ds = load_dataset("legexbenchmark/inference-results", "legora_1", split="switzerland") ``` To compare against the gold annotations, join on `case_id` after loading the matching split from [`legexbenchmark/goldensets`](https://huggingface.co/datasets/legexbenchmark/goldensets). ## License MIT.