Skip to content
RAG Repo

Cambridge Law Corpus

The Cambridge Law Corpus gathers more than 250,000 UK court cases into a single dataset built for legal natural language processing, the work of getting software to read, classify, and reason over legal text. Most of the cases are from the 21st century, but the collection reaches back several centuries, with some material from as far back as the 16th century, which gives it unusual historical depth for a machine-readable legal corpus. Alongside the raw case text it includes annotations such as case outcomes, produced to support research tasks like outcome prediction.

Access is restricted rather than open. The corpus is released for research use, so you will need to go through the University of Cambridge's process, agree to its terms, and typically demonstrate an academic or research purpose before you can download it. The accompanying paper on arXiv (2309.12269) documents how the cases were collected, cleaned, and annotated, and is worth reading first to understand the coverage and its gaps.

For RAG, think of this as an evaluation and research corpus rather than something to drop into a production system. It is well suited to building and testing UK case-law retrieval, benchmarking legal embedding models, or studying how models handle legal language over time. The restricted licence means it is not a fit for a commercial product: the terms limit use to research, so any commercial legal RAG system will need a differently licensed source of primary law.

For that, treat the Cambridge Law Corpus as the research-grade counterpart to freely readable services like BAILII and the National Archives' Find Case Law. Those give you live, citable primary text for a working system; the Cambridge corpus gives you a curated, annotated, historically deep collection to develop and measure your methods against before you point them at production data.

ukcase-lawlegalacademicrestricted-access

Related sources