Update dataset card for CRAG-MM multi-turn v0.1.2 (master)
Browse files
README.md
CHANGED
@@ -1,85 +1,5 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
- config_name: default
|
4 |
-
data_files:
|
5 |
-
- split: validation
|
6 |
-
path: data/validation-*
|
7 |
-
- split: public_test
|
8 |
-
path: data/public_test-*
|
9 |
-
dataset_info:
|
10 |
-
features:
|
11 |
-
- name: session_id
|
12 |
-
dtype: string
|
13 |
-
- name: image
|
14 |
-
dtype: image
|
15 |
-
- name: image_url
|
16 |
-
dtype: string
|
17 |
-
- name: turns
|
18 |
-
sequence:
|
19 |
-
- name: interaction_id
|
20 |
-
dtype: string
|
21 |
-
- name: domain
|
22 |
-
dtype:
|
23 |
-
class_label:
|
24 |
-
names:
|
25 |
-
'0': animal
|
26 |
-
'1': other
|
27 |
-
'2': shopping
|
28 |
-
'3': book
|
29 |
-
'4': general object recognition
|
30 |
-
'5': local
|
31 |
-
'6': vehicle
|
32 |
-
'7': plants and gardening
|
33 |
-
'8': style and fashion
|
34 |
-
'9': food
|
35 |
-
'10': text understanding
|
36 |
-
'11': sports and games
|
37 |
-
'12': math and science
|
38 |
-
- name: query_category
|
39 |
-
dtype:
|
40 |
-
class_label:
|
41 |
-
names:
|
42 |
-
'0': reasoning
|
43 |
-
'1': simple-knowledge
|
44 |
-
'2': comparison
|
45 |
-
'3': simple-recognition
|
46 |
-
'4': multi-hop
|
47 |
-
'5': aggregation
|
48 |
-
- name: dynamism
|
49 |
-
dtype:
|
50 |
-
class_label:
|
51 |
-
names:
|
52 |
-
'0': fast-changing
|
53 |
-
'1': static
|
54 |
-
'2': slow-changing
|
55 |
-
'3': real-time
|
56 |
-
- name: query
|
57 |
-
dtype: string
|
58 |
-
- name: image_quality
|
59 |
-
dtype:
|
60 |
-
class_label:
|
61 |
-
names:
|
62 |
-
'0': rotated
|
63 |
-
'1': truncated
|
64 |
-
'2': occluded
|
65 |
-
'3': low light
|
66 |
-
'4': blurred
|
67 |
-
'5': normal
|
68 |
-
- name: answers
|
69 |
-
sequence:
|
70 |
-
- name: interaction_id
|
71 |
-
dtype: string
|
72 |
-
- name: ans_full
|
73 |
-
dtype: string
|
74 |
-
splits:
|
75 |
-
- name: validation
|
76 |
-
num_bytes: 867851844.0
|
77 |
-
num_examples: 586
|
78 |
-
- name: public_test
|
79 |
-
num_bytes: 813099225.0
|
80 |
-
num_examples: 587
|
81 |
-
download_size: 1677258759
|
82 |
-
dataset_size: 1680951069.0
|
83 |
---
|
84 |
# CRAG-MM: Comprehensive multi-modal, multi-turn RAG Benchmark
|
85 |
|
@@ -111,10 +31,10 @@ You can easily load and explore the dataset using the Hugging Face `datasets` li
|
|
111 |
from datasets import load_dataset
|
112 |
|
113 |
# For single-turn dataset
|
114 |
-
dataset = load_dataset("crag-mm-2025/crag-mm-single_turn-public", revision="v0.1.
|
115 |
|
116 |
# For multi-turn dataset
|
117 |
-
dataset = load_dataset("crag-mm-2025/crag-mm-multi_turn-public", revision="v0.1.
|
118 |
|
119 |
# View available splits
|
120 |
print(f"Available splits: {', '.join(dataset.keys())}")
|
@@ -135,6 +55,29 @@ import matplotlib.pyplot as plt
|
|
135 |
plt.imshow(example['image'])
|
136 |
```
|
137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
139 |
## Example Visualization
|
140 |
|
@@ -146,11 +89,12 @@ def _prepare_feature_vocabularies(dataset_split):
|
|
146 |
|
147 |
These vocabularies allow conversion between integer indices and string labels.
|
148 |
"""
|
|
|
149 |
return {
|
150 |
-
"domain":
|
151 |
-
"query_category":
|
152 |
-
"dynamism":
|
153 |
-
"image_quality":
|
154 |
}
|
155 |
|
156 |
|
@@ -172,41 +116,48 @@ def print_conversation(example: Dict[str, Any], feature_vocabularies: Dict[str,
|
|
172 |
When the actual image cannot be included, only the image_url will be available.
|
173 |
The evaluation servers will nevertheless always include the loaded 'image' field.
|
174 |
"""
|
175 |
-
image_quality_str = feature_vocabularies["image_quality"].int2str(example['image_quality'])
|
176 |
-
print(f"Image Quality: {image_quality_str}")
|
177 |
|
178 |
-
# Determine if single-turn or multi-turn
|
179 |
-
|
180 |
-
|
|
|
181 |
|
182 |
# Create answer lookup dictionary if answers exist
|
183 |
answer_lookup = {}
|
184 |
if 'answers' in example and example['answers'] is not None:
|
185 |
-
answer_lookup = {
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
|
187 |
# Print each turn
|
188 |
print("\nConversation:")
|
189 |
-
for i
|
190 |
# For multi-turn, show turn number
|
191 |
if not is_single_turn:
|
192 |
print(f"\tTurn {i+1}:")
|
193 |
|
194 |
# Convert metadata to string representations
|
195 |
-
domain_str = feature_vocabularies["domain"].int2str(
|
196 |
-
category_str = feature_vocabularies["query_category"].int2str(
|
197 |
-
dynamism_str = feature_vocabularies["dynamism"].int2str(
|
|
|
198 |
|
199 |
# Print metadata
|
200 |
prefix = "\t\t" if not is_single_turn else "\t"
|
201 |
-
print(f"{prefix}Domain: {domain_str} | Category: {category_str} | Dynamism: {dynamism_str}")
|
202 |
|
203 |
# Print query and answer with fixed tab indentation
|
204 |
-
print(f"{prefix}Q: {
|
205 |
|
206 |
-
|
|
|
207 |
print(f"{prefix}A: {ans}")
|
208 |
|
209 |
-
if not is_single_turn and i <
|
210 |
print() # Add blank line between turns in multi-turn conversations
|
211 |
|
212 |
print("\n" + "-" * 60 + "\n") # Add separator between examples
|
@@ -221,66 +172,12 @@ print_conversation(dataset[split_to_use][0], feature_vocabularies)
|
|
221 |
|
222 |
The dataset includes the following splits:
|
223 |
- `validation`: A small subset for quick testing and exploration
|
|
|
224 |
- Additional splits may be available depending on the specific version
|
225 |
|
226 |
## Versions
|
227 |
|
228 |
-
The dataset is versioned using the `revision` parameter. Latest version: `v0.1.
|
229 |
-
|
230 |
-
## Dataset Structure
|
231 |
-
|
232 |
-
### Single-Turn Format
|
233 |
-
```json
|
234 |
-
{
|
235 |
-
"session_id": "string",
|
236 |
-
"image": Image(),
|
237 |
-
"image_url": "string",
|
238 |
-
"image_quality": "string",
|
239 |
-
"turns": [
|
240 |
-
{
|
241 |
-
"interaction_id": "string",
|
242 |
-
"domain": "string",
|
243 |
-
"query_category": "string",
|
244 |
-
"dynamism": "string",
|
245 |
-
"query": "string",
|
246 |
-
}
|
247 |
-
],
|
248 |
-
"answers": [
|
249 |
-
{
|
250 |
-
"interaction_id": "string",
|
251 |
-
"ans_full": "string"
|
252 |
-
}
|
253 |
-
]
|
254 |
-
}
|
255 |
-
```
|
256 |
-
|
257 |
-
### Multi-Turn Format
|
258 |
-
```json
|
259 |
-
{
|
260 |
-
"session_id": "string",
|
261 |
-
"image": Image(),
|
262 |
-
"image_url": "string",
|
263 |
-
"image_quality": "string",
|
264 |
-
"turns": [
|
265 |
-
{
|
266 |
-
"interaction_id": "string",
|
267 |
-
"domain": "string",
|
268 |
-
"query_category": "string",
|
269 |
-
"dynamism": "string",
|
270 |
-
"query": "string",
|
271 |
-
},
|
272 |
-
...
|
273 |
-
],
|
274 |
-
"answers": [
|
275 |
-
{
|
276 |
-
"interaction_id": "string",
|
277 |
-
"ans_full": "string"
|
278 |
-
},
|
279 |
-
...
|
280 |
-
]
|
281 |
-
}
|
282 |
-
```
|
283 |
-
|
284 |
|
285 |
## Citation
|
286 |
|
|
|
1 |
---
|
2 |
+
{}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
4 |
# CRAG-MM: Comprehensive multi-modal, multi-turn RAG Benchmark
|
5 |
|
|
|
31 |
from datasets import load_dataset
|
32 |
|
33 |
# For single-turn dataset
|
34 |
+
dataset = load_dataset("crag-mm-2025/crag-mm-single_turn-public", revision="v0.1.2")
|
35 |
|
36 |
# For multi-turn dataset
|
37 |
+
dataset = load_dataset("crag-mm-2025/crag-mm-multi_turn-public", revision="v0.1.2")
|
38 |
|
39 |
# View available splits
|
40 |
print(f"Available splits: {', '.join(dataset.keys())}")
|
|
|
55 |
plt.imshow(example['image'])
|
56 |
```
|
57 |
|
58 |
+
## Data Structure
|
59 |
+
|
60 |
+
Each example in the dataset contains:
|
61 |
+
|
62 |
+
```
|
63 |
+
{
|
64 |
+
"session_id": str, # Unique identifier for the conversation
|
65 |
+
"image": Image, # Image
|
66 |
+
"image_url": str, # Image URL where applicable
|
67 |
+
"turns": { # Dictionary containing conversation turn data
|
68 |
+
"interaction_id": [str], # List of unique IDs for each interaction
|
69 |
+
"domain": [int], # List of domain category indices
|
70 |
+
"query_category": [int], # List of query category indices
|
71 |
+
"dynamism": [int], # List of dynamism level indices
|
72 |
+
"query": [str], # List of questions or prompts
|
73 |
+
"image_quality": [int] # List of image quality indices
|
74 |
+
},
|
75 |
+
"answers": { # Dictionary containing answer data
|
76 |
+
"interaction_id": [str], # List of interaction IDs (matches turns)
|
77 |
+
"ans_full": [str] # List of complete answer texts
|
78 |
+
}
|
79 |
+
}
|
80 |
+
```
|
81 |
|
82 |
## Example Visualization
|
83 |
|
|
|
89 |
|
90 |
These vocabularies allow conversion between integer indices and string labels.
|
91 |
"""
|
92 |
+
turns_feature = dataset_split.features["turns"]
|
93 |
return {
|
94 |
+
"domain": turns_feature.feature["domain"],
|
95 |
+
"query_category": turns_feature.feature["query_category"],
|
96 |
+
"dynamism": turns_feature.feature["dynamism"],
|
97 |
+
"image_quality": turns_feature.feature["image_quality"],
|
98 |
}
|
99 |
|
100 |
|
|
|
116 |
When the actual image cannot be included, only the image_url will be available.
|
117 |
The evaluation servers will nevertheless always include the loaded 'image' field.
|
118 |
"""
|
|
|
|
|
119 |
|
120 |
+
# Determine if single-turn or multi-turn based on number of queries
|
121 |
+
num_turns = len(example['turns']['query'])
|
122 |
+
is_single_turn = num_turns == 1
|
123 |
+
print(f"Type: {'Single-turn' if is_single_turn else 'Multi-turn'} ({num_turns} turns)")
|
124 |
|
125 |
# Create answer lookup dictionary if answers exist
|
126 |
answer_lookup = {}
|
127 |
if 'answers' in example and example['answers'] is not None:
|
128 |
+
answer_lookup = {
|
129 |
+
interaction_id: ans_full
|
130 |
+
for interaction_id, ans_full in zip(
|
131 |
+
example['answers']['interaction_id'],
|
132 |
+
example['answers']['ans_full']
|
133 |
+
)
|
134 |
+
}
|
135 |
|
136 |
# Print each turn
|
137 |
print("\nConversation:")
|
138 |
+
for i in range(num_turns):
|
139 |
# For multi-turn, show turn number
|
140 |
if not is_single_turn:
|
141 |
print(f"\tTurn {i+1}:")
|
142 |
|
143 |
# Convert metadata to string representations
|
144 |
+
domain_str = feature_vocabularies["domain"].int2str(example['turns']['domain'][i])
|
145 |
+
category_str = feature_vocabularies["query_category"].int2str(example['turns']['query_category'][i])
|
146 |
+
dynamism_str = feature_vocabularies["dynamism"].int2str(example['turns']['dynamism'][i])
|
147 |
+
quality_str = feature_vocabularies["image_quality"].int2str(example['turns']['image_quality'][i])
|
148 |
|
149 |
# Print metadata
|
150 |
prefix = "\t\t" if not is_single_turn else "\t"
|
151 |
+
print(f"{prefix}Domain: {domain_str} | Category: {category_str} | Dynamism: {dynamism_str} | Image Quality: {quality_str}")
|
152 |
|
153 |
# Print query and answer with fixed tab indentation
|
154 |
+
print(f"{prefix}Q: {example['turns']['query'][i]}")
|
155 |
|
156 |
+
interaction_id = example['turns']['interaction_id'][i]
|
157 |
+
ans = answer_lookup.get(interaction_id, "No answer available")
|
158 |
print(f"{prefix}A: {ans}")
|
159 |
|
160 |
+
if not is_single_turn and i < num_turns - 1:
|
161 |
print() # Add blank line between turns in multi-turn conversations
|
162 |
|
163 |
print("\n" + "-" * 60 + "\n") # Add separator between examples
|
|
|
172 |
|
173 |
The dataset includes the following splits:
|
174 |
- `validation`: A small subset for quick testing and exploration
|
175 |
+
- `public_test`: The test split used in Round 1 of the Meta CRAG 2025 Challenge.
|
176 |
- Additional splits may be available depending on the specific version
|
177 |
|
178 |
## Versions
|
179 |
|
180 |
+
The dataset is versioned using the `revision` parameter. Latest version: `v0.1.2`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
## Citation
|
183 |
|