Datasets:
Add one-call download to usage
Browse files
README.md
CHANGED
|
@@ -80,26 +80,38 @@ A system has to
|
|
| 80 |
|---|---|---|
|
| 81 |
| `queries` (default) | 1,680 | Benchmark questions with gold answers and evaluation labels |
|
| 82 |
| `product`, `order`, `inquiry`, `review`, `script` | 200 / 6,378 / 18,749 / 24,104 / 287 | SQL tables of the retail database |
|
| 83 |
-
| `reviews_text`, `inquiries_text`, `sales_scripts` | 24,104 / 18,749 / 287 | Free-text stores
|
| 84 |
|
| 85 |
-
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
```python
|
| 89 |
-
from
|
| 90 |
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
|
|
|
| 94 |
```
|
| 95 |
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
| 97 |
|
| 98 |
```python
|
| 99 |
-
from
|
| 100 |
|
| 101 |
-
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
| 103 |
```
|
| 104 |
|
| 105 |
## Benchmark questions
|
|
|
|
| 80 |
|---|---|---|
|
| 81 |
| `queries` (default) | 1,680 | Benchmark questions with gold answers and evaluation labels |
|
| 82 |
| `product`, `order`, `inquiry`, `review`, `script` | 200 / 6,378 / 18,749 / 24,104 / 287 | SQL tables of the retail database |
|
| 83 |
+
| `reviews_text`, `inquiries_text`, `sales_scripts` | 24,104 / 18,749 / 287 | Free-text stores (review text, buyer–seller inquiry dialogues, live-commerce sales scripts), each with metadata |
|
| 84 |
|
| 85 |
+
## Usage
|
| 86 |
+
|
| 87 |
+
### Download the whole benchmark
|
| 88 |
+
|
| 89 |
+
One call downloads the questions and the full heterogeneous database. The `database/raw/`
|
| 90 |
+
folder holds the five SQL tables as `*.sqlite` files and the three text stores as
|
| 91 |
+
`*.jsonl` files, which is the form the RetailRAG framework reads directly.
|
| 92 |
|
| 93 |
```python
|
| 94 |
+
from huggingface_hub import snapshot_download
|
| 95 |
|
| 96 |
+
path = snapshot_download("DISLab/RetailBridge", repo_type="dataset")
|
| 97 |
+
# path/queries/test.jsonl 1,680 questions
|
| 98 |
+
# path/database/raw/*.sqlite 5 SQL tables
|
| 99 |
+
# path/database/raw/*.jsonl 3 text stores
|
| 100 |
```
|
| 101 |
|
| 102 |
+
### Load with `datasets`
|
| 103 |
+
|
| 104 |
+
Each source is a separate config because the tables have different columns.
|
| 105 |
+
The loop below loads the questions and every source at once.
|
| 106 |
|
| 107 |
```python
|
| 108 |
+
from datasets import load_dataset
|
| 109 |
|
| 110 |
+
REPO = "DISLab/RetailBridge"
|
| 111 |
+
queries = load_dataset(REPO, "queries", split="test")
|
| 112 |
+
db = {name: load_dataset(REPO, name, split="train")
|
| 113 |
+
for name in ["product", "order", "inquiry", "review", "script",
|
| 114 |
+
"reviews_text", "inquiries_text", "sales_scripts"]}
|
| 115 |
```
|
| 116 |
|
| 117 |
## Benchmark questions
|