gemma4-coder-tool-eval / tool_calib.txt
tpls's picture
add tool_calib.txt
569c07f verified
Raw
History Blame Contribute Delete
3 kB
User: What is the weather in Paris? Assistant tool call: get_weather with arguments {"city": "Paris"}.
User: Add 17 and 25. Assistant calls calculate {"a": 17, "b": 25, "op": "add"} and returns 42.
User: Read the file /etc/hosts. The assistant invokes read_file {"path": "/etc/hosts"}.
User: Search the web for the latest Rust release. Tool: web_search {"query": "latest stable Rust release version"}.
User: Convert 100 USD to EUR. Tool call: convert_currency {"amount": 100, "from": "USD", "to": "EUR"}.
User: Run this Python code: print(2 + 2). Assistant calls run_python {"code": "print(2 + 2)"}.
User: List files in /var/log. Assistant: list_dir {"path": "/var/log"}.
User: Send an email to alice@example.com with subject Hello. send_email {"to": "alice@example.com", "subject": "Hello", "body": ""}.
The function get_weather(city: string) returns the current temperature and conditions for the given city.
def fibonacci(n: int) -> int:\n if n < 2:\n return n\n return fibonacci(n - 1) + fibonacci(n - 2)
import json\nresponse = {"tool_calls": [{"name": "get_time", "arguments": {"timezone": "UTC"}}]}\nprint(json.dumps(response))
{"type": "function", "function": {"name": "create_issue", "parameters": {"type": "object", "properties": {"title": {"type": "string"}, "body": {"type": "string"}}, "required": ["title"]}}}
async fn fetch(url: &str) -> Result<String, reqwest::Error> { reqwest::get(url).await?.text().await }
SELECT name, email FROM users WHERE created_at > NOW() - INTERVAL '7 days' ORDER BY created_at DESC;
The assistant should respond with a single tool_call when the user asks for an action that a provided function can perform, and answer directly otherwise.
User: Book a flight from Tbilisi to Paris on June 30. Tool: book_flight {"from": "TBS", "to": "CDG", "date": "2026-06-30"}.
User: What time is it in Tokyo? Assistant calls get_time {"timezone": "Asia/Tokyo"}.
User: Translate "hello" to French. translate {"text": "hello", "source": "en", "target": "fr"}.
class Calculator:\n def add(self, a: float, b: float) -> float:\n return a + b\n def divide(self, a: float, b: float) -> float:\n return a / b
User: Create a GitHub issue titled "Bug in parser". Tool: create_issue {"title": "Bug in parser", "body": "The tokenizer crashes on empty input."}
User: Write a haiku about the sea. (No tool needed.) The assistant answers in prose without calling any function.
const handler = async (req, res) => { const data = await db.query('SELECT * FROM logs'); res.json(data); };
User: Delete the file temp.txt. Tool call: delete_file {"path": "temp.txt"}.
User: Get the stock price of AAPL. get_stock_price {"symbol": "AAPL"}.
User: Set a reminder for 9am tomorrow to call the dentist. set_reminder {"time": "2026-06-24T09:00", "message": "call the dentist"}.
package main\n\nimport "fmt"\n\nfunc main() { fmt.Println("hello world") }
User: How many days until New Year? Assistant calls days_until {"date": "2027-01-01"} and computes the difference.