Datasets:

Modalities:
Text
Formats:
json
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:
File size: 5,900 Bytes
ca4cb7c
 
873660c
2447a86
873660c
2447a86
873660c
2447a86
873660c
2447a86
873660c
2447a86
ca4cb7c
0c3247d
 
 
 
 
 
 
 
 
 
 
ca4cb7c
0c3247d
873660c
 
dd199f3
 
 
 
 
 
 
873660c
dd199f3
873660c
 
 
 
081092b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
configs:
- config_name: crag_task_1_and_2_subsample_1
  data_files: crag_task_1_and_2/crag_task_1_and_2_dev_v4_subsample_cdf90925.jsonl.bz2
- config_name: crag_task_1_and_2_subsample_2
  data_files: crag_task_1_and_2/crag_task_1_and_2_dev_v4_subsample_2e617280.jsonl.bz2
- config_name: crag_task_1_and_2_subsample_3
  data_files: crag_task_1_and_2/crag_task_1_and_2_dev_v4_subsample_9bca9871.jsonl.bz2
- config_name: crag_task_1_and_2_subsample_4
  data_files: crag_task_1_and_2/crag_task_1_and_2_dev_v4_subsample_ff5aa423.jsonl.bz2
- config_name: crag_task_1_and_2_subsample_5
  data_files: crag_task_1_and_2/crag_task_1_and_2_dev_v4_subsample_3f4353ba.jsonl.bz2
license: cc-by-nc-4.0
task_categories:
- question-answering
- summarization
language:
- en
tags:
- music
- finance
size_categories:
- 1K<n<10K
pretty_name: CRA
---

Datasets are taken from Facebook's [CRAG: Comprehensive RAG Benchmark](https://github.com/facebookresearch/CRAG), see their [arXiv paper](https://arxiv.org/abs/2406.04744) for details about the dataset construction.

CRAG (Comprehensive RAG Benchmark) is a rich and comprehensive factual question answering benchmark designed to advance research in RAG. The public version of the dataset includes:
- 2706 Question-Answer pairs
- 5 domains: Finance, Sports, Music, Movie, and Open domain
- 8 types of questions (see image below): simple, simple with condition, set, comparison, aggregation, multi-hop, post-processing heavy, and false premise

![](figs/CRAG_table_2.png)

The datasets `crag_task_1_and_2_dev_v4_subsample_*.json.bz2` have been created from the dataset [crag_task_1_and_2_dev_v4.jsonl.bz2](https://github.com/facebookresearch/CRAG/raw/refs/heads/main/data/crag_task_1_and_2_dev_v4.jsonl.bz2?download=) available on CRAG's GitHub repository. 
For an easier handling and download of the dataset, we have used the script [crag_to_subsamples.py](https://huggingface.co/datasets/Quivr/crag/blob/main/crag_to_subsamples.py) to split the 2706 rows of the original file in 5 subsamples, following the procedure below: 
1. We have created a new label `answer_type`, classifying the answers in 3 categories:
      - `invalid` for any answer == "invalid question"
      - `no_answer` for any answer == "i don't know"
      - `valid` for any other answer
2. We have considered the labels `answer_type`, `domain`, `question_type` and `static_or_dynamic` and performed stratified sampling, splitting the datasets in 5 subsamples. Each subsample has thus the same statistical properties of the full dataset.

We report below the data schema as provided in [CRAG's GitHub repository](https://github.com/facebookresearch/CRAG/blob/main/docs/dataset.md).

## Data Schema

| Field Name             | Type          | Description                                                                                                                                                           |
|------------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `interaction_id`       | string        | A unique identifier for each example.                                                                                                                                |
| `query_time`           | string        | Date and time when the query and the web search occurred.                                                                                                            |
| `domain`               | string        | Domain label for the query. Possible values: "finance", "music", "movie", "sports", "open". "Open" includes any factual queries not among the previous four domains. |
| `question_type`        | string        | Type label about the query. Possible values include: "simple", "simple_w_condition", "comparison", "aggregation", "set", "false_premise", "post-processing", "multi-hop".      |
| `static_or_dynamic`    | string        | Indicates whether the answer to a question changes and the expected rate of change. Possible values: "static", "slow-changing", "fast-changing", and "real-time".    |
| `query`                | string        | The question for RAG to answer.                                                                                                                                       |
| `answer`               | string        | The gold standard answer to the question.                                                                                                                             |
| `alt_ans`  | list        | Other valid gold standard answers to the question.                                                                                                                    |
| `split`                | integer       | Data split indicator, where 0 is for validation and 1 is for the public test.                                                                                         |
| `search_results`       | list of JSON  | Contains up to `k` HTML pages for each query (`k=5` for Task #1 and `k=50` for Task #3), including page name, URL, snippet, full HTML, and last modified time.         |

### Search Results Detail

| Key                  | Type   | Description                                             |
|----------------------|--------|---------------------------------------------------------|
| `page_name`          | string | The name of the webpage.                                |
| `page_url`           | string | The URL of the webpage.                                 |
| `page_snippet`       | string | A short paragraph describing the major content of the page. |
| `page_result`        | string | The full HTML of the webpage.                           |
| `page_last_modified` | string | The time when the page was last modified.               |