Cambridge Law Corpus
The Cambridge Law Corpus gathers over 250,000 UK court cases into a single dataset built for studying legal language and testing legal natural language processing, the task of getting software to read and reason over legal text. The bulk of the cases are recent, but the collection stretches back several centuries, giving it unusual historical depth.
Access is restricted. The corpus is released for research use rather than open download, so you will need to go through the University of Cambridge's process and agree to its terms before you can work with it. The accompanying paper on arXiv describes how the data was collected and annotated.
For RAG, it is most useful as a research and evaluation corpus for UK case law, rather than a source you can drop straight into a production system.
Related sources
EDGAR (SEC Filings)
The US Securities and Exchange Commission's repository of corporate filings, including annual reports (10-K), quarterly reports (10-Q), current reports (8-K), and proxy statements. You can search the full text or pull filings in bulk through an API, which makes it a rich source for financial and regulatory RAG.
EUR-Lex
The official portal for European Union law. It provides EU treaties, legislation, case law, and legislative proposals in 24 languages, with bulk download available. A dependable source for multilingual legal and regulatory RAG across the EU.
Free Law Project / CourtListener
The largest open collection of US court opinions, oral argument recordings, and judicial financial disclosures, run by the nonprofit Free Law Project. Its RECAP Archive holds hundreds of millions of federal court docket entries, and journalists at the Wall Street Journal and ProPublica have used it for investigations. A solid base for US legal RAG.
Legislation.gov.uk
The official UK government legislation database, holding all UK Acts of Parliament and statutory instruments. It is available as XML and linked data, so you can load the full statute book into a RAG system rather than scraping individual pages.