|
Download README.md from RECAP-data/reuse-qa: direct link, hf CLI and curl.
- Browser
- Download file 8.75 kB
-
https://huggingface.co/datasets/RECAP-data/reuse-qa/resolve/main/README.md
- Command line
-
hf download hf://datasets/RECAP-data/reuse-qa/README.md
-
curl -L -o README.md https://huggingface.co/datasets/RECAP-data/reuse-qa/resolve/main/README.md
8.75 kB
| pretty_name: REUSE-QA | |
| language: | |
| - en | |
| task_categories: | |
| - question-answering | |
| tags: | |
| - benchmark | |
| - evaluation | |
| - agents | |
| - tool-use | |
| - plan-reuse | |
| dataset_info: | |
| features: | |
| - name: id | |
| dtype: string | |
| - name: parent_id | |
| dtype: string | |
| - name: dataset | |
| dtype: string | |
| - name: variant_type | |
| dtype: string | |
| - name: question | |
| dtype: string | |
| - name: answer | |
| dtype: string | |
| - name: answer_type | |
| dtype: string | |
| - name: context | |
| struct: | |
| - name: db_name | |
| dtype: string | |
| - name: company | |
| dtype: string | |
| - name: doc_name | |
| dtype: string | |
| - name: evidence | |
| sequence: string | |
| - name: constraint_type | |
| dtype: string | |
| - name: file_name | |
| dtype: string | |
| - name: file_path | |
| dtype: string | |
| - name: level | |
| dtype: int32 | |
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: financebench | |
| path: data/financebench.jsonl | |
| - split: sql_api_bench | |
| path: data/sql_api_bench.jsonl | |
| license: other | |
| license_name: mixed-upstream-terms | |
| license_link: https://huggingface.co/datasets/RECAP-data/reuse-qa/blob/main/LICENSE | |
| size_categories: | |
| - 1K<n<10K | |
| # REUSE-QA | |
| REUSE-QA evaluates how tool-using agents reuse work across related questions. This ungated repository contains 7,479 questions in 2,488 families from FinanceBench and SQL-API-Bench. The full benchmark contains 7,797 questions in 2,627 families, including 318 GAIA questions available in the [gaia companion repository](https://huggingface.co/datasets/RECAP-data/reuse-qa-gaia). Each family links an original question to variants that change its wording, inputs, or conditions. Researchers can use these streams to compare answer caching, plan reuse, and other reuse policies on answer accuracy and model cost. | |
| ## Contents | |
| The `default` configuration contains two source splits, `financebench` and `sql_api_bench`, with 7,479 questions: 2,488 originals and 4,991 variants (2,488 P, 604 ER, and 1,899 CA). | |
| The SQL databases are downloaded separately with the preparation script below. | |
| The following table describes the full three-source benchmark. Its GAIA row is distributed in the companion repository; this repository contains the FinanceBench and SQL-API-Bench rows. | |
| | Source | Questions | Originals | P | ER | CA | | |
| | --- | ---: | ---: | ---: | ---: | ---: | | |
| | FinanceBench | 453 | 150 | 150 | 101 | 52 | | |
| | GAIA (Levels 1–2) | 318 | 139 | 139 | 17 | 23 | | |
| | SQL-API-Bench | 7,026 | 2,338 | 2,338 | 503 | 1,847 | | |
| | **Total** | **7,797** | **2,627** | **2,627** | **621** | **1,922** | | |
| Variants use these `variant_type` values: | |
| | Paper abbreviation | Stored value | Change | | |
| | --- | --- | --- | | |
| | P | `paraphrase` | Rewords the original while retaining its reference answer. | | |
| | ER | `entity_replacement` | Changes a query-specific entity, value, or requested attribute. | | |
| | CA | `condition_augmentation` | Adds or revises a constraint, potentially requiring further filtering or checking. | | |
| Originals have `variant_type="original"`. IDs may retain legacy `variant1`, `variant2`, or `variant3` markers for P, ER, and CA, respectively. Other ID patterns also occur; use `variant_type` and `parent_id` rather than parsing an ID to determine a record's role. | |
| ## Load the questions | |
| Install `datasets` if needed: | |
| ```bash | |
| pip install datasets | |
| ``` | |
| ```python | |
| from datasets import load_dataset | |
| stream = load_dataset( | |
| "RECAP-data/reuse-qa", "default", split="financebench" | |
| ) | |
| print(stream[0]["question"]) | |
| ``` | |
| The files are UTF-8 JSON Lines. From a downloaded copy of the repository: | |
| ```python | |
| import json | |
| with open("data/financebench.jsonl", encoding="utf-8") as handle: | |
| records = [json.loads(line) for line in handle] | |
| by_id = {record["id"]: record for record in records} | |
| variant = next(record for record in records if record["parent_id"] is not None) | |
| original = by_id[variant["parent_id"]] | |
| ``` | |
| ## Record format | |
| Every record has the same eight top-level fields: | |
| | Field | Meaning | | |
| | --- | --- | | |
| | `id` | Unique record identifier. | | |
| | `parent_id` | Original question's ID for a variant; `null` for an original. The parent is in the same split. | | |
| | `dataset` | Source split name. | | |
| | `variant_type` | `original`, `paraphrase`, `entity_replacement`, or `condition_augmentation`. | | |
| | `question` | Question presented to the agent. | | |
| | `answer` | Reference answer, stored as a string. | | |
| | `answer_type` | `text`, `numeric`, or `json_rows`. | | |
| | `context` | Source-specific task inputs and database references. | | |
| In the Hugging Face viewer, each question is one row with these eight columns. Select a source using the split dropdown. `context` is a structured object within one cell; its individual fields are not separate top-level columns. SQL reference rows remain JSON text in the `answer` cell. | |
| `context` retains the benchmark's eight-field structure: `db_name`, `company`, `doc_name`, `evidence`, `constraint_type`, `file_name`, `file_path`, and `level`. FinanceBench supplies supporting passages in `evidence`; SQL questions identify their database through `db_name`. Unused fields are `null`, except that unused `evidence` is an empty list. | |
| Keep the reference `answer` out of the agent's inputs during evaluation. | |
| For SQL records, parse `answer` with `json.loads(record["answer"])` to obtain the reference result rows. Preserve their column names and values when scoring. | |
| ## Evaluate reuse across a stream | |
| Each original appears before its variants in the JSONL files. Preserve the file order for online reuse evaluation, begin with an empty cache or plan library, and allow reuse only from earlier questions. Record the dataset revision and stream order with results. | |
| ## Tools and supporting data | |
| **FinanceBench** uses an oracle-evidence setting: a document tool returns the supporting passages in `context.evidence`. | |
| **SQL-API-Bench** combines SQL with scalar tools such as primality checks and geocoding. The questions identify one of 26 Spider databases through `context.db_name`. To prepare the databases separately, run: | |
| ```bash | |
| pip install gdown | |
| python scripts/prepare_sql_api_bench.py --work-dir ./sql_api_bench_data | |
| ``` | |
| The script downloads and extracts the upstream Spider archive, retains its notices, and reports the database directory for the bundled questions. The complete upstream download is larger than the 26 databases needed here. | |
| If Spider is already available locally, no download is needed: | |
| ```bash | |
| python scripts/prepare_sql_api_bench.py --spider-dir /path/to/spider | |
| ``` | |
| Resolve a database as `<database_dir>/<db_name>/<db_name>.sqlite`, using the directory printed by the script. The databases retain Spider's source terms. Scalar tools and the agent execution environment are separate dependencies. | |
| To comply with GAIA’s redistribution requirements, its questions, reference answers, and all 31 referenced attachments are distributed separately in the [gated companion repository](https://huggingface.co/datasets/RECAP-data/reuse-qa-gaia), which provides its loading and tool instructions. | |
| ## Sources and terms of use | |
| Source materials retain their upstream terms, as detailed in [LICENSE](LICENSE). [FinanceBench](https://huggingface.co/datasets/PatronusAI/financebench) is licensed under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/); [SQL-API-Bench](https://huggingface.co/datasets/ibm-research/SQL-API-Bench) specifies [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/). The separately downloaded databases come from [Spider](https://yale-lily.github.io/spider), whose data are licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). This compilation includes transformed questions and counterfactual FinanceBench evidence; it does not replace the source terms or grant additional rights in third-party content. | |
| ## Citation | |
| Please cite the accompanying manuscript, *RECAP: Structured Plan Reuse for Efficient Tool-Using Agents*, and the source benchmark: | |
| - Islam et al. *FinanceBench: A New Benchmark for Financial Question Answering* (2023). [Paper](https://arxiv.org/abs/2311.11944). | |
| - Mialon et al. *GAIA: A Benchmark for General AI Assistants*. ICLR (2024). [Dataset and citation](https://huggingface.co/datasets/gaia-benchmark/GAIA). | |
| - Khabiri et al. *Declarative Techniques for NL Queries over Heterogeneous Data*. EMNLP Industry Track (2025). [Paper](https://aclanthology.org/2025.emnlp-industry.123/). | |
| - Yu et al. *Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task*. EMNLP (2018). [Paper](https://aclanthology.org/D18-1425/). | |