PengfeiHePower/TRAJECT-Bench

Python

22

47 commits

updated Nov 17, 2025

See the code

README

TRAJECT-Bench — Trajectory-Aware Tool-Use Evaluation for Agents

Name License: MIT Python

✨ A comprehensive benchmark for evaluating tool-using language models across multiple practical domains, designed to test models' ability to effectively utilize external tools for real-world tasks. Bring new insights to LLM-based agentic tool usage!

🆕 News

📢 [2025/9/24] We release all parallel and sequential data. We will release paper and results soon.

📢 [2025/8/24] We release the tool evaluation script for ReAct (agentic method), supporting both static and dynamic tool retrieval.

📢 [2025/8/23] We release the tool evaluation script for LLMs, supporting multiple query methods and tool selection modes.

📢 [2025/8/21] We release the first version of TRAJECT-Bench, including a high-quality executable production-style tool set and a novel tool-usage query dataset. The tool-calling trajectory is driven by real-world task types and invlove multiple tools from 3 to 10, enabling a scalable evaluation of tool-using capabilities. Queries consist of simple and hard versions, enabling deeper investigation on complexity.


🚀 Quickstart (TL;DR)

git clone <repository-url>
cd ToolData-public
pip install -r requirements.txt

# Tool evaluation on LLMs (not agentic evaluation)
python evaluation/tool_evaluation_model.py -model [model name] -tool_select [tool selection mode] -method [problem solving method] -k [tool pool size] -emb_model [embedding model] -emb_model_dir [embedding model directory] -traj_type [trajectory type] -traj_file [trajectory file name] -log_dir [log directory] -chk_dir [checkpoint directory] -base_data_dir [base data directory]

## default settings (direct prompting, domain mode, parallel trajectory, simple version, default model claude_v37)
python evaluation/tool_evaluation_model.py -model claude_v37 -tool_select domain -method direct -traj_type parallel -traj_file simple_ver -log_dir ./log/model -chk_dir ./chk/model -base_data_dir ./

## CoT setting (default model claude_v37, prompts in evaluation/evaluation_prompt.json)
python evaluation/tool_evaluation_model.py -model claude_v37 -tool_select domain -method cot -traj_type parallel -traj_file simple_ver -log_dir ./log/model -chk_dir ./chk/model -base_data_dir ./

## Retrieval tool pool setting (default model claude_v37, direct prompting, embedding model all-MiniLM, embedding model directory ./retriever, tool pool size 20)
python evaluation/tool_evaluation_model.py -model claude_v37 -tool_select retrieval -method direct -k 20 -emb_model all-MiniLM -emb_model_dir ./retriever -traj_type parallel -traj_file simple_ver -log_dir ./log/model -chk_dir ./chk/model -base_data_dir ./

# Agentic evaluation (ReAct)
python evaluation/tool_evaluation_agent.py -model [model name] -tool_select [tool selection mode] -method [problem solving method] -k [tool pool size] -emb_model [embedding model] -emb_model_dir [embedding model directory] -retrieve_mode [retrieve mode] -retrieve_pool [retrieve pool] -traj_type [trajectory type] -traj_file [trajectory file name] -log_dir [log directory] -chk_dir [checkpoint directory] -base_data_dir [base data directory]

## default settings (ReAct, domain tool pool, no retrieval, parallel trajectory, simple version, default model claude_v37)
python evaluation/tool_evaluation_agent.py -model claude_v37 -tool_select domain -method react -traj_type parallel -traj_file simple_ver -log_dir ./log/react -chk_dir ./chk/react -base_data_dir ./

## Static retrieval (default model claude_v37, static retrieval from domain tool pool)
python evaluation/tool_evaluation_agent.py -model claude_v37 -tool_select retrieval -method react -retrieve_mode static -retrieve_pool domain -traj_type parallel -traj_file simple_ver -log_dir ./log/react -chk_dir ./chk/react -base_data_dir ./

## Dynamic retrieval (default model claude_v37, dynamic retrieval from domain tool pool)
python evaluation/tool_evaluation_agent.py -model claude_v37 -tool_select retrieval -method react -retrieve_mode dynamic -retrieve_pool domain -traj_type parallel -traj_file simple_ver -log_dir ./log/react -chk_dir ./chk/react -base_data_dir ./

# Claude agentic tool-use
python evaluation/claude_tool_evaluation.py -model claude_v37 -tool_select domain -traj_type parallel -traj_file simple_ver -log_dir ./log/claude -chk_dir ./chk/claude -base_data_dir ./

# Other model's agentic evaulation is the same.

🎯 Overview

🌟 Hightlights:

  • 🔧 Multi-Tool Selection: Combining multiple executable, production-style tools to solve complex queries
  • 🎯 Practical Task Solving: Incorporating practical tasks across diverse domains
  • 🛤️ Trajectory Structure Support: First to evaluate both parallel and sequential tool-calling trajectories
  • 📊 Advanced Metrics: Trajectory-aware evaluation metrics for comprehensive assessment
  • 📈 Query Difficulty Control: Structured difficulty levels for progressive evaluation
  • 🎲 Multiple Tool-Pool Regimes: Support for various tool pool setups, including whole toolset (mixture of tools), domain-specific tools, tool retrieval, small-scale fixed tool pool
  • 🤖 Agentic Method Support: Evaluation frameworks for ReAct and other agentic approaches
BenchmarkPractical toolsLarge&diverse toolTrajectory structure1Trajectory scaling2Trajectory-aware metrics3Query difficulty controlTool-pool regimes4Agentic methods
MetaTool✅❌❌❌❌❌❌❌
API-Bank✅❌❌❌❌❌❌❌
ToolBench✅✅❌❌❌❌❌✅
Gorilla✅✅❌❌❌❌✅❌
Berkeley Function-Calling (BFCL)✅✅❌❌❌❌❌❌
ToolQA❌❌❌❌❌✅❌✅
TRAJECT-Bench (ours)✅✅✅✅✅✅✅✅

1 Trajectory structure: Evaluates support for different tool-calling patterns, including parallel (independent tools) and sequential (dependent tool chains) execution strategies
2 Trajectory scaling: Tests model performance across varying task complexity levels, from simple 3-tool scenarios to complex 10+ tool orchestration
3 Trajectory-aware metrics: Provides comprehensive evaluation beyond final results, measuring the quality of the entire tool-calling trajectory
4 Tool-pool regimes: Supports diverse evaluation strategies including whole toolset, domain-specific pools, retrieval-based selection, and fixed small-scale tool pools

Data synthesis overview

The following figure shows the data synthesis of TRAJECT-Bench, including parallel and sequential.

TRAJECT-Bench Illustration
  • 📁 Public data folder: public_data/
  • 🧪 Evaluation scripts: evaluation/tool_evaluation_model.py, evaluation/tool_evaluation_agent.py

🏗️ Benchmark Structure

🌍 Domains Covered

The benchmark covers 10 carefully selected domains that require external tools rather than internal model capabilities:

  • ✈️ Travel: Hotel booking, flight information, trip planning, transportation
  • 🌤️ Weather: Forecasts, meteorological data, climate information
  • 💰 Finance: Market data, trading platforms, cryptocurrency, banking
  • 🗺️ Mapping: Location services, routing, geographic data
  • 🎵 Music: Streaming, lyrics, artist information, music metadata
  • 📰 News & Media: News articles, multimedia content, current events
  • 📚 Education: Learning resources, academic data, research tools
  • 📧 Email: Communication, automation, folder management
  • 🎮 Gaming: Game data, statistics, account management
  • 🛒 eCommerce: Online shopping, inventory, product information

📁 Data Organization

public_data/
├── tools/           # Tool definitions and APIs for each domain
└── parallel/        # Parallel trajectory sets
│   ├── Education/   # Education domain
│       ├──hard_ver.json   # Hard queries
│       └──simple_ver.json # Simple queries
│   ├── Finance/     # Domain-specific test cases
│   ├── Travel/      # Multi-tool scenarios
│   └── ...          # Other domains
└── sequential/        # Sequential trajectory sets
│   ├── Education/   # Education domain
│       └──traj_query.json # Trajectory and query data
│   ├── Finance/     # Domain-specific test cases
│   ├── Travel/      # Multi-tool scenarios
│   └── ...          # Other domains

📊 Dataset at a Glance (for parallel, sequential on the way)

  • 🌍 10 domains: Education, Email, Finance, Gaming, Mapping, Music, News_Media, Travel, Weather, eCommerce
  • 🎯 50 practical task types: 5 representative user task types for each domain
  • 🛤️ 2,000 total parallel trajectories with different depth: 5 trajectory per number of tools (from 3-10) for each task
  • 📝 2,000 queries per difficulty: one simple and one hard for each trajectory
  • 🔢 4,000 total parallel trajectories: simple (2,000) + hard (2,000)
  • 🛠️ Tool metadata: public_data/tools/*.json

🔄 Query/Trajectories Types

We take a trajectory->query strategy

  1. 🔗 Parallel tool-calling trajectory: Independent tools collaborate for one task. Test sub-task planning and tool-usage capability.
  2. ⏭️ Sequential tool-calling trajectory: Trajectories with strong dependency among tools, i.e. latter tools require former tools' outputs.
  3. 📝 Simple Queries: Straightforward and clear instructions requiring multiple tools
  4. 🧠 Hard Queries: Indirect and indicating queries that are challenging, but avoid vagueness and much openness.

📋 Query JSON Structure

Each entry in public_data/parallel/<Domain>/*.json follows this structure:

  • query: Natural language instruction
  • tool_list: Tool-calling trajectory for solving the query
    • tool name: <parent tool name>: <API name>
    • tool description: Brief description of the API endpoint
    • required parameters: List of objects { "name": string, "value": string }
    • optional parameters: List of objects { "name": string, "value": string } (can be empty)
    • parent tool name: Name of the tool/provider
    • API name: Endpoint name
    • domain name: Domain category
  • trajectory_type: parallel or sequential
  • task_name: Short title of the general task type
  • task_description: Extended description of the task type

Example:

{
  "query": "First, retrieve the post with ID P36288 from FluentMe. Then, get information about the university with ID 394596. Finally, show me a list of video game adaptations from the Transmedia Storytelling database.",
  "tool_list": [
    {
      "tool name": "thefluentme: Get post by id",
      "tool description": "Returns a specific post using its post_id identifier...",
      "required parameters": [{ "name": "post_id", "value": "P36288" }],
      "optional parameters": [],
      "parent tool name": "thefluentme",
      "API name": "Get post by id",
      "domain name": "Education"
    },
    ...
  ],
  "trajectory_type": "parallel",
  "task_name": "Language and Culture Homework Helper",
  "task_description": "This task assists students with language and culture assignments. It involves finding definitions, translations, character information, and contextual examples for various languages."
}

📝 Minimal sequential example (illustrative)

{
  "query": "Find a flight from NYC to SFO next Friday and then get the 3-day weather forecast for the arrival dates in SFO.",
  "tool_list": [
    {
      "tool name": "skyscanner_flights: search_flights",
      "required parameters": [{ "name": "origin", "value": "NYC" }, { "name": "destination", "value": "SFO" }, { "name": "date", "value": "<next_friday>" }],
      "optional parameters": [],
      "parent tool name": "skyscanner_flights",
      "API name": "search_flights",
      "domain name": "Travel"
    },
    {
      "tool name": "forecast_lookup: 3day",
      "required parameters": [{ "name": "location", "value": "SFO" }, { "name": "date", "value": "<arrival_date>" }],
      "optional parameters": [],
      "parent tool name": "forecast_lookup",
      "API name": "3day",
      "domain name": "Weather"
    }
  ],
  "trajectory_type": "sequential",
  "task_name": "Travel planning with weather guardrails",
  "task_description": "Plan travel and check weather constraints based on retrieved itinerary."
}

📊 Evaluation Metrics

The benchmark evaluates models on:

  • 🎯 Exact Match: Exact same selected tools with/without order consideration
  • 🔍 Tool includion: Fraction of ground-truth tools that appear in the predicted trajectory
  • ⚙️ Tool parameterization: Proper usage of tools, including input values and formats
  • 🏆 Trajectory win rate: Given the predicted vs. reference trajectories, an LLM judge picks which better satisfies the task
  • ✅ Trajectory satisfication: Judge rates whether the predicted trajectory sufficiently satisfies the query (LLM judge)
  • 🎯 Solution Accuracy: Compare predicted solution with the ground truth solution (executation involved)

📋 Detailed metrics in utils/metrics.py

📊 Evaluation Results

Results of individual model’s tool-use capability with domain-specific tools on parallel queries (direct query).

ModelSimpleHard
EMInclusionUsageTraj-SatisfyAccEMInclusionUsageTraj-SatisfyAcc
Claude-3.70.6760.7460.7066.8310.7140.1350.5540.6031.5820.246
Claude-40.8460.8550.8398.5490.9050.4450.6680.7944.8820.517
Gemini-2.5-flash0.7140.7590.7847.2150.7820.2160.5380.6662.3400.263
Gemini-2.5-pro0.8510.8540.8358.5990.9110.4420.6520.7854.8490.498
GPT5-mini0.8170.8250.8198.2360.8340.1550.5890.6261.7010.380
o4-mini0.8230.8300.8248.3160.8630.3760.6290.7263.8490.472
gpt-oss:120b0.6520.6670.7156.5880.7260.1740.5590.6711.9090.387
DeepSeek0.8330.8360.8298.4170.8890.4390.6690.7574.8170.458
qwen3-235b-A22B0.8440.8560.8098.5290.8980.4400.6670.7964.8280.479
Kimi-k20.8150.8760.8728.2360.9020.3210.6660.7723.5220.448

Results of individual model’s tool-use capability with domain-specific tools on sequential queries.

ModelEMInclusionUsageTraj-SatisfyAcc
Claude-3.70.5830.7240.5846.0100.573
Claude-40.8190.8320.7758.2430.813
Gemini-2.5-flash0.6130.6950.7146.2190.652
Gemini-2.5-pro0.8070.8210.8098.1190.848
GPT5-mini0.6930.7150.6927.0420.677
o4-mini0.7890.8070.7488.1340.761
gpt-oss:120b0.5380.6190.6945.5460.653
DeepSeek0.8250.8490.8118.3050.823
qwen3-235b-A22B0.8240.8370.7728.1940.791
Kimi-k20.8210.8270.7938.3630.833

Results of individual models combined with retrieval-based tool-selection strategy.

Claude_v37SimpleHard
Emb_mdelRetrieval poolRetrieval rateEMInclusionUsageTraj-SatisfyAccRetrieval rateEMInclusionUsageTraj-SatisfyAcc
bge-largedomain0.9060.6810.7920.7387.1340.7080.5850.0350.4100.6920.5410.127
all0.8420.6390.7620.7286.5920.6650.4820.0200.3410.6570.3340.098
all-miniLMdomain0.9130.6850.7930.7497.2570.7170.5840.0290.4030.6830.2650.109
all0.8680.6450.7510.7456.6130.6800.4600.0120.4030.6410.1400.082
ToolLM-IRdomain0.9450.7030.8140.7787.1420.7150.5780.0300.4190.6980.2940.139
all0.8770.6520.7830.7586.7700.6960.4750.0240.4250.6560.2590.132
Claude_v4
bge-largedomain0.9060.8520.8670.8358.6310.9020.5850.0310.3970.6720.3280.264
all0.8420.7850.8230.7708.0530.8760.4820.0120.2920.6560.1110.189
all-miniLMdomain0.9130.8330.8590.7868.7640.8700.5840.0330.4100.6630.3550.277
all0.8680.8170.8060.7738.3520.8320.4600.0150.2670.6200.1710.168
ToolLM-IRdomain0.9450.9060.9280.8339.1170.9160.5780.0280.4200.6800.2860.241
all0.8770.8520.8610.7648.6130.8790.4750.0140.2980.6530.1900.164

Evaluation of model’s inherent agentic tool-use capability.

modelSimpleHard
EMInclusionUsageTraj-SatisfyAccEMInclusionUsageTraj-SatisfyAcc
Claude-4agentic0.8320.8680.8168.4070.8930.4400.6370.7514.8280.486
context0.8460.8550.8398.5490.9050.4450.6680.7944.8820.517
Gemini-2.5-proagentic0.8280.8660.8768.3670.9170.4160.6740.7684.5640.503
context0.8510.8470.8358.5990.9110.4420.6520.7854.8490.498
Deepseekagentic0.8190.8570.7568.2560.8450.4160.6820.7834.5640.481
context0.8350.8330.7298.4170.8890.4390.6690.7574.8170.458
Kimi-k2agentic0.8530.9770.8938.6200.9510.3150.7170.7653.4560.437
context0.8150.8760.8728.2360.9020.3210.6660.7723.5220.448

🚀 Getting Started

📋 Prerequisites

  • 🐍 Python 3.12+
  • 📦 Required packages (see requirements.txt)

⚙️ Installation

git clone <repository-url>
cd ToolData-public
pip install -r requirements.txt

⚠️ Before running

  1. Setup models in utils/model_providers.py
  2. The execuation of tools relies on endpoints provided by ToolBench. Thanks to their contribution!

🧪 Running Evaluations (to finish soon)

# Simple query evaluation with direct prompting, CoT, etc. Support multiple tool selection modes and trajectory types.
python evaluation/tool_evaluation.py

# Agentic evaluation (ReAct) Support both static and dynamic tool retrieval.
python evaluation/tool_evaluation_react.py

📁 Data Access

The benchmark data is publicly available in the public_data/ directory:

  • 🛠️ Tool Definitions: JSON files containing API specifications and parameters
  • 📝 Test Queries: Curated queries with ground truth tool execution paths

📊 Data Source

Primary dataset hosting: This repo

🔮 Future update

  • ⭐ (Highest priority) Complete evaluation pipeline, add detailed instructions
  • ⭐ (Highest priority) Add sequential trajectory and query data
  • 🌍 Add more domains and tasks

🤝 Contributing

We welcome contributions to improve the benchmark:

  • 🌍 Additional domains and tools
  • 📊 Enhanced evaluation metrics
  • 🔄 New query types and scenarios
  • ⚡ Performance optimizations

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📞 Contact

For questions or feedback about the benchmark, please open an issue on GitHub or contact the maintainers.


This benchmark is designed to advance the field of tool-using language models by providing comprehensive evaluation scenarios that reflect real-world tool usage patterns.

Contributors

PengfeiHePower

47 commits

PengfeiHePower/TRAJECT-Bench

Python

22

47 commits

updated Nov 17, 2025

See the code

README

TRAJECT-Bench — Trajectory-Aware Tool-Use Evaluation for Agents

Name License: MIT Python

✨ A comprehensive benchmark for evaluating tool-using language models across multiple practical domains, designed to test models' ability to effectively utilize external tools for real-world tasks. Bring new insights to LLM-based agentic tool usage!

🆕 News

📢 [2025/9/24] We release all parallel and sequential data. We will release paper and results soon.

📢 [2025/8/24] We release the tool evaluation script for ReAct (agentic method), supporting both static and dynamic tool retrieval.

📢 [2025/8/23] We release the tool evaluation script for LLMs, supporting multiple query methods and tool selection modes.

📢 [2025/8/21] We release the first version of TRAJECT-Bench, including a high-quality executable production-style tool set and a novel tool-usage query dataset. The tool-calling trajectory is driven by real-world task types and invlove multiple tools from 3 to 10, enabling a scalable evaluation of tool-using capabilities. Queries consist of simple and hard versions, enabling deeper investigation on complexity.


🚀 Quickstart (TL;DR)

git clone <repository-url>
cd ToolData-public
pip install -r requirements.txt

# Tool evaluation on LLMs (not agentic evaluation)
python evaluation/tool_evaluation_model.py -model [model name] -tool_select [tool selection mode] -method [problem solving method] -k [tool pool size] -emb_model [embedding model] -emb_model_dir [embedding model directory] -traj_type [trajectory type] -traj_file [trajectory file name] -log_dir [log directory] -chk_dir [checkpoint directory] -base_data_dir [base data directory]

## default settings (direct prompting, domain mode, parallel trajectory, simple version, default model claude_v37)
python evaluation/tool_evaluation_model.py -model claude_v37 -tool_select domain -method direct -traj_type parallel -traj_file simple_ver -log_dir ./log/model -chk_dir ./chk/model -base_data_dir ./

## CoT setting (default model claude_v37, prompts in evaluation/evaluation_prompt.json)
python evaluation/tool_evaluation_model.py -model claude_v37 -tool_select domain -method cot -traj_type parallel -traj_file simple_ver -log_dir ./log/model -chk_dir ./chk/model -base_data_dir ./

## Retrieval tool pool setting (default model claude_v37, direct prompting, embedding model all-MiniLM, embedding model directory ./retriever, tool pool size 20)
python evaluation/tool_evaluation_model.py -model claude_v37 -tool_select retrieval -method direct -k 20 -emb_model all-MiniLM -emb_model_dir ./retriever -traj_type parallel -traj_file simple_ver -log_dir ./log/model -chk_dir ./chk/model -base_data_dir ./

# Agentic evaluation (ReAct)
python evaluation/tool_evaluation_agent.py -model [model name] -tool_select [tool selection mode] -method [problem solving method] -k [tool pool size] -emb_model [embedding model] -emb_model_dir [embedding model directory] -retrieve_mode [retrieve mode] -retrieve_pool [retrieve pool] -traj_type [trajectory type] -traj_file [trajectory file name] -log_dir [log directory] -chk_dir [checkpoint directory] -base_data_dir [base data directory]

## default settings (ReAct, domain tool pool, no retrieval, parallel trajectory, simple version, default model claude_v37)
python evaluation/tool_evaluation_agent.py -model claude_v37 -tool_select domain -method react -traj_type parallel -traj_file simple_ver -log_dir ./log/react -chk_dir ./chk/react -base_data_dir ./

## Static retrieval (default model claude_v37, static retrieval from domain tool pool)
python evaluation/tool_evaluation_agent.py -model claude_v37 -tool_select retrieval -method react -retrieve_mode static -retrieve_pool domain -traj_type parallel -traj_file simple_ver -log_dir ./log/react -chk_dir ./chk/react -base_data_dir ./

## Dynamic retrieval (default model claude_v37, dynamic retrieval from domain tool pool)
python evaluation/tool_evaluation_agent.py -model claude_v37 -tool_select retrieval -method react -retrieve_mode dynamic -retrieve_pool domain -traj_type parallel -traj_file simple_ver -log_dir ./log/react -chk_dir ./chk/react -base_data_dir ./

# Claude agentic tool-use
python evaluation/claude_tool_evaluation.py -model claude_v37 -tool_select domain -traj_type parallel -traj_file simple_ver -log_dir ./log/claude -chk_dir ./chk/claude -base_data_dir ./

# Other model's agentic evaulation is the same.

🎯 Overview

🌟 Hightlights:

  • 🔧 Multi-Tool Selection: Combining multiple executable, production-style tools to solve complex queries
  • 🎯 Practical Task Solving: Incorporating practical tasks across diverse domains
  • 🛤️ Trajectory Structure Support: First to evaluate both parallel and sequential tool-calling trajectories
  • 📊 Advanced Metrics: Trajectory-aware evaluation metrics for comprehensive assessment
  • 📈 Query Difficulty Control: Structured difficulty levels for progressive evaluation
  • 🎲 Multiple Tool-Pool Regimes: Support for various tool pool setups, including whole toolset (mixture of tools), domain-specific tools, tool retrieval, small-scale fixed tool pool
  • 🤖 Agentic Method Support: Evaluation frameworks for ReAct and other agentic approaches
BenchmarkPractical toolsLarge&diverse toolTrajectory structure1Trajectory scaling2Trajectory-aware metrics3Query difficulty controlTool-pool regimes4Agentic methods
MetaTool✅❌❌❌❌❌❌❌
API-Bank✅❌❌❌❌❌❌❌
ToolBench✅✅❌❌❌❌❌✅
Gorilla✅✅❌❌❌❌✅❌
Berkeley Function-Calling (BFCL)✅✅❌❌❌❌❌❌
ToolQA❌❌❌❌❌✅❌✅
TRAJECT-Bench (ours)✅✅✅✅✅✅✅✅

1 Trajectory structure: Evaluates support for different tool-calling patterns, including parallel (independent tools) and sequential (dependent tool chains) execution strategies
2 Trajectory scaling: Tests model performance across varying task complexity levels, from simple 3-tool scenarios to complex 10+ tool orchestration
3 Trajectory-aware metrics: Provides comprehensive evaluation beyond final results, measuring the quality of the entire tool-calling trajectory
4 Tool-pool regimes: Supports diverse evaluation strategies including whole toolset, domain-specific pools, retrieval-based selection, and fixed small-scale tool pools

Data synthesis overview

The following figure shows the data synthesis of TRAJECT-Bench, including parallel and sequential.

TRAJECT-Bench Illustration
  • 📁 Public data folder: public_data/
  • 🧪 Evaluation scripts: evaluation/tool_evaluation_model.py, evaluation/tool_evaluation_agent.py

🏗️ Benchmark Structure

🌍 Domains Covered

The benchmark covers 10 carefully selected domains that require external tools rather than internal model capabilities:

  • ✈️ Travel: Hotel booking, flight information, trip planning, transportation
  • 🌤️ Weather: Forecasts, meteorological data, climate information
  • 💰 Finance: Market data, trading platforms, cryptocurrency, banking
  • 🗺️ Mapping: Location services, routing, geographic data
  • 🎵 Music: Streaming, lyrics, artist information, music metadata
  • 📰 News & Media: News articles, multimedia content, current events
  • 📚 Education: Learning resources, academic data, research tools
  • 📧 Email: Communication, automation, folder management
  • 🎮 Gaming: Game data, statistics, account management
  • 🛒 eCommerce: Online shopping, inventory, product information

📁 Data Organization

public_data/
├── tools/           # Tool definitions and APIs for each domain
└── parallel/        # Parallel trajectory sets
│   ├── Education/   # Education domain
│       ├──hard_ver.json   # Hard queries
│       └──simple_ver.json # Simple queries
│   ├── Finance/     # Domain-specific test cases
│   ├── Travel/      # Multi-tool scenarios
│   └── ...          # Other domains
└── sequential/        # Sequential trajectory sets
│   ├── Education/   # Education domain
│       └──traj_query.json # Trajectory and query data
│   ├── Finance/     # Domain-specific test cases
│   ├── Travel/      # Multi-tool scenarios
│   └── ...          # Other domains

📊 Dataset at a Glance (for parallel, sequential on the way)

  • 🌍 10 domains: Education, Email, Finance, Gaming, Mapping, Music, News_Media, Travel, Weather, eCommerce
  • 🎯 50 practical task types: 5 representative user task types for each domain
  • 🛤️ 2,000 total parallel trajectories with different depth: 5 trajectory per number of tools (from 3-10) for each task
  • 📝 2,000 queries per difficulty: one simple and one hard for each trajectory
  • 🔢 4,000 total parallel trajectories: simple (2,000) + hard (2,000)
  • 🛠️ Tool metadata: public_data/tools/*.json

🔄 Query/Trajectories Types

We take a trajectory->query strategy

  1. 🔗 Parallel tool-calling trajectory: Independent tools collaborate for one task. Test sub-task planning and tool-usage capability.
  2. ⏭️ Sequential tool-calling trajectory: Trajectories with strong dependency among tools, i.e. latter tools require former tools' outputs.
  3. 📝 Simple Queries: Straightforward and clear instructions requiring multiple tools
  4. 🧠 Hard Queries: Indirect and indicating queries that are challenging, but avoid vagueness and much openness.

📋 Query JSON Structure

Each entry in public_data/parallel/<Domain>/*.json follows this structure:

  • query: Natural language instruction
  • tool_list: Tool-calling trajectory for solving the query
    • tool name: <parent tool name>: <API name>
    • tool description: Brief description of the API endpoint
    • required parameters: List of objects { "name": string, "value": string }
    • optional parameters: List of objects { "name": string, "value": string } (can be empty)
    • parent tool name: Name of the tool/provider
    • API name: Endpoint name
    • domain name: Domain category
  • trajectory_type: parallel or sequential
  • task_name: Short title of the general task type
  • task_description: Extended description of the task type

Example:

{
  "query": "First, retrieve the post with ID P36288 from FluentMe. Then, get information about the university with ID 394596. Finally, show me a list of video game adaptations from the Transmedia Storytelling database.",
  "tool_list": [
    {
      "tool name": "thefluentme: Get post by id",
      "tool description": "Returns a specific post using its post_id identifier...",
      "required parameters": [{ "name": "post_id", "value": "P36288" }],
      "optional parameters": [],
      "parent tool name": "thefluentme",
      "API name": "Get post by id",
      "domain name": "Education"
    },
    ...
  ],
  "trajectory_type": "parallel",
  "task_name": "Language and Culture Homework Helper",
  "task_description": "This task assists students with language and culture assignments. It involves finding definitions, translations, character information, and contextual examples for various languages."
}

📝 Minimal sequential example (illustrative)

{
  "query": "Find a flight from NYC to SFO next Friday and then get the 3-day weather forecast for the arrival dates in SFO.",
  "tool_list": [
    {
      "tool name": "skyscanner_flights: search_flights",
      "required parameters": [{ "name": "origin", "value": "NYC" }, { "name": "destination", "value": "SFO" }, { "name": "date", "value": "<next_friday>" }],
      "optional parameters": [],
      "parent tool name": "skyscanner_flights",
      "API name": "search_flights",
      "domain name": "Travel"
    },
    {
      "tool name": "forecast_lookup: 3day",
      "required parameters": [{ "name": "location", "value": "SFO" }, { "name": "date", "value": "<arrival_date>" }],
      "optional parameters": [],
      "parent tool name": "forecast_lookup",
      "API name": "3day",
      "domain name": "Weather"
    }
  ],
  "trajectory_type": "sequential",
  "task_name": "Travel planning with weather guardrails",
  "task_description": "Plan travel and check weather constraints based on retrieved itinerary."
}

📊 Evaluation Metrics

The benchmark evaluates models on:

  • 🎯 Exact Match: Exact same selected tools with/without order consideration
  • 🔍 Tool includion: Fraction of ground-truth tools that appear in the predicted trajectory
  • ⚙️ Tool parameterization: Proper usage of tools, including input values and formats
  • 🏆 Trajectory win rate: Given the predicted vs. reference trajectories, an LLM judge picks which better satisfies the task
  • ✅ Trajectory satisfication: Judge rates whether the predicted trajectory sufficiently satisfies the query (LLM judge)
  • 🎯 Solution Accuracy: Compare predicted solution with the ground truth solution (executation involved)

📋 Detailed metrics in utils/metrics.py

📊 Evaluation Results

Results of individual model’s tool-use capability with domain-specific tools on parallel queries (direct query).

ModelSimpleHard
EMInclusionUsageTraj-SatisfyAccEMInclusionUsageTraj-SatisfyAcc
Claude-3.70.6760.7460.7066.8310.7140.1350.5540.6031.5820.246
Claude-40.8460.8550.8398.5490.9050.4450.6680.7944.8820.517
Gemini-2.5-flash0.7140.7590.7847.2150.7820.2160.5380.6662.3400.263
Gemini-2.5-pro0.8510.8540.8358.5990.9110.4420.6520.7854.8490.498
GPT5-mini0.8170.8250.8198.2360.8340.1550.5890.6261.7010.380
o4-mini0.8230.8300.8248.3160.8630.3760.6290.7263.8490.472
gpt-oss:120b0.6520.6670.7156.5880.7260.1740.5590.6711.9090.387
DeepSeek0.8330.8360.8298.4170.8890.4390.6690.7574.8170.458
qwen3-235b-A22B0.8440.8560.8098.5290.8980.4400.6670.7964.8280.479
Kimi-k20.8150.8760.8728.2360.9020.3210.6660.7723.5220.448

Results of individual model’s tool-use capability with domain-specific tools on sequential queries.

ModelEMInclusionUsageTraj-SatisfyAcc
Claude-3.70.5830.7240.5846.0100.573
Claude-40.8190.8320.7758.2430.813
Gemini-2.5-flash0.6130.6950.7146.2190.652
Gemini-2.5-pro0.8070.8210.8098.1190.848
GPT5-mini0.6930.7150.6927.0420.677
o4-mini0.7890.8070.7488.1340.761
gpt-oss:120b0.5380.6190.6945.5460.653
DeepSeek0.8250.8490.8118.3050.823
qwen3-235b-A22B0.8240.8370.7728.1940.791
Kimi-k20.8210.8270.7938.3630.833

Results of individual models combined with retrieval-based tool-selection strategy.

Claude_v37SimpleHard
Emb_mdelRetrieval poolRetrieval rateEMInclusionUsageTraj-SatisfyAccRetrieval rateEMInclusionUsageTraj-SatisfyAcc
bge-largedomain0.9060.6810.7920.7387.1340.7080.5850.0350.4100.6920.5410.127
all0.8420.6390.7620.7286.5920.6650.4820.0200.3410.6570.3340.098
all-miniLMdomain0.9130.6850.7930.7497.2570.7170.5840.0290.4030.6830.2650.109
all0.8680.6450.7510.7456.6130.6800.4600.0120.4030.6410.1400.082
ToolLM-IRdomain0.9450.7030.8140.7787.1420.7150.5780.0300.4190.6980.2940.139
all0.8770.6520.7830.7586.7700.6960.4750.0240.4250.6560.2590.132
Claude_v4
bge-largedomain0.9060.8520.8670.8358.6310.9020.5850.0310.3970.6720.3280.264
all0.8420.7850.8230.7708.0530.8760.4820.0120.2920.6560.1110.189
all-miniLMdomain0.9130.8330.8590.7868.7640.8700.5840.0330.4100.6630.3550.277
all0.8680.8170.8060.7738.3520.8320.4600.0150.2670.6200.1710.168
ToolLM-IRdomain0.9450.9060.9280.8339.1170.9160.5780.0280.4200.6800.2860.241
all0.8770.8520.8610.7648.6130.8790.4750.0140.2980.6530.1900.164

Evaluation of model’s inherent agentic tool-use capability.

modelSimpleHard
EMInclusionUsageTraj-SatisfyAccEMInclusionUsageTraj-SatisfyAcc
Claude-4agentic0.8320.8680.8168.4070.8930.4400.6370.7514.8280.486
context0.8460.8550.8398.5490.9050.4450.6680.7944.8820.517
Gemini-2.5-proagentic0.8280.8660.8768.3670.9170.4160.6740.7684.5640.503
context0.8510.8470.8358.5990.9110.4420.6520.7854.8490.498
Deepseekagentic0.8190.8570.7568.2560.8450.4160.6820.7834.5640.481
context0.8350.8330.7298.4170.8890.4390.6690.7574.8170.458
Kimi-k2agentic0.8530.9770.8938.6200.9510.3150.7170.7653.4560.437
context0.8150.8760.8728.2360.9020.3210.6660.7723.5220.448

🚀 Getting Started

📋 Prerequisites

  • 🐍 Python 3.12+
  • 📦 Required packages (see requirements.txt)

⚙️ Installation

git clone <repository-url>
cd ToolData-public
pip install -r requirements.txt

⚠️ Before running

  1. Setup models in utils/model_providers.py
  2. The execuation of tools relies on endpoints provided by ToolBench. Thanks to their contribution!

🧪 Running Evaluations (to finish soon)

# Simple query evaluation with direct prompting, CoT, etc. Support multiple tool selection modes and trajectory types.
python evaluation/tool_evaluation.py

# Agentic evaluation (ReAct) Support both static and dynamic tool retrieval.
python evaluation/tool_evaluation_react.py

📁 Data Access

The benchmark data is publicly available in the public_data/ directory:

  • 🛠️ Tool Definitions: JSON files containing API specifications and parameters
  • 📝 Test Queries: Curated queries with ground truth tool execution paths

📊 Data Source

Primary dataset hosting: This repo

🔮 Future update

  • ⭐ (Highest priority) Complete evaluation pipeline, add detailed instructions
  • ⭐ (Highest priority) Add sequential trajectory and query data
  • 🌍 Add more domains and tasks

🤝 Contributing

We welcome contributions to improve the benchmark:

  • 🌍 Additional domains and tools
  • 📊 Enhanced evaluation metrics
  • 🔄 New query types and scenarios
  • ⚡ Performance optimizations

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📞 Contact

For questions or feedback about the benchmark, please open an issue on GitHub or contact the maintainers.


This benchmark is designed to advance the field of tool-using language models by providing comprehensive evaluation scenarios that reflect real-world tool usage patterns.

Contributors

PengfeiHePower

47 commits

Languages

Python

100.0%