Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,99 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pretty_name: C
|
| 6 |
---
|
| 7 |
+
# Dataset Card for CanLegalRAGBench
|
| 8 |
+
|
| 9 |
+
A dataset for Canadian lase law RAG task
|
| 10 |
+
|
| 11 |
+
This dataset contains mainly case law from different Canadian sources and very few legislations.
|
| 12 |
+
The queries are designed to mimic real questions from assorted users of an AI chatbot.
|
| 13 |
+
The queries were generated via Gemini-2.5-Pro and a sample was verified by an industry expert.
|
| 14 |
+
|
| 15 |
+
Case laws were gathered via expert human annotators for ground truth retrieval.
|
| 16 |
+
We supplement Case law through the A2AJ Canadian Legal Dataset (https://huggingface.co/datasets/a2aj/canadian-case-law)
|
| 17 |
+
and from private documenents provided by CasewayAI
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
## Dataset Details
|
| 21 |
+
|
| 22 |
+
### Dataset Description
|
| 23 |
+
|
| 24 |
+
<!-- Provide a longer summary of what this dataset is. -->
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
- **Curated by:** [UBC NLP Lab]
|
| 29 |
+
- **Funded by [Mitacs, Caseway]:** [This project was funded by a Mitacs/Caseway collaboration to improve access to Canadian Justice]
|
| 30 |
+
- **Language(s) (NLP):** [English, some French in English documents]
|
| 31 |
+
- **License:** [The code and dataset annotations for this project and other works developed from it are subject to an open source MIT license. Retrieval Document source texts are subject to their own source's license ]
|
| 32 |
+
|
| 33 |
+
### Dataset Sources [optional]
|
| 34 |
+
|
| 35 |
+
<!-- Provide the basic links for the dataset. -->
|
| 36 |
+
|
| 37 |
+
- **Code Repository:** [Coming soon]
|
| 38 |
+
- **Paper :** [Coming soon on arxiv]
|
| 39 |
+
|
| 40 |
+
## Uses
|
| 41 |
+
|
| 42 |
+
This dataset is intended to be used for research into developing AI systems that improve justice.
|
| 43 |
+
We provide legal queries and their ground truth documents that should be retrieved to help answer the query.
|
| 44 |
+
We also provide answers generated by an LLM and edited/verified by expert annotators using the ground truth documents as context for the LLM.
|
| 45 |
+
This allows evaluation of retrieval as well as text generation for answering legal queries.
|
| 46 |
+
The answers are not all complete as they are based off retrieved documents that were gathered under a time budget.
|
| 47 |
+
When they are not complete, they hedge what information is missing from the documents.
|
| 48 |
+
|
| 49 |
+
Each unique source has a separate license, generally quite liberal for research. For commercial applications, the licenses are stricter than for research.
|
| 50 |
+
Make sure to contact each court for commercial purposes.
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
### Out-of-Scope Use
|
| 54 |
+
|
| 55 |
+
The dataset is not intended for use as an absolute benchmark. It is indended to be used for comparative evaluation.
|
| 56 |
+
If methods obtain high scores, that does not mean they should be relied on for legal analysis and professional work.
|
| 57 |
+
All work should be verified by legal professionals before being submitted under official legal processes.
|
| 58 |
+
|
| 59 |
+
## Dataset Structure
|
| 60 |
+
|
| 61 |
+
The retrieval documents have fields: \['citation', 'name', 'original_source', 'year', 'text', 'url',
|
| 62 |
+
'upstream_license', 'is_ground_truth', 'dataset_source',
|
| 63 |
+
'ground_truth_query_ids'\]
|
| 64 |
+
- The 'name' is generally the name of the case. They are generally standardized but due to human annotation as well as diverse sources, formats diverge.
|
| 65 |
+
- The 'original_source' the source of the document's text (court, tribunal, etc)
|
| 66 |
+
- The 'year' is the year the document was published
|
| 67 |
+
- The 'text' is the unofficial main text of the document.
|
| 68 |
+
- The 'url' is the url where you can view the document from an official website. Generally filled, some are missing.
|
| 69 |
+
- The 'upstream_license' is the license provided by the A2AJ dataset if provided.
|
| 70 |
+
- The 'is_ground_truth' determines if the document has a query that it is a ground truth retrieval document for.
|
| 71 |
+
- The 'dataset_source' is one of \['annotator', 'canadian-case-law', 'caseway'\] which mean that we either got the document from our human annotators, the A2AJ CLD or Caseway respectively.
|
| 72 |
+
- The 'ground_truth_query_ids' is all the query ids that the document is a ground truth retrieval document for.
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
The queries have fields: \['query_id', 'query_text', 'answer', 'batch_id',
|
| 76 |
+
'ground_truth_citations', 'province'\]
|
| 77 |
+
- The query_id is the unique id of the query (not ordered due to filtering)
|
| 78 |
+
- The query_text is text of the query
|
| 79 |
+
- The answer is the human submitted answer to the query text
|
| 80 |
+
- The batch_id is the id of the batch of 8 which the query corresponds to. Each batch has very similar facts and retrieved documents
|
| 81 |
+
- The ground_truth_citations is the list of documents that are the ground truth documents to retrieve
|
| 82 |
+
- The province is the province jurisdiction context under which the ground truth documents were retrieved under
|
| 83 |
+
|
| 84 |
+
## Dataset Creation
|
| 85 |
+
|
| 86 |
+
Details of the dataset creation are detailed in our paper \[coming soon\]
|
| 87 |
+
|
| 88 |
+
#### Who are the annotators?
|
| 89 |
+
|
| 90 |
+
We employed senior legal students and a paralegal for data annotation
|
| 91 |
+
|
| 92 |
+
#### Personal and Sensitive Information
|
| 93 |
+
|
| 94 |
+
We only provided personal information that was already publicized in the published documents. We do not make previously non public information public.
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
## Dataset Card Contact
|
| 98 |
+
|
| 99 |
+
contact ethan.zhao@ubc.ca for questions or inquiries
|