Dataset Viewer
Auto-converted to Parquet Duplicate
name
string
user
string
tools
list
expect_tool
string
expect_keys
list
weather_single_arg
What is the weather in Paris right now?
[ { "type": "function", "function": { "name": "get_weather", "description": "Get current weather for a city", "parameters": { "type": "object", "properties": { "city": { "type": "string" } }, "required": [ "city" ...
get_weather
[ "city" ]
calc_two_args
Add 17 and 25 using the calculator tool.
[ { "type": "function", "function": { "name": "calculate", "description": "Do arithmetic", "parameters": { "type": "object", "properties": { "a": { "type": "number" }, "b": { "type": "number" }, "op": {...
calculate
[ "a", "b" ]
read_file_path
Read the contents of the file /etc/hosts for me.
[ { "type": "function", "function": { "name": "read_file", "description": "Read a file from disk", "parameters": { "type": "object", "properties": { "path": { "type": "string" } }, "required": [ "path" ] ...
read_file
[ "path" ]
multi_tool_disambiguation
What is the weather in Tbilisi?
[ { "type": "function", "function": { "name": "get_news", "description": "Get latest news headlines", "parameters": { "type": "object", "properties": { "topic": { "type": "string" } }, "required": [ "topic" ] ...
get_weather
[ "city" ]
web_search_query
Search the web for the latest stable Rust release version.
[ { "type": "function", "function": { "name": "web_search", "description": "Search the web", "parameters": { "type": "object", "properties": { "query": { "type": "string" } }, "required": [ "query" ] } ...
web_search
[ "query" ]
run_python_code
Run this Python code and tell me the output: print(2 + 2)
[ { "type": "function", "function": { "name": "run_python", "description": "Execute Python code", "parameters": { "type": "object", "properties": { "code": { "type": "string" } }, "required": [ "code" ] }...
run_python
[ "code" ]
convert_currency_three_args
Convert 100 USD to EUR.
[ { "type": "function", "function": { "name": "convert_currency", "description": "Convert an amount between currencies", "parameters": { "type": "object", "properties": { "amount": { "type": "number" }, "from": { "type": "...
convert_currency
[ "amount" ]
negative_no_tool
Write a short haiku about the sea. Do not use any tools.
[ { "type": "function", "function": { "name": "get_weather", "description": "Get current weather for a city", "parameters": { "type": "object", "properties": { "city": { "type": "string" } }, "required": [ "city" ...
null
[]

Gemma-4 Coder — tool-calling gate suite

The 8-case eval behind the tool-call pass rate in our model cards' model-index: positive prompts where the model must emit a structured tool call, plus a no-tool abstain case (it must answer directly, not hallucinate a call). Use it to measure any local tool-calling model the same way we do — or to reproduce our numbers.

from datasets import load_dataset
cases = load_dataset("tpls/gemma4-coder-tool-eval", split="train")   # each: {name, user, tools, expect}

Scoring a model

Serve a GGUF on llama.cpp (llama-server --jinja), send each case's user + tools the normal OpenAI way, and check the reply against expect. Two rates, because llama.cpp --jinja doesn't recognise gemma-4's native tool-call markup:

  • raw — llama.cpp's native parse. For gemma-4 it structurally undercounts (blind to the format).
  • shim — the same outputs re-parsed for the native markup. This is the number that reflects training.

The shim is a tiny serve-side post-processor — ready-to-use (drop-in litellm callback + a standalone parser, Apache-2.0) at tpls/gemma4-tool-shim, where the recovery algorithm is also documented so you can re-implement it.

# sketch: per case, POST to your OpenAI-compatible endpoint, then
#   raw_ok  = response had a structured tool_call (or correctly abstained)
#   shim_ok = same, after running the reply through the shim parser
# pass_rate = mean(ok over the 8 cases). expect == [] means "must NOT call a tool".

Files

File What
tool_eval_cases.jsonl one case/line: {name, user, tools, expect}
tool_calib.txt imatrix calibration text (code + tool-call markup) used when quantizing

Scope & license

Authored by us, fully permissive (apache-2.0). This is an eval set, not training data — our training mix is a derivative of public datasets and is not redistributed (its reproducible recipe lives on each model card). Pairs with the tpls/gemma4-tool-shim helper and the models below.

Used by

Downloads last month
11