Datasets:
Update questions, pages, answers and document files
Browse files- README.md +1 -1
- answers/train.parquet +2 -2
- resolve_xl_docbench.py +5 -2
README.md
CHANGED
|
@@ -66,7 +66,7 @@ lists every document with its source URL, including those not hosted here. `page
|
|
| 66 |
|
| 67 |
## Variant notes
|
| 68 |
|
| 69 |
-
Pages with `redistribution` other than `permitted` are excluded. XL-DocBench question text, gold answers and scoring rules are withheld (`text_withheld`), and `resolve_xl_docbench.py` fills question text and the benchmark answer by `id` from microsoft/XL-DocBench. Answers to questions on restricted documents and tool outputs that touch them read `[omitted from the public variant: source licence]`. Scores, call counts, seconds and tokens stay.
|
| 70 |
|
| 71 |
## Sources and attribution
|
| 72 |
|
|
|
|
| 66 |
|
| 67 |
## Variant notes
|
| 68 |
|
| 69 |
+
Pages with `redistribution` other than `permitted` are excluded. XL-DocBench question text, gold answers and scoring rules are withheld (`text_withheld`), and `resolve_xl_docbench.py` fills question text and the benchmark answer by `id` from microsoft/XL-DocBench. The current release lacks five of these questions, four of them in `unseen`, and the script names them. Answers to questions on restricted documents and tool outputs that touch them read `[omitted from the public variant: source licence]`. Scores, call counts, seconds and tokens stay.
|
| 70 |
|
| 71 |
## Sources and attribution
|
| 72 |
|
answers/train.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c1842e56bffc8df0c8d36142debf245af5fef90b67049a5e14ca3e5b8e0d0b7f
|
| 3 |
+
size 254213
|
resolve_xl_docbench.py
CHANGED
|
@@ -10,13 +10,16 @@ for name in ("qa_single_doc.jsonl", "qa_cross_doc.jsonl"):
|
|
| 10 |
for line in urlopen(BASE + name):
|
| 11 |
row = json.loads(line)
|
| 12 |
source[row["question_id"]] = row
|
| 13 |
-
for path_name in ("rag_misses", "multi_hop", "holdout", "holdout2"):
|
| 14 |
try:
|
| 15 |
rows = parquet.read_table(f"questions/{path_name}.parquet").to_pylist()
|
| 16 |
except FileNotFoundError:
|
| 17 |
continue
|
|
|
|
|
|
|
|
|
|
| 18 |
for row in rows:
|
| 19 |
-
if row["text_withheld"]:
|
| 20 |
row["question"], row["gold"] = source[row["id"]]["question"], str(source[row["id"]]["answer"]["value"])
|
| 21 |
with open(f"questions_{path_name}_resolved.jsonl", "w") as handle:
|
| 22 |
handle.writelines(json.dumps(row, ensure_ascii=False) + "\n" for row in rows)
|
|
|
|
| 10 |
for line in urlopen(BASE + name):
|
| 11 |
row = json.loads(line)
|
| 12 |
source[row["question_id"]] = row
|
| 13 |
+
for path_name in ("rag_misses", "multi_hop", "holdout", "holdout2", "unseen"):
|
| 14 |
try:
|
| 15 |
rows = parquet.read_table(f"questions/{path_name}.parquet").to_pylist()
|
| 16 |
except FileNotFoundError:
|
| 17 |
continue
|
| 18 |
+
missing = [row["id"] for row in rows if row["text_withheld"] and row["id"] not in source]
|
| 19 |
+
if missing:
|
| 20 |
+
print(f"{path_name}: not in the current XL-DocBench release: {', '.join(missing)}")
|
| 21 |
for row in rows:
|
| 22 |
+
if row["text_withheld"] and row["id"] in source:
|
| 23 |
row["question"], row["gold"] = source[row["id"]]["question"], str(source[row["id"]]["answer"]["value"])
|
| 24 |
with open(f"questions_{path_name}_resolved.jsonl", "w") as handle:
|
| 25 |
handle.writelines(json.dumps(row, ensure_ascii=False) + "\n" for row in rows)
|