tool-learning-eval
Tool Learning with Foundation Models — Qin et al. (2023) (arXiv:2304.08354, 2023)
What this evaluates
Evaluates foundation models' ability to decompose complex instructions, reason over subgoals, and dynamically select/call external APIs or tools to complete tasks across diverse domains like translation, mathematics, web search, and data processing.
Datasets
- MLQA — total 200; splits: test (200)
- ASDiv — total 266; splits: test (266)
- MathQA — total ?; splits: test (-1)
- RealTimeQA — total 30; splits: test (30)
- HotpotQA — total 200; splits: test (200)
- WebShop — total 100; splits: test (100)
- ALFWorld — total 134; splits: valid (134)
- Curated (Map) — total 129; splits: test (129)
- Curated (Weather) — total 100; splits: test (100)
- Curated (Stock) — total 122; splits: test (122)
- Curated (Slides) — total 100; splits: test (100)
- Curated (Tables) — total 117; splits: test (117)
- Curated (KGs) — total 64; splits: test (64)
- Curated (Cooking) — total 50; splits: test (50)
- Curated (Movie) — total 60; splits: test (60)
- Curated (AI Painting) — total 25; splits: test (25)
- Curated (3D Model Construction) — total 10; splits: test (10)
- Curated (Chemical Properties) — total 100; splits: test (100)
- Curated (Database) — total 50; splits: test (50)
Metrics
accuracy / success rate (primary) — range: percent
- Percentage of instances where the model's final answer matches the ground truth, or where the sequence of API calls is judged correct and yields a reasonable result. For curated tool-use datasets, human judges verify that all API calls are accurate and produce valid outputs.
F1-score — range: [0, 1]
- Harmonic mean of precision and recall computed over token-level matches between predicted and gold answers. Used specifically for the MLQA multilingual QA benchmark.
Input / output format
Input: User query/instruction, optionally with context (e.g., English context for translation, question for QA). For tool-use tasks, the model receives the instruction and descriptions of available APIs.
Output: Final answer string (for QA/math) or a sequence of tool/API calls followed by a final answer/result. The model must generate tool calls in the framework's expected format.
Scoring recipe
def compute_metric(predictions, gold, dataset_name):
if dataset_name == 'MLQA':
return f1_score(predictions, gold)
elif dataset_name in ['ASDiv', 'MathQA', 'RealTimeQA', 'HotpotQA', 'WebShop', 'ALFWorld']:
return exact_match(predictions, gold)
else: # Curated tool-use datasets
return 1.0 if judge_api_trace_correct(predictions) else 0.0
Common pitfalls
- Many tasks (e.g., slides-making, 3D modeling) cannot be completed without tools, so 'No Tool' baselines are omitted, which may skew cross-task comparisons.
- Curated datasets rely on human judgment of API call traces rather than automated exact-match, introducing subjectivity and potential inconsistency.
- Zero-shot tool use sometimes degrades performance compared to no-tool baselines for tasks solvable with internal knowledge (e.g., calculator, search engine).
Evidence (verbatim from paper)
Unless otherwise specified, for these manually curated test sets, we employ the trace of API calls as the metric for evaluating the models’ performance. Specifically, if humans judge that all the API calls are accurate for the given task, and they yield a reasonable result, the task is deemed to be correctly completed.
Citation
@misc{qin2023toollearning,
title={Tool Learning with Foundation Models},
author={Qin et al. (2023)},
year={2023},
note={arXiv:2304.08354}
}
1---2name: tool-learning-eval3description: Evaluates foundation models' ability to decompose complex instructions, reason over subgoals, and dynamically select/call external APIs or tools to complete tasks across diverse domains like translation, mathematics, web search, and data processing. Use when the user wants to benchmark on MLQA, ASDiv, MathQA, RealTimeQA, HotpotQA, WebShop, ALFWorld, Curated (Map), Curated (Weather), Curated (Stock), Curated (Slides), Curated (Tables), Curated (KGs), Curated (Cooking), Curated (Movie), Curated (AI Painting), Curated (3D Model Construction), Curated (Chemical Properties), Curated (Database), or asks about evaluating this task. Reports accuracy / success rate.4metadata:5 source: https://skillmd.com/skills/qhjqhj00/tool-learning-eval6 skill_kind: dataset_eval7 source_arxiv: 2304.083548 bibtex_key: qin2023toollearning9 confidence: high10---1112# tool-learning-eval1314> Tool Learning with Foundation Models — Qin et al. (2023) (arXiv:2304.08354, 2023)1516## What this evaluates1718Evaluates foundation models' ability to decompose complex instructions, reason over subgoals, and dynamically select/call external APIs or tools to complete tasks across diverse domains like translation, mathematics, web search, and data processing.1920## Datasets2122- **MLQA** — total 200; splits: test (200)23- **ASDiv** — total 266; splits: test (266)24- **MathQA** — total ?; splits: test (-1)25- **RealTimeQA** — total 30; splits: test (30)26- **HotpotQA** — total 200; splits: test (200)27- **WebShop** — total 100; splits: test (100)28- **ALFWorld** — total 134; splits: valid (134)29- **Curated (Map)** — total 129; splits: test (129)30- **Curated (Weather)** — total 100; splits: test (100)31- **Curated (Stock)** — total 122; splits: test (122)32- **Curated (Slides)** — total 100; splits: test (100)33- **Curated (Tables)** — total 117; splits: test (117)34- **Curated (KGs)** — total 64; splits: test (64)35- **Curated (Cooking)** — total 50; splits: test (50)36- **Curated (Movie)** — total 60; splits: test (60)37- **Curated (AI Painting)** — total 25; splits: test (25)38- **Curated (3D Model Construction)** — total 10; splits: test (10)39- **Curated (Chemical Properties)** — total 100; splits: test (100)40- **Curated (Database)** — total 50; splits: test (50)4142## Metrics4344- `accuracy / success rate` **(primary)** — range: percent45 - Percentage of instances where the model's final answer matches the ground truth, or where the sequence of API calls is judged correct and yields a reasonable result. For curated tool-use datasets, human judges verify that all API calls are accurate and produce valid outputs.46- `F1-score` — range: [0, 1]47 - Harmonic mean of precision and recall computed over token-level matches between predicted and gold answers. Used specifically for the MLQA multilingual QA benchmark.4849## Input / output format5051**Input**: User query/instruction, optionally with context (e.g., English context for translation, question for QA). For tool-use tasks, the model receives the instruction and descriptions of available APIs.5253**Output**: Final answer string (for QA/math) or a sequence of tool/API calls followed by a final answer/result. The model must generate tool calls in the framework's expected format.5455## Scoring recipe5657```python58def compute_metric(predictions, gold, dataset_name):59 if dataset_name == 'MLQA':60 return f1_score(predictions, gold)61 elif dataset_name in ['ASDiv', 'MathQA', 'RealTimeQA', 'HotpotQA', 'WebShop', 'ALFWorld']:62 return exact_match(predictions, gold)63 else: # Curated tool-use datasets64 return 1.0 if judge_api_trace_correct(predictions) else 0.065```6667## Common pitfalls6869- Many tasks (e.g., slides-making, 3D modeling) cannot be completed without tools, so 'No Tool' baselines are omitted, which may skew cross-task comparisons.70- Curated datasets rely on human judgment of API call traces rather than automated exact-match, introducing subjectivity and potential inconsistency.71- Zero-shot tool use sometimes degrades performance compared to no-tool baselines for tasks solvable with internal knowledge (e.g., calculator, search engine).7273## Evidence (verbatim from paper)7475> Unless otherwise specified, for these manually curated test sets, we employ the trace of API calls as the metric for evaluating the models’ performance. Specifically, if humans judge that all the API calls are accurate for the given task, and they yield a reasonable result, the task is deemed to be correctly completed.7677## Citation7879```bibtex80@misc{qin2023toollearning,81 title={Tool Learning with Foundation Models},82 author={Qin et al. (2023)},83 year={2023},84 note={arXiv:2304.08354}85}86```8788- arXiv: 2304.08354