Datasets:
Upload folder using huggingface_hub
Browse files- README.md +57 -3
- dataset/InteractComp210.jsonl +0 -0
- interactcomp_decrypt_jsonl.py +126 -0
README.md
CHANGED
|
@@ -1,3 +1,57 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# InteractComp (Encrypted Release)
|
| 2 |
+
|
| 3 |
+
InteractComp accompanies the paper **"INTERACTCOMP: Evaluating Search Agents with Ambiguous Queries"** (Deng et al., 2025). The benchmark targets a capability gap in modern search agents: recognizing ambiguity, asking clarifying questions, and only then executing retrieval or answering. Despite rapid progress on fully specified web queries, the paper shows that interaction-centric performance remains stagnant—highlighting InteractComp as both an evaluation suite and a training ground for interactive behaviors.
|
| 4 |
+
|
| 5 |
+
## What's Inside
|
| 6 |
+
- **210 human-authored tasks** spanning 9 web domains. Each instance includes an intentionally ambiguous question, targeted context for disambiguation, the ground-truth answer, and metadata (`id`, `domain`).
|
| 7 |
+
- **Target-distractor methodology:** curators select a target entity and a popular distractor, write questions using only shared attributes, then provide minimal context that exposes the target's unique traits. Ambiguity can only be resolved through interaction.
|
| 8 |
+
- **Interaction sensitivity:** the paper reports that GPT-5 tops out at **13.73% accuracy** under standard agent settings but exceeds 24% when forced to interact extensively. Supplying the full disambiguating context pushes accuracy to 71.5%, demonstrating that the limiting factor is proactive interaction rather than reasoning.
|
| 9 |
+
- **Longitudinal findings:** over 15 months (May 2024 to Sep 2025) agent accuracy on BrowseComp increases seven-fold, yet InteractComp accuracy stagnates between 6% and 14%, exposing a systemic blind spot in agent development.
|
| 10 |
+
- **Transparent pipeline:** the appendix details a five-step construction process (Target and Distractor selection -> Shared and Distinct attributes -> Ambiguous question -> Context snippets -> Reasoning path) ensuring each item is challenging to shortcut yet straightforward to verify post-interaction.
|
| 11 |
+
|
| 12 |
+
### Reference
|
| 13 |
+
Please cite the paper when using this release:
|
| 14 |
+
|
| 15 |
+
> **Mingyi Deng, Lijun Huang, Yani Fan, Jiayi Zhang, et al. (2025)**
|
| 16 |
+
> *INTERACTCOMP: Evaluating Search Agents with Ambiguous Queries*.
|
| 17 |
+
|
| 18 |
+
## Repository Layout
|
| 19 |
+
|
| 20 |
+
```
|
| 21 |
+
main/
|
| 22 |
+
|-- dataset/
|
| 23 |
+
| `-- InteractComp210.encrypted.jsonl # Encrypted benchmark samples (public)
|
| 24 |
+
|-- interactcomp_decrypt_jsonl.py # Decryption utility (public)
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
## Encryption Scheme
|
| 28 |
+
- A shared canary token (default `InteractComp`) is embedded in the `canary` column of every record.
|
| 29 |
+
- Fields `domain`, `question`, `answer`, and `context` are XOR-encrypted byte-wise using a SHA-256 stream derived from that token, then Base64 encoded.
|
| 30 |
+
|
| 31 |
+
## Decryption Instructions
|
| 32 |
+
|
| 33 |
+
1. Prepare Python 3.8+.
|
| 34 |
+
2. Place the encrypted JSONL and the decryption script in your working directory (or provide explicit paths).
|
| 35 |
+
3. Run:
|
| 36 |
+
|
| 37 |
+
```bash
|
| 38 |
+
python interactcomp_decrypt_jsonl.py \
|
| 39 |
+
--input InteractComp210.encrypted.jsonl \
|
| 40 |
+
--output InteractComp210.decrypted.jsonl
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
Optional flags:
|
| 44 |
+
- `--fields` to target a different comma-separated list of encrypted columns.
|
| 45 |
+
- `--canary-field` if the canary column name differs from `canary`.
|
| 46 |
+
- `--canary-value` to supply the token manually when the canary column has been removed from the encrypted file.
|
| 47 |
+
- `--keep-canary` to retain the canary column in the decrypted output.
|
| 48 |
+
|
| 49 |
+
### Verifying the Result
|
| 50 |
+
Decrypted records should be valid UTF-8 JSON lines matching the original dataset. Use diff tools or hash comparisons against an authorized plaintext copy. If a record fails to decrypt, confirm that the canary value you used matches the one embedded during encryption.
|
| 51 |
+
|
| 52 |
+
## Token Management
|
| 53 |
+
- Keep the shared canary token confidential if you want to avoid casual decryption. Rotate it and regenerate the encrypted release if exposure is suspected.
|
| 54 |
+
- Consider producing per-recipient encrypted variants (unique tokens) when auditing access or tracing potential leaks.
|
| 55 |
+
|
| 56 |
+
## License & Intended Use
|
| 57 |
+
This release is intended for non-commercial research on interactive search agents. Any downstream use should comply with the policies outlined in the accompanying paper and institutional review requirements. Contact the maintainers for questions about redistribution or additional licensing terms.
|
dataset/InteractComp210.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
interactcomp_decrypt_jsonl.py
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import argparse
|
| 2 |
+
import base64
|
| 3 |
+
import hashlib
|
| 4 |
+
import json
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
from typing import Iterable, List, Optional
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def derive_key(password: str, length: int) -> bytes:
|
| 10 |
+
hasher = hashlib.sha256()
|
| 11 |
+
hasher.update(password.encode())
|
| 12 |
+
key = hasher.digest()
|
| 13 |
+
return key * (length // len(key)) + key[: length % len(key)]
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
def xor_decrypt(ciphertext_b64: str, password: str) -> str:
|
| 17 |
+
if ciphertext_b64 is None:
|
| 18 |
+
return ciphertext_b64
|
| 19 |
+
if not ciphertext_b64:
|
| 20 |
+
return ""
|
| 21 |
+
encrypted = base64.b64decode(ciphertext_b64)
|
| 22 |
+
key = derive_key(password, len(encrypted))
|
| 23 |
+
decrypted = bytes(a ^ b for a, b in zip(encrypted, key))
|
| 24 |
+
return decrypted.decode("utf-8")
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
def parse_fields(value: str) -> List[str]:
|
| 28 |
+
return [item.strip() for item in value.split(",") if item.strip()]
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def iter_jsonl(path: Path) -> Iterable[dict]:
|
| 32 |
+
with path.open("r", encoding="utf-8") as fh:
|
| 33 |
+
for lineno, line in enumerate(fh, start=1):
|
| 34 |
+
line = line.strip()
|
| 35 |
+
if not line:
|
| 36 |
+
continue
|
| 37 |
+
try:
|
| 38 |
+
yield json.loads(line)
|
| 39 |
+
except json.JSONDecodeError as exc:
|
| 40 |
+
raise ValueError(f"Invalid JSON on line {lineno}: {exc}") from exc
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
def write_jsonl(path: Path, records: Iterable[dict]) -> None:
|
| 44 |
+
with path.open("w", encoding="utf-8") as fh:
|
| 45 |
+
for record in records:
|
| 46 |
+
json.dump(record, fh, ensure_ascii=True, separators=(",", ":"))
|
| 47 |
+
fh.write("\n")
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def decrypt_dataset(
|
| 51 |
+
input_path: Path,
|
| 52 |
+
output_path: Path,
|
| 53 |
+
fields: List[str],
|
| 54 |
+
canary_field: str,
|
| 55 |
+
override_canary: Optional[str],
|
| 56 |
+
drop_canary: bool,
|
| 57 |
+
) -> None:
|
| 58 |
+
decrypted_records = []
|
| 59 |
+
for record in iter_jsonl(input_path):
|
| 60 |
+
token = override_canary if override_canary is not None else record.get(canary_field)
|
| 61 |
+
if not token:
|
| 62 |
+
raise ValueError(
|
| 63 |
+
f"Missing canary token for record (id={record.get('id')}). "
|
| 64 |
+
f"Set --canary-value if the column is absent."
|
| 65 |
+
)
|
| 66 |
+
|
| 67 |
+
for field in fields:
|
| 68 |
+
if field not in record:
|
| 69 |
+
continue
|
| 70 |
+
value = record[field]
|
| 71 |
+
if value is None:
|
| 72 |
+
continue
|
| 73 |
+
record[field] = xor_decrypt(value, token)
|
| 74 |
+
if drop_canary:
|
| 75 |
+
record.pop(canary_field, None)
|
| 76 |
+
decrypted_records.append(record)
|
| 77 |
+
|
| 78 |
+
write_jsonl(output_path, decrypted_records)
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
def main() -> None:
|
| 82 |
+
parser = argparse.ArgumentParser(
|
| 83 |
+
description="Decrypt InteractComp JSONL encrypted with a shared canary token."
|
| 84 |
+
)
|
| 85 |
+
parser.add_argument("--input", required=True, help="Path to the encrypted JSONL.")
|
| 86 |
+
parser.add_argument("--output", required=True, help="Path for the decrypted JSONL.")
|
| 87 |
+
parser.add_argument(
|
| 88 |
+
"--fields",
|
| 89 |
+
default="domain,question,answer,context",
|
| 90 |
+
help="Comma-separated fields to decrypt (default: domain,question,answer,context).",
|
| 91 |
+
)
|
| 92 |
+
parser.add_argument(
|
| 93 |
+
"--canary-field",
|
| 94 |
+
default="canary",
|
| 95 |
+
help="Field name storing the canary token in the encrypted JSONL (default: canary).",
|
| 96 |
+
)
|
| 97 |
+
parser.add_argument(
|
| 98 |
+
"--canary-value",
|
| 99 |
+
help="Optional explicit canary token. Use when the encrypted file omits the canary column.",
|
| 100 |
+
)
|
| 101 |
+
parser.add_argument(
|
| 102 |
+
"--keep-canary",
|
| 103 |
+
action="store_true",
|
| 104 |
+
help="Keep the canary field in the decrypted output.",
|
| 105 |
+
)
|
| 106 |
+
args = parser.parse_args()
|
| 107 |
+
|
| 108 |
+
input_path = Path(args.input)
|
| 109 |
+
output_path = Path(args.output)
|
| 110 |
+
fields = parse_fields(args.fields) if args.fields else []
|
| 111 |
+
|
| 112 |
+
if not fields:
|
| 113 |
+
raise ValueError("At least one field must be specified for decryption.")
|
| 114 |
+
|
| 115 |
+
decrypt_dataset(
|
| 116 |
+
input_path,
|
| 117 |
+
output_path,
|
| 118 |
+
fields,
|
| 119 |
+
args.canary_field,
|
| 120 |
+
args.canary_value,
|
| 121 |
+
drop_canary=not args.keep_canary,
|
| 122 |
+
)
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
if __name__ == "__main__":
|
| 126 |
+
main()
|