Update README.md
Browse files
README.md
CHANGED
|
@@ -90,13 +90,46 @@ The `dataset/` directory contains:
|
|
| 90 |
|
| 91 |
## Usage
|
| 92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
```python
|
|
|
|
| 94 |
from datasets import load_dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
|
| 96 |
-
|
| 97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
```
|
| 99 |
|
|
|
|
| 100 |
For the complete dataset construction pipeline, evaluation protocol, and implementation details, please refer to our [GitHub repository](https://github.com/Tencent/GroupAssistBench).
|
| 101 |
|
| 102 |
## License
|
|
|
|
| 90 |
|
| 91 |
## Usage
|
| 92 |
|
| 93 |
+
`load_dataset` loads the 2,395 evaluation instances (`dataset/items.jsonl`).
|
| 94 |
+
The conversations the instances are asked against are in `dataset/contexts.json`.
|
| 95 |
+
That file is a dictionary keyed by group rather than a table, so download it with
|
| 96 |
+
`huggingface_hub`:
|
| 97 |
+
|
| 98 |
```python
|
| 99 |
+
import json
|
| 100 |
from datasets import load_dataset
|
| 101 |
+
from huggingface_hub import hf_hub_download
|
| 102 |
+
|
| 103 |
+
items = load_dataset("tencent/GroupAssistBench", split="test")
|
| 104 |
+
print(len(items)) # 2395
|
| 105 |
+
|
| 106 |
+
path = hf_hub_download("tencent/GroupAssistBench", "dataset/contexts.json", repo_type="dataset")
|
| 107 |
+
with open(path, encoding="utf-8") as f:
|
| 108 |
+
contexts = json.load(f) # {group: [[turn, speaker, text], ...]}
|
| 109 |
+
|
| 110 |
+
item = items[0]
|
| 111 |
+
history = [m for m in contexts[item["group"]] if m[0] < item["cut_idx"]]
|
| 112 |
+
# history: the conversation a system may read before the request
|
| 113 |
+
# item["query"]: the request
|
| 114 |
+
# item["gt"] / item["gt_atoms"] (L1) or item["criteria"] (L2): the reference for scoring
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
To download all files, including `contexts_en.json` (English reference translation),
|
| 118 |
+
`profiles.json` and `items_full.jsonl`:
|
| 119 |
|
| 120 |
+
```python
|
| 121 |
+
from huggingface_hub import snapshot_download
|
| 122 |
+
|
| 123 |
+
local_dir = snapshot_download("tencent/GroupAssistBench", repo_type="dataset")
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
or from the command line:
|
| 127 |
+
|
| 128 |
+
```bash
|
| 129 |
+
hf download tencent/GroupAssistBench --repo-type dataset --local-dir GroupAssistBench
|
| 130 |
```
|
| 131 |
|
| 132 |
+
|
| 133 |
For the complete dataset construction pipeline, evaluation protocol, and implementation details, please refer to our [GitHub repository](https://github.com/Tencent/GroupAssistBench).
|
| 134 |
|
| 135 |
## License
|