--- license: apache-2.0 task_categories: - text-generation language: - en tags: - tool-calling - function-calling - trl - sft size_categories: - n<1K configs: - config_name: default data_files: - split: train path: data/train-* dataset_info: features: - name: messages list: json - name: tools list: - name: type dtype: string - name: function struct: - name: name dtype: string - name: description dtype: string - name: parameters struct: - name: type dtype: string - name: properties dtype: json - name: required list: string - name: return struct: - name: type dtype: string - name: description dtype: string splits: - name: train num_bytes: 900362 num_examples: 500 download_size: 898676 dataset_size: 900362 --- # tool-calls-mini 500 synthetic tool-calling conversations in [TRL's conversational format](https://huggingface.co/docs/trl/dataset_formats#tool-calling), for supervised fine-tuning. Built to be *coherent*: every tool result is a plausible function of the arguments it was called with, and every final answer reflects that result — so the set teaches when to call a tool, not just what a call looks like. ## Format Each row has `messages` and `tools`. An assistant turn carries `tool_calls` instead of `content`; the tool replies as a `tool` role turn with `name` and `content`. The `tools` column holds JSON schemas generated with `transformers.utils.get_json_schema`. ```python { "messages": [ {"role": "user", "content": "How much is 2400 euros in yen?"}, {"role": "assistant", "tool_calls": [ {"type": "function", "function": {"name": "convert_currency", "arguments": {"amount": 2400.0, "from_currency": "EUR", "to_currency": "JPY"}}}]}, {"role": "tool", "name": "convert_currency", "content": "2400 EUR = 402,168.00 JPY at 167.57 JPY/EUR."}, {"role": "assistant", "content": "2,400 euros is about ¥402,168 at today's rate."} ], "tools": [ ... ] } ``` ## Composition | shape | rows | what it teaches | | --- | --- | --- | | single | 232 | one call, one result, one answer | | sequential | 73 | a second call whose arguments depend on the first result | | parallel | 51 | several calls in one assistant turn | | failure | 57 | the tool errors and the assistant says so rather than inventing | | clarify | 44 | a required argument is missing, so ask before calling | | no_call | 43 | tools are available and none is the right move | 457 rows contain at least one call; 43 deliberately contain none. Those 43 are the point: a dataset of nothing but successful calls teaches a model to reach for a tool at every turn, and one with no error cases teaches it to trust every result. 16 tools across weather, travel, calendar, email, finance, database, translation and logistics. Each row offers the tools it needs plus 1–4 unrelated distractors (mean 3.6 offered), so the right call can't be inferred from the schema list alone. Roughly a quarter of rows carry a system prompt. ## Verified All 500 rows pass TRL's SFT preparation with `assistant_only_loss=True` — no row is fully masked, and the mask covers the `tool_calls` turns as well as the final text answer. Mean 698 tokens per row (Qwen3 tokenizer), 12.4% of tokens supervised. No row calls a tool that isn't offered in its own `tools` column. ## Caveats Synthetic and template-composed: the entity pools are finite, so phrasings recur with different arguments, and the tool results are plausible rather than real. Suited to teaching the tool-calling *protocol* and call/no-call judgement; not a benchmark, and not a substitute for traces from a real tool-using system.