| --- |
| pretty_name: HyperBrowseComp |
| tags: |
| - benchmark |
| - encrypted |
| language: |
| - ko |
| - de |
| - jv |
| - id |
| - es |
| - ru |
| - zh |
| - te |
| - arz |
| - uz |
| - th |
| - fil |
| - vi |
| configs: |
| - config_name: default |
| data_files: |
| - split: test |
| path: data/test-* |
| dataset_info: |
| features: |
| - name: id |
| dtype: string |
| - name: canary |
| dtype: string |
| - name: question |
| dtype: string |
| - name: answer |
| dtype: string |
| splits: |
| - name: test |
| num_bytes: 397885 |
| num_examples: 485 |
| download_size: 400690 |
| dataset_size: 397885 |
| --- |
| |
| # HyperBrowseComp |
|
|
| Hard, multi-hop web search questions across 13 languages. Encrypted (AES-256-GCM). |
|
|
| ```python |
| from datasets import load_dataset |
| |
| ds = load_dataset("afaji/HyperBrowseComp", split="test") |
| ``` |
|
|
| `id` is `<LANG>_<question id>`, e.g. `KO_7388`. |
|
|
| ## Decrypt |
|
|
| ```python |
| import base64 |
| import hashlib |
| |
| from cryptography.hazmat.primitives.ciphers.aead import AESGCM |
| |
| |
| def _nonce(canary, field): |
| return hashlib.sha256(f"{canary}:{field}".encode()).digest()[:12] |
| |
| |
| def _open(ciphertext_b64, key, canary, field): |
| return AESGCM(key).decrypt(_nonce(canary, field), base64.b64decode(ciphertext_b64), None).decode() |
| |
| |
| def decrypt_row(row, master_key): |
| key = bytes.fromhex(master_key) |
| return { |
| "id": row["id"], |
| "question": _open(row["question"], key, row["canary"], "question"), |
| "answer": _open(row["answer"], key, row["canary"], "answer"), |
| } |
| |
| |
| decrypt_row(ds[0], "<your key>") |
| ``` |
|
|