Datasets:
license: cc0-1.0
language:
- da
task_categories:
- text-retrieval
pretty_name: CRAwLeR-DK — Cross-Reference Aware Legal Retrieval (Danish)
tags:
- legal
- danish
- information-retrieval
- contextual-retrieval
- cross-reference
size_categories:
- n<1K
configs:
- config_name: chunks
data_files:
- split: test
path: chunks.jsonl
- config_name: contextual_queries
data_files:
- split: test
path: contextual_queries.jsonl
- config_name: augmented_chunks
data_files:
- split: test
path: augmented_chunks.jsonl
CRAwLeR-DK — Cross-Reference Aware Legal Retrieval (Danish)
CRAwLeR measures context-aware (contextual) chunk retrieval: specifically, legal cross-reference retrieval. To rank the right chunk, a retriever must use information from other chunks that the target chunk cross-references. This is the Danish instance, built on Danish legal documents from Retsinformation.
It is the first dataset for context-aware chunk retrieval to carefully consider construct validity and inspect results in the light of such a narrow, well-defined phenomenon. The paper is the source of truth — please read it before drawing conclusions from scores.
At a glance
| Language | Danish |
| Domain | Legal (Danish statutes, Retsinformation) |
| Documents | 7 |
| Chunks | ~7.7k |
| Queries (task items) | 158 |
| Task | Context-aware (cross-reference) chunk retrieval |
| License | CC0-1.0 |
Why it's interesting
- Hard, but not solved. Best Recall@10 is 0.55 (BGE-M3 dense); BM25 reaches 0.39.
- Hard for the right reason. Labelled context chunks outrank the target chunk in 21/24 cases (BM25) and 16/24 (BGE-M3) — retrievers get pulled toward the cross-referenced context, which is exactly what the task probes.
- The difficulty is real, not noise. In a manual audit, 24/28 sampled queries both require context and target the labelled chunk (95% CI 0.67–0.96), and ~70% of the unsolved queries are still high-quality — so the gap is not an artifact of broken items.
Scope caveat. Scores measure cross-reference-aware context utilization in legal documents only — not context-aware chunk retrieval in general. Interpret results in that light. The paper explains the construct-validity reasoning behind this narrow scope.
How it was built
Query candidates were generated with GPT-OSS-120B (medium reasoning effort), then put through two filters to maximise quality. Adversarial filtering removes any query whose target chunk was already ranked in the top 10 by BM25 or BGE-M3 (a non-contextual baseline). Query assurance is an LLM check that the query genuinely requires the context chunks and that the target chunk acts as its golden chunk. Together these remove ~95% of candidates (the large majority during adversarial filtering), leaving 158 queries. Full pipeline and prompts are in the paper.
Definitions
- Target chunk — the golden chunk for a query.
- Context chunk — a chunk cross-referenced by the target chunk.
- Implicit context — chunks that help to understand the context chunks and the target chunk.
Visualised:
A chunk corresponds to a stykke. Example:
For a retriever to rank the target chunk as positive for the query, it must take into account the utilized context chunks and the implicit context.
Files & fields
The dataset ships as three .jsonl files. chunk_id is the join key across all of them.
chunks.jsonl
The chunks from the documents.
| name | type | description |
|---|---|---|
chunk |
string |
chunk's content |
chunk_id |
string |
chunk's unique identifier |
chunk_idx |
int |
chunk's zero-indexed position in the document |
implicit_context_chunks |
list[string] |
chunk_ids of chunks that are implicit context for this chunk |
explicit_context_chunks |
list[string] |
chunk_ids of chunks that are explicit (cross-referenced) context for this chunk |
contextual_queries.jsonl
The dataset queries (task items).
| name | type | description |
|---|---|---|
chunk_id |
string |
target chunk's unique identifier |
query |
string |
the query; its golden chunk is the target chunk |
chunk |
string |
target chunk's content |
chunk_idx |
int |
target chunk's zero-indexed position in the document |
context_chunks |
string |
concatenated contents of all (explicit) context chunks of the target chunk |
impl_context_chunks |
string |
concatenated implicit context chunks of the target chunk |
utilized_context_chunk_ids |
list[string] |
ids of the subset of context chunks the query actually depends on |
augmented_chunks.jsonl {#augmented_chunks}
Context-augmented chunks for the baseline, built with Anthropic-style contextual retrieval. Prefixes (contextual texts) were generated with Qwen/Qwen3-235B-A22B-Instruct-2507-FP8 (temperature = 0).
| name | type | description |
|---|---|---|
chunk_id |
string |
chunk's id |
chunk |
string |
prefix (contextual text), then \n\n, then the chunk's original content |
Baseline results
Anthropic-style contextual retrieval (the augmented_chunks). Recall@k is the fraction of the 158 queries whose target chunk appears in the top k, over the contextualised index.
| Metric | BM25 | BGE-M3 (dense) |
|---|---|---|
| R@1 | 0.051 | 0.165 |
| R@5 | 0.266 | 0.443 |
| R@10 | 0.392 | 0.551 |
Failure analysis attributes most of the remaining gap to the contextualising LLM rather than the retriever, and even when the target is retrieved, labelled context chunks routinely outrank it. Details in the paper.
Usage
The three files load as separate configs. Each query's gold target is the chunk whose chunk_id equals the query's chunk_id.
import datasets
REPO = "<hf-username>/CRAwLeR-DK" # replace with the dataset repo id
queries = datasets.load_dataset(REPO, "contextual_queries", split="test") # 158 task items
corpus = datasets.load_dataset(REPO, "augmented_chunks", split="test") # baseline index
# for a non-contextual baseline, retrieve over the raw "chunks" config instead
q = queries[0]
print(q["query"]) # the query text
print(q["chunk_id"]) # id of the gold target chunk to retrieve
For analysis, utilized_context_chunk_ids and context_chunks give the context each query actually depends on.
The metric is Recall@k — whether the gold target chunk appears in the top k (one gold chunk per query). To reproduce the paper's BM25 and BGE-M3 baselines over augmented_chunks, use the evaluation harness (lcr/cli/eval.py, --encoder flag / --encoder bm25) in the code repo.
Citation
If you find this dataset useful, please consider giving a star / like and a citation.
@misc{jalocha2026crawlercrossreferenceaware,
title={CRAwLeR -- Cross-Reference Aware Legal Retrieval},
author={Maciej Jalocha and William Michelsen},
year={2026},
eprint={2606.21676},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2606.21676},
}
References
- CRAwLeR — Cross-Reference Aware Legal Retrieval (arXiv)
- Retsinformation (source documents)
- Anthropic-style contextual retrieval
Appendix — source documents
Act on Public Housing, The Children's Act, The Social Services Act, The Financial Statements Act, The Commercial Foundations Act, The Companies Act, and The Danish Penal Code.