WorksComputer Science
TOUMAII: A 4.5M-Pair Tool-Calling Preference Dataset and Its Source-Agnostic Generator
Abstract
To autonomously execute multi-step tasks, enterprise agents must reliably interact with tools, call APIs, or query databases, making tool-calling a fundamental capability of AI models. Supervised fine-tuning (SFT) optimises for producing the correct call, but never contrasts it with a plausible incorrect one. In an environment where even a minor formatting error can invalidate a call and an incorrect decision can derail the interaction, direct preference optimisation (DPO) targets exactly this contrast. DPO, therefore, requires preference pairs rather than plain demonstrations. For tool-calling, such data, especially in realistic multi-turn settings, remains extremely scarce. To address this scarcity, we introduce TOUMAII, a large-scale tool-calling preference dataset containing ~4.5M validated preference pairs, derived from Agent-Ark/Toucan-1.5M (apache-2.0) conversations. The dataset consists of multi- and single-turn interactions and includes parallel and sequential function calls. Additionally, we release TOUMAII-Gen, a synthetic data generation pipeline that consumes tool-calling SFT datasets and generates a preference dataset with naturally occurring model-generated tool-calling failure modes. To validate the effectiveness of our DPO data, we fine-tune a 3-billion-parameter model, achieving performance parity with other high-quality tool-calling preference datasets. Furthermore, we release a second small preference dataset derived from ToolACE (apache-2.0), showcasing the source-agnostic nature of our pipeline. We release the complete code and datasets: https://github.com/tum-ai/toumaii-gen and https://huggingface.co/collections/tum-ai/toumaii-generated-datasets
Preprint.
Introduction
Enterprise AI is shifting from language models used as passive answer generators to agents that autonomously execute multi-step tasks on existing business systems [2, 12]. To connect to these systems, agents rely on tool-calls to interact with developer tools, query databases, or read and process documents. Reliable tool use requires models to produce schema-conformant arguments and correct function names, and to maintain context across multiple interaction turns. Benchmarks such as the Berkeley Function Calling Leaderboard (BFCL) [16] and -bench [3] probe these increasingly complex scenarios, which are especially challenging for the small language models favoured in enterprise settings for cost, latency, and local deployment. The importance of reliable tool-calling has sparked broad interest in tool-calling training data: large corpora of tool-call demonstrations for supervised fine-tuning (SFT) [14], and models trained on them, are now available. Gorilla [15] targets API hallucination, ToolLLM [18] covers real multi-step endpoints, APIGen [11] adds execution-level verification, xLAM [23] and Hammer [9] train function-calling model families on such corpora, ToolACE [10] increases API diversity, and Toucan [22] grounds trajectories in live MCP servers.
SFT on such corpora provides token-level supervision from ground-truth tool-calls, but the loss is computed over positive examples only, providing no signal that ranks a valid call above a plausible malformed one. Direct preference optimisation (DPO) [19] targets exactly such errors by contrasting chosen demonstrations drawn from successful trajectories against malformed answers or erroneous decisions, adjusting model weights without needing a separate reward model. DPO has become a standard stage of open post-training recipes such as Tülu 3 [8] and the fully open OLMo 2 [13]. The preference data such recipes consume, however, is general-purpose: pipelines like Tülu 3 and UltraFeedback [4] cover domains such as mathematics, instruction following, or coding, and score responses with LLM-as-a-judge criteria that capture neither format correctness nor argument validity. DiaTool-DPO [7] targets tool-specific preferences but focuses on dialogue control, i.e., whether an agent should make a tool-call, request more information, or reject a request. Preference data for the tool-calls themselves, especially in realistic multi-turn settings, remains extremely scarce.
To address this gap, we release TOUMAll, the largest tool-calling preference dataset, spanning single- and multi-turn interactions with sequential and parallel function calls, derived from Toucan (Agent-Ark/Toucan-1.5M). TOUMAll is produced by TOUMAll-Gen, a fully open-source synthetic preference-data generation pipeline that converts tool-calling SFT datasets (ground-truth demonstrations, tool catalogues, and conversation histories) into assessed preference pairs whose rejected responses contain naturally occurring, model-generated tool-calling errors; any public or private Hugging Face compatible source can be incorporated by implementing a lightweight source adapter. Applying the pipeline to ToolACE yields TOUMAll-ACE, demonstrating its source-agnostic architecture.
Preference-pair generation pipeline
As shown in Figure 1, we construct a tool-calling preference dataset by pairing a reference response from the quality-filtered source dataset with a response generated by the generator model. We transform a conversation into a common response-level representation , where id is the unique conversation identifier, denotes the conversation history preceding the target assistant response at turn , the tool catalogue, and a reference response consisting of one or more function calls. These elements are typically present in SFT tool-calling datasets, so any source can be mapped to this representation, keeping all subsequent stages independent of its structure and formatting. For each normalised row, we prompt the generator model with and to generate the corresponding assistant response. For TOUMAll, we choose Granite-4.0-350M, Granite-4.0-1B [5] and Granite-4.1-3B [6] from the Granite family, Qwen3-0.6B, Qwen3-1.7B [21] from the Qwen family and Gemma-4-E2B-it from Google [20]. We keep thinking disabled for all models to avoid ill-formatted or unparseable thinking traces. We intentionally select small language models from three families because they commonly exhibit naturally occurring model-generated tool-calling errors, such as incorrect or missing arguments, incorrect function names, or failing to produce a function call at all; Appendix § 7 shows representative examples. Each model-generated assistant turn is treated as a rejected candidate and evaluated against the reference response . We retain the preference pair only if the model response passes a simple validation check that verifies inequality between the reference and model responses. A valid rejected answer R is then kept, creating a full canonical-format row . To assess response quality, we employ reward functions to annotate the data; these rewards measure agreement with the reference response rather than execution success, quantifying how far a response deviates from the reference rather than proving it incorrect. Following ToolRL [17], we score each response as , where rewards a correctly formatted tool-call and scores function names and argument key-value pairs against the reference; we min-max normalise the sum from to . Furthermore, we utilise a more fine-grained weighted multi-component curriculum reward, with all components normalised to :
Figure 1. Overview of the preference-data generation pipeline TOUMAII-Gen. Data from various sources are converted into a canonical format, and models from the pool generate rejected candidates conditioned on the chosen conversation trajectories. The resulting preference pairs are then assessed and filtered during post-processing. The final dataset retains the canonical format and can be converted into SFT and DPO training formats.
which allows for shifting weights mid-training to progressively train with increasingly difficult samples. Both reward annotations are released with every pair.
Interaction structure. TOUMAII-Gen explicitly separates the input SFT data by interaction complexity. We keep subsets of multi- and single-turn interactions, where a turn is defined as a full user-assistant interaction. Within the two subsets, we further distinguish between single- and multi-call tool use. If the assistant calls more than one function, we process the calls both sequentially (single-call) and in parallel (multi-call). This results in four interaction categories: single-turn single-call (ST–SC), single-turn multi-call (ST–MC), multi-turn single-call (MT–SC), and multi-turn multi-call (MT–MC). Figure 2 shows their distribution in TOUMAII.
Figure 2. Distribution of generated preference pairs across generator models and interaction categories for the Kimi-K2, OSS, and Qwen source partitions.
Post-processing. A post-processing step retains only pairs whose rejected response measurably deviates from the reference response. Using the reward annotations, we remove pairs whose responses are equivalent (zero reward difference), as well as samples in which the chosen response contains long text-value arguments, for which semantic equivalence cannot be assessed reliably. As a sanity check, we verify the preference ordering: chosen responses always attain the maximum ToolRL reward, as they coincide with the reference. Furthermore, we remove later turns in which an earlier rejected response already contained the same tool-calls as those in the remaining chosen interaction, and we remove duplicate rows between subsets. Overall, 46.8% of the 9.65M generated candidate pairs survive post-processing; Appendix § 8.§ 1 reports per-rule removal counts.
Dataset characterisation
The source SFT dataset, Toucan, consists of approximately 1.5 million rows across the Kimi-K2, Qwen, and OSS partitions, each comprising both single- and multi-turn interactions. From the full source dataset, we filter samples based on the annotated quality metrics to retain only well-formed, successful trajectories; an individual chosen call may still be corrected in a later turn after tool feedback (Appendix § 7.§ 2 shows such an error-recovery case), so correctness holds at the trajectory level rather than for every isolated call. For each partition, we construct a separate TOUMAII dataset, organised by the generator model and the four interaction categories defined above. As illustrated in Figure 2, we derive on average ~1.5 million preference pairs per source partition (1.37M for Kimi-K2, 1.73M for OSS, 1.41M for Qwen; exact counts in Table 2). The reward annotations (distributions in Appendix § 8) span the full range from absent or malformed tool-calls to near-correct responses with small deviations from the reference, allowing the data to be separated into higher- and lower-margin categories. To the best of our knowledge, with a total of ~4.5 million preference pairs, TOUMAII is the largest tool-calling preference dataset; the largest prior corpus, released with ToolRM [1], contains ~459K pairs. The same pipeline applied to ToolACE yields TOUMAII-ACE with a further 100,846 preference pairs; Appendix § 9 reports its composition and post-processing funnel.
| Partition | Generator model | MT–MC | MT–SC | ST–MC | ST–SC | Total |
| Kimi-K2 | Qwen3-0.6B | 102,209 | 131,131 | 34,914 | 44,312 | 312,566 |
| Qwen3-1.7B | 61,930 | 86,979 | 21,721 | 30,929 | 201,559 | |
| Gemma-4-E2B-it | 62,592 | 96,091 | 21,207 | 32,575 | 212,465 | |
| Granite-4.0-350M | 94,081 | 132,927 | 26,229 | 30,522 | 283,759 | |
| Granite-4.0-1B | 62,949 | 78,669 | 23,480 | 25,221 | 190,319 | |
| Granite-4.1-3B | 57,809 | 68,687 | 20,807 | 21,261 | 168,564 | |
| All models | 441,570 | 594,484 | 148,358 | 184,820 | 1,369,232 | |
| OSS | Qwen3-0.6B | 125,299 | 125,128 | 55,560 | 55,547 | 361,534 |
| Qwen3-1.7B | 115,117 | 115,190 | 49,949 | 49,966 | 330,222 | |
| Gemma-4-E2B-it | 105,450 | 105,504 | 45,084 | 45,082 | 301,120 | |
| Granite-4.0-350M | 100,185 | 100,154 | 36,712 | 36,687 | 273,738 | |
| Granite-4.0-1B | 90,423 | 90,477 | 30,312 | 30,338 | 241,550 | |
| Granite-4.1-3B | 85,045 | 85,090 | 27,884 | 27,874 | 225,893 | |
| All models | 621,519 | 621,543 | 245,501 | 245,494 | 1,734,057 | |
| Qwen | Qwen3-0.6B | 85,942 | 128,946 | 24,163 | 39,757 | 278,808 |
| Qwen3-1.7B | 74,143 | 109,831 | 21,757 | 35,848 | 241,579 | |
| Gemma-4-E2B-it | 72,309 | 115,419 | 20,253 | 34,733 | 242,714 | |
| Granite-4.0-350M | 75,219 | 112,788 | 23,238 | 31,208 | 242,453 | |
| Granite-4.0-1B | 68,363 | 94,215 | 22,007 | 26,222 | 210,807 | |
| Granite-4.1-3B | 64,511 | 88,346 | 19,815 | 23,181 | 195,853 | |
| All models | 440,487 | 649,545 | 131,233 | 190,949 | 1,412,214 | |
| Total | 4,515,503 |
Table 2. Exact number of preference pairs in TOUMAII per source partition, generator model, and interaction category. Totals per partition and the grand total match Figure 2.
Experiment
To validate the effectiveness of TOUMAII, we compare it against the training data released with ToolRM [1]. The experiment is designed to isolate the effect of the training data: model architecture, optimisation, training budget, sequence filtering, checkpoint schedule, and evaluation are held constant, and each experimental unit is a newly initialised LoRA adapter trained with DPO and SFT multi-loss (weighted 0.5 and 0.5) from the same Granite-4.1-3B base checkpoint on a non-overlapping data slice.
Table 1: BFCL v4 accuracy (%) after DPO training. Fine-tuned results are the mean sample standard deviation across four non-overlapping data slices (000–003).
| Overall | Non-live AST | Live | Multi-turn | Memory | |
| Base model | 37.76 | 87.04 | 76.54 | 23.00 | 33.55 |
| + ToolRM | |||||
| + TOUMAII |
Table 1. BFCL v4 accuracy (%) after DPO training. Fine-tuned results are the mean sample standard deviation across four non-overlapping data slices (000–003).
Setup
From TOUMAII, we sample preference pairs evenly across the three source partitions and, within each partition, as evenly as capacity permits across the four interaction categories, drawing each conversation at most once per generator model. Both datasets are normalised to the same prompt–chosen–rejected format with the Granite chat template and filtered to a 2048-token budget (dropped, not truncated). After filtering, each rendered corpus is deterministically shuffled and partitioned into four non-overlapping slices, numbered 000–003, each containing at most 50,000 preference pairs. Each slice is used for a single training run only, keeping a fixed training seed at 42 throughout. Models are trained in BF16 quantization on a server with 1 AMD MI300X (192 GB VRAM), with each model taking an approximate time of 6 hours; additional data-preparation details and the complete LoRA and training configuration are given in Appendix § 10.
Results
We evaluate all models on BFCL v4 [16]. While Table 7 reports the mean and sample standard deviation across the four data-slices, on non-live AST, live, multi-turn, memory and overall accuracy, we report the complete per-slice BFCL V4 evaluation results in Appendix § 11. Across four slices, TOUMAII favours successful tool execution over abstention, consistent with its lack of irrelevance samples, and improves live accuracy to , versus for ToolRM and for the base model. It also reaches memory accuracy, exceeding ToolRM by 6.35 percentage points and the base model by 1.13 points.
Table 7: Complete BFCL v4 results (%). “Base” denotes the unmodified ibm-granite/granite-4.1-3b checkpoint. Irrelevance detection is the unweighted mean of the non-live and live irrelevance categories.
| Metric | Base | ToolRM slice | 000 | 001 | 002 | 003 | TOUMAII slice | 000 | 001 |
| – | |||||||||
| Overall | |||||||||
| Overall accuracy | 37.76 | 36.57 | 35.78 | 36.20 | 35.63 | 37.58 | 37.26 | 36.62 | 36.58 |
| Non-live | |||||||||
| Non-live AST | 87.04 | 86.38 | 86.48 | 86.10 | 86.25 | 86.85 | 86.81 | 86.58 | 86.98 |
| Simple AST | 75.67 | 74.50 | 73.42 | 74.42 | 74.50 | 74.42 | 74.75 | 73.83 | 74.42 |
| Multiple | 93.00 | 94.00 | 94.00 | 94.00 | 94.50 | 93.00 | 93.00 | 93.50 | 93.50 |
| Parallel | 92.00 | 90.50 | 91.50 | 91.00 | 90.50 | 92.00 | 91.50 | 91.50 | 92.00 |
| Parallel multiple | 87.50 | 86.50 | 87.00 | 85.00 | 85.50 | 88.00 | 88.00 | 87.50 | 88.00 |
| Live | |||||||||
| Live accuracy | 76.54 | 75.13 | 75.13 | 75.35 | 75.20 | 77.79 | 77.42 | 77.57 | 77.42 |
| Simple | 77.91 | 74.42 | 75.97 | 74.81 | 75.58 | 80.23 | 80.23 | 78.68 | 78.68 |
| Multiple | 76.54 | 75.50 | 75.12 | 75.69 | 75.31 | 77.40 | 76.92 | 77.40 | 77.21 |
| Parallel | 75.00 | 75.00 | 75.00 | 75.00 | 75.00 | 75.00 | 75.00 | 75.00 | 75.00 |
| Parallel multiple | 62.50 | 66.67 | 66.67 | 66.67 | 66.67 | 70.83 | 70.83 | 75.00 | 75.00 |
| Multi-turn | |||||||||
| Multi-turn accuracy | 23.00 | 21.38 | 20.00 | 21.25 | 21.50 | 21.88 | 21.38 | 20.62 | 20.88 |
| Base | 29.50 | 27.00 | 26.00 | 26.00 | 28.50 | 28.50 | 27.00 | 28.50 | 30.50 |
| Missing function | 20.00 | 22.00 | 19.00 | 23.00 | 22.00 | 17.50 | 16.00 | 15.00 | 14.50 |
| Missing parameter | 18.00 | 15.00 | 14.50 | 16.00 | 15.00 | 17.50 | 18.50 | 16.50 | 14.50 |
| Long context | 24.50 | 21.50 | 20.50 | 20.00 | 20.50 | 24.00 | 24.00 | 22.50 | 24.00 |
| Agentic | |||||||||
| Web-search accuracy | 1.00 | 1.50 | 1.00 | 1.00 | 1.00 | 2.50 | 2.00 | 3.00 | 3.00 |
| With snippet | 1.00 | 2.00 | 1.00 | 1.00 | 1.00 | 3.00 | 2.00 | 3.00 | 3.00 |
| Without snippet | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 2.00 | 2.00 | 3.00 | 3.00 |
| Memory accuracy | 33.55 | 29.89 | 28.17 | 28.60 | 26.67 | 35.70 | 35.48 | 34.19 | 33.33 |
| Key–value | 12.26 | 9.03 | 9.03 | 9.68 | 10.97 | 14.19 | 20.00 | 13.55 | 14.84 |
| Vector | 45.16 | 36.77 | 35.48 | 36.77 | 33.55 | 50.32 | 46.45 | 45.16 | 41.94 |
| Recursive summarisation | 43.23 | 43.87 | 40.00 | 39.35 | 35.48 | 42.58 | 40.00 | 43.87 | 43.23 |
| Detection aggregates | |||||||||
| Relevance detection | 81.25 | 81.25 | 81.25 | 81.25 | 81.25 | 87.50 | 87.50 | 87.50 | 87.50 |
| Irrelevance detection | 75.97 | 77.24 | 77.89 | 77.64 | 75.03 | 69.11 | 69.23 | 65.75 | 66.08 |
Table 7. Complete BFCL v4 results (%). “Base” denotes the unmodified ibm-granite/granite-4.1-3b checkpoint. Irrelevance detection is the unweighted mean of the non-live and live irrelevance categories.
Limitations
TOUMAII does not currently include irrelevance samples, and reasoning was disabled during rejected-response generation. Our automated validation measures agreement with reference tool calls rather than execution-level or semantic correctness, so retained pairs may contain reference errors or alternative valid calls. The dataset additionally inherits limitations of its source data and generator models; extended limitations and responsible-release considerations are discussed in Appendix § 12.
Acknowledgement
This work used computing resources made available through the AMD University Program (AUP) AI & HPC Cluster.
Qualitative examples
We provide representative preference pairs illustrating different types of naturally occurring model-generated tool-calling errors. The examples cover a near-correct argument-value error, a context-dependent multi-call error, and a complete failure to invoke an available tool.
Subtle argument-value error
Figure 3 shows an ST–SC (single-turn-single-call) preference pair from the Qwen source partition, with the rejected response generated by Gemma-4-E2B-it. Both responses select the correct function, follow the required tool-call format, and provide the correct cryptocurrency identifier. They differ only in the capitalisation of the currency argument. Despite appearing semantically equivalent to a human reader, the rejected value deviates from the schema-defined one and would cause the call to fail against a case-sensitive API.

Figure 3. ST–SC preference pair from the Qwen partition, with the rejected response generated by Gemma-4-E2B-it. The rejected call differs from the chosen call only by using "USD" instead of the schema-defined value "usd", reducing its ToolRL reward from 1.0 to 0.79.
Multi-turn recovery and call-coverage errors
Figures 4 and 5 show two target turns from an MT–MC(multi-turn-multi-call) conversation of the Qwen partition with rejected responses generated by Granite-4.1-3B. The initial turn tests whether the model covers both parts of the user’s request. The subsequent turn tests whether it incorporates explicit feedback from the tool environment.
Initial user request
I need to prepare a detailed weather report for a meeting
tomorrow in Lisbon, Portugal. Can you first get the detailed
weather forecast for Lisbon, and then provide the current
temperature at my event location at
38.7223 degrees N, 9.1393 degrees W?
Relevant tool definitions
get_live_temp(
latitude: number,
longitude: number
)
get_weather_forecast(
city: string, // e.g. "Lisboa", "Porto", ...
days: number = 5
)
Chosen response
[
{
"name": "get_weather_forecast",
"arguments": {
"city": "Lisbon",
"days": 1
}
},
{
"name": "get_live_temp",
"arguments": {
"latitude": 38.7223,
"longitude": -9.1393
}
}
]
Rejected response
[
{
"name": "get_weather_forecast",
"arguments": {
"city": "Lisbon",
"days": 3
}
}
]
ToolRL reward: 1.0
ToolRL reward: 0.45
Function-name prefixes are omitted for readability.

Figure 4. Initial target turn of an MT–MC conversation with a rejected response generated by Granite-4.1-3B. The rejected response omits one of the two requested calls and uses an incorrect forecast horizon, resulting in a ToolRL reward of 0.45.
Qualitative examples
Tool feedback
Forecast tool:
Cidade "Lisbon" nao encontrada.
Use get_locations para ver cidades disponiveis.
Temperature tool:
{"temperature": 27.7}
User follow-up
Could you try retrieving the detailed weather forecast for
Lisbon again, perhaps by using the correct city name or its
coordinates, so I can include it in my meeting report?
Chosen response
{
"name": "get_weather_forecast",
"arguments": {
"city": "Lisboa",
"days": 1
}
}
Rejected response
{
"name": "get_weather_forecast",
"arguments": {
"city": "Lisbon",
"days": 1
}
}
ToolRL reward: 1.0
ToolRL reward: 0.79
The conversation is abridged to the messages relevant to the illustrated error. Function-name prefixes are omitted for readability.

Figure 5. Corrective target turn from the same MT–MC conversation. After the tool environment reports that "Lisbon" is not recognised, the rejected response repeats the same argument instead of using "Lisboa". This failure to incorporate tool feedback results in a ToolRL reward of 0.79.
Failure to invoke an available external-information tool
Figure 6 shows an ST–SC preference pair from the OSS partition, with the rejected response generated by Granite-4.0-350M. The request requires weather information that cannot be reliably obtained from the model’s static parameters. The tool catalogue provides a weather-retrieval function, and the reference trajectory begins by invoking this function for Tokyo.

User request
I’m planning a trip to Tokyo next month and need to estimate my
budget. I need to know the average high and low temperatures for
the week of my travel. Then, calculate the average of these
temperatures and convert it from Celsius to Fahrenheit.Relevant tool definitions
get_weather(
city: string
)
calculate(
expression: string
)Chosen response
{
"name": "get_weather",
"arguments": {
"city": "Tokyo"
}
}ToolRL reward: 1.0
Rejected response
I’m sorry, but I don’t have access to
real-time weather data, so I can’t provide
the temperatures for Tokyo or calculate
the weekly average.
If you provide the data, I can help
perform the calculations.ToolRL reward: 0.0
The tool catalogue and rejected response are abridged for readability.
Figure 6. Rejected response generated by Granite-4.0-350M. The reference response initiates the external-information retrieval process by invoking get_weather for Tokyo. The rejected response instead claims that weather data are unavailable and produces no tool-call, resulting in a ToolRL reward of 0.0.
The rejected response instead claims that weather data are unavailable and produces no tool-call. It therefore fails to initiate the expected tool-use trajectory despite the presence of a relevant external-information tool.
Additional dataset statistics
Dataset composition and cleaning statistics
Table 2 reports the exact number of preference pairs per source partition, generator model, and interaction category, complementing Figure 2. Table 3 details the post-processing funnel: of the 9,648,704 candidate pairs produced by the generation stage, 46.8% survive post-processing. Most removals are pairs whose rejected response is indistinguishable, under all reward components, from the reference (zero reward difference), followed by samples whose chosen response contains long free-text argument values, for which semantic equivalence cannot be assessed reliably.
Table 3: Post-processing funnel: candidate preference pairs generated per source partition and rows removed by each cleaning rule. A row can violate several rules, so per-rule counts add up to slightly more than the number of removed rows. Cross-subset duplicates are multi-turn rows whose (prompt, chosen, rejected) triplet also occurs in the corresponding single-turn subsets.
| Kimi-K2 | OSS | Qwen | Total | |
| Generated candidate pairs | 3,265,902 | 3,276,094 | 3,106,708 | 9,648,704 |
| reference-identical pair (zero reward difference) | 1,131,835 | 841,087 | 822,975 | 2,795,897 |
| long free-text value in chosen response (> 30 words) | 531,759 | 486,280 | 634,153 | 1,652,192 |
| rejected response equals a later chosen turn | 29,973 | 25,569 | 25,776 | 81,318 |
| Rows removed as invalid tool errors | 1,670,873 | 1,338,784 | 1,461,683 | 4,471,340 |
| Cross-subset duplicates (multi-turn vs. single-turn) | 225,797 | 203,253 | 232,811 | 661,861 |
| Final preference pairs (after de-duplication) | 1,369,232 | 1,734,057 | 1,412,214 | 4,515,503 |
| Retention | 41.9% | 52.9% | 45.5% | 46.8% |
Table 3. Post-processing funnel: candidate preference pairs generated per source partition and rows removed by each cleaning rule. A row can violate several rules, so per-rule counts add up to slightly more than the number of removed rows. Cross-subset duplicates are multi-turn rows whose (prompt, chosen, rejected) triplet also occurs in the corresponding single-turn subsets.
Figure 7 characterises the failure modes of the rejected responses, classified from the curriculum-reward components introduced in § 2: responses with no parseable tool-call, responses in which at least one function name does not exactly match the reference (including missing or extra calls and incorrect call order), and responses with correct function names but incorrect argument key–value pairs. The smallest generator fails predominantly by producing no tool-call at all (up to 75%), whereas larger generators shift towards argument-level errors (up to 50%), providing preference pairs with progressively finer-grained error signals.
Figure 7. Failure-mode composition of rejected responses per generator model and source partition, classified from the curriculum-reward components of the rejected response. Function-name mismatch includes missing or extra calls and incorrect call order; Other denotes pairs whose parsed calls match the reference on all reward components.
Reward distributions
Figure 8 presents the rejected-response ToolRL reward distributions after pooling the four interaction categories within each source partition. Below, we provide a more detailed decomposition by generator model and interaction category. Figures 9–11 report the distributions for the Kimi-K2, OSS, and Qwen source partitions, respectively.
Each panel corresponds to one generator model and overlays the distributions for MT–MC (multi-turn-multi-call), MT–SC (multi-turn-single-call), ST–MC (single-turn-multi-call), and ST–SC (single-turn-single-call) interactions. The histograms are non-cumulative and unweighted, with a bin width of 0.05. Each stored reward entry contributes equally, and associated frequency fields are not used as weights. Because every distribution is normalised independently, the figures compare distributional shapes rather than the absolute number of generated preference pairs.
Across source partitions and generator models, rejected responses cover a broad range of ToolRL rewards. Low-reward regions represent substantial tool-calling failures, whereas rewards closer to 1.0 generally correspond to near-correct responses containing smaller deviations from the reference call. The differences between interaction categories are model- and source-dependent. No single ordering between ST, MT, SC, and MC interactions holds consistently across all panels.
Figure 8. Distribution of rejected-response ToolRL rewards across generator models and source partitions (interaction categories pooled).
Figure 9. Model-specific distributions of rejected-response ToolRL rewards for the Kimi-K2 source partition. Each panel corresponds to one generator model, while the four lines represent MT–MC, MT–SC, ST–MC, and ST–SC interactions. The distributions are unweighted and non-cumulative, use a bin width of 0.05, and are independently normalised. Q3, Gm4, and Gr denote Qwen3, Gemma 4, and Granite, respectively. Chosen-response rewards are omitted because they are uniformly 1.0.
Figure 10. Model-specific distributions of rejected-response ToolRL rewards for the OSS source partition. Each panel corresponds to one generator model, while the four lines represent MT–MC, MT–SC, ST–MC, and ST–SC interactions. The distributions are unweighted and non-cumulative, use a bin width of 0.05, and are independently normalised. Q3, Gm4, and Gr denote Qwen3, Gemma 4, and Granite, respectively. Chosen-response rewards are omitted because they are uniformly 1.0.
Figure 11. Model-specific distributions of rejected-response ToolRL rewards for the Qwen source partition. Each panel corresponds to one generator model, while the four lines represent MT–MC, MT–SC, ST–MC, and ST–SC interactions. The distributions are unweighted and non-cumulative, use a bin width of 0.05, and are independently normalised. Q3, Gm4, and Gr denote Qwen3, Gemma 4, and Granite, respectively. Chosen-response rewards are omitted because they are uniformly 1.0.
Token-length distributions
In addition to the ToolRL reward distributions, we characterise the sequence lengths occurring in the generated preference data. Figures 12–14 show the token-length distributions for the Kimi-K2, OSS, and Qwen source partitions, respectively.
Each figure separates four components of a preference pair: the conversation history (messages), the tool catalogue, and the chosen and rejected responses. The four interaction categories (MT–MC, MT–SC, ST–MC, and ST–SC) are pooled, each curve corresponds to one generator subset and is normalised independently, and the in-panel statistics (count, mean, median, 90th and 99th percentiles, maximum) summarise the component over the full partition. All lengths are measured with the Granite 4.0 tokenizer, independently of the generator model, so the curves are directly comparable across generator subsets. Message and tool-catalogue lengths are nearly identical across generator subsets, as they stem from the same source conversations and differ only through subset membership; the chosen- and rejected-response panels characterise the output lengths of the preference pairs themselves. Token lengths span several orders of magnitude, so the horizontal axis is logarithmic.
Figure 12. Token-length distributions for the Kimi-K2 source partition, measured with the Granite 4.0 tokenizer. Panels show the conversation history (messages), the tool catalogue, and the chosen and rejected responses; interaction categories are pooled, and each curve corresponds to one generator subset, normalised independently. In-panel statistics summarise the component over the full partition. The horizontal axis is logarithmic. Q3, Gm4, and Gr denote Qwen3, Gemma 4, and Granite, respectively.
Figure 13. Token-length distributions for the OSS source partition, measured with the Granite 4.0 tokenizer. Panels show the conversation history (messages), the tool catalogue, and the chosen and rejected responses; interaction categories are pooled, and each curve corresponds to one generator subset, normalised independently. In-panel statistics summarise the component over the full partition. The horizontal axis is logarithmic. Q3, Gm4, and Gr denote Qwen3, Gemma 4, and Granite, respectively.
Figure 14. Token-length distributions for the Qwen source partition, measured with the Granite 4.0 tokenizer. Panels show the conversation history (messages), the tool catalogue, and the chosen and rejected responses; interaction categories are pooled, and each curve corresponds to one generator subset, normalised independently. In-panel statistics summarise the component over the full partition. The horizontal axis is logarithmic. Q3, Gm4, and Gr denote Qwen3, Gemma 4, and Granite, respectively.
TOUMAII-ACE
TOUMAII-ACE is constructed from ToolACE and follows the same post-processing procedure as the Toucan-derived partitions. Table 4 reports the resulting dataset composition across generator models and interaction categories, while Table 5 summarises the post-processing funnel. Figure 15 and Figure 16 report the rejected-response ToolRL reward distributions, and Figure 17 the token-length distributions.
| Generator model | MT–MC | MT–SC | ST–MC | ST–SC | Total |
| Qwen3-0.6B | 50 | 405 | 3,097 | 13,965 | 17,517 |
| Qwen3-1.7B | 44 | 416 | 2,815 | 14,039 | 17,314 |
| Gemma-4-E2B-it | 34 | 346 | 2,731 | 13,927 | 17,038 |
| Granite-4.0-350M | 40 | 327 | 2,751 | 13,781 | 16,899 |
| Granite-4.0-1B | 38 | 245 | 2,393 | 13,178 | 15,854 |
| Granite-4.1-3B | 32 | 274 | 2,382 | 13,536 | 16,224 |
| All models | 238 | 2,013 | 16,169 | 82,426 | 100,846 |
Table 4. Exact number of preference pairs in TOUMAII-ACE per generator model and interaction category after post-processing and cross-subset de-duplication.
| ToolACE | |
| Generated candidate pairs | 130,782 |
| reference-identical pair (zero reward difference) | 29,605 |
| long free-text value in chosen response (> 30 words) | 264 |
| rejected response equals a later chosen turn | 288 |
| Rows removed as invalid tool errors | 29,880 |
| Cross-subset duplicates (multi-turn vs. single-turn) | 56 |
| Final preference pairs (after de-duplication) | 100,846 |
| Retention | 77.1% |
Table 5. Post-processing funnel for TOUMAII-ACE. A row can violate several validity rules, so per-rule counts can sum to more than the number of unique rows removed. Cross-subset duplicates are multi-turn rows whose (prompt, chosen, rejected) triplet also occurs in the corresponding single-turn subsets. All 56 such duplicates were in MT–SC, and post-clean checks found no remaining overlaps.
Figure 15. Distribution of rejected-response ToolRL rewards for TOUMAII-ACE, pooled across generator models. The four curves correspond to MT–MC, MT–SC, ST–MC, and ST–SC interactions. The distributions are unweighted and non-cumulative, use a bin width of 0.05, and are independently normalised. Chosen-response rewards are omitted because they are uniformly 1.0.

Figure 16. Model-specific distributions of rejected-response ToolRL rewards for TOUMAII-ACE. Each panel corresponds to one generator model, while the four lines represent MT–MC, MT–SC, ST–MC, and ST–SC interactions. The distributions are unweighted and non-cumulative, use a bin width of 0.05, and are independently normalised. Q3, Gm4, and Gr denote Qwen3, Gemma 4, and Granite, respectively. Chosen-response rewards are omitted because they are uniformly 1.0.
Figure 17. Token-length distributions for TOUMAII-ACE, measured with the Granite 4.0 tokenizer. Panels show the conversation history (messages), the tool catalogue, and the chosen and rejected responses; interaction categories are pooled, and each curve corresponds to one generator subset, normalised independently. In-panel statistics summarise the component over the full dataset. The horizontal axis is logarithmic. Q3, Gm4, and Gr denote Qwen3, Gemma 4, and Granite, respectively.
Training details
Data preparation. The sampling and conversion protocol is summarised in § 4.1; we record here the details omitted there. The ToolRM corpus is ibm-research/ToolRM-train-data. Sequence lengths are measured after appending the EOS token. Both rendered datasets are deterministically shuffled with seed 42 and subsequently partitioned into non-overlapping 50,000-example slices. Each slice is used in an independent training run initialised from the same Granite checkpoint and trained with the fixed seed. Consequently, variation across runs reflects differences in training-data membership rather than training-seed variance.
Hyperparameters. Table 6 lists the complete LoRA and DPO configuration.
| Base model | ibm-granite/granite-4.1-3b |
| LoRA rank / / dropout | 64 / 64 / 0.0 |
| LoRA target modules | Attention and MLP projections (q/k/v/o, gate/up/down) |
| DPO | 0.1 |
| Optimiser / learning rate / schedule | AdamW (fused) / / linear with 5% warmup |
| Effective batch size | 64 () |
| Epochs per slice | 1 |
| Max sequence length | 2048 tokens |
| Precision / hardware | BF16, 1× AMD MI300X |
| Seed | 42 |
Table 6. LoRA and DPO training configuration.
Complete Evaluation Results
Table 7 reports the complete BFCL v4 results for the Granite baseline and each 50,000-example training-data slice. Slice identifiers denote non-overlapping partitions of the deterministically shuffled training corpora, rather than different random seeds. Web-search accuracy is excluded from the evaluation due to external API requirements. For completeness, we mention web-search accuracy in the table.
Extended Limitations and Responsible Release
Reference and Validation limitations
TOUMAII is constructed by pairing reference responses from quality-filtered trajectories (if quality indicators are present) with model-generated rejected responses. Our automated validation measures agreement with the reference tool-call (in this case, this is the chosen/completion response) rather than any execution-level or semantic correctness. Consequently, disagreement with the reference does not necessarily equate to a rejected response being invalid in every setting, and some retained pairs may contain alternative valid calls or reflect errors in the reference trajectory. Certain cleaning steps help prevent this situation to some extent, although, due to the nature of the generation, complete adherence cannot be guaranteed. This is particularly relevant for multi-turn examples, where correctness is established at the trajectory level, and an intermediate reference call may later be corrected after tool feedback.
Inherited source and generator limitations
The dataset inherits the features and limitations of the source datasets, including Toucan and ToolACE, in addition to the language models used to generate rejected responses. The generator pool comprises models which are publicly released instruction-tuned models with their own safety mechanisms, and we do not independently evaluate those mechanisms. As with any model generation, risks of hallucination, bias, and undesirable outputs can be expected in the generator pipeline, and necessary downstream validations should still be in place.
Potential downstream risks
TOUMAII is intended for training and evaluating tool-calling models. Improved tool-call reliability can reduce malformed calls and incorrect API interactions, but models trained on the dataset may still produce erroneous or inappropriate actions. Such errors may be more consequential when models are connected to external systems such as databases, APIs, or enterprise software. The dataset should therefore not be interpreted as certifying the safety or correctness of downstream models, and application-specific validation, permission controls, and other deployment safeguards remain necessary for consequential tool use.
Licensing and provenance
TOUMAII is derived from existing tool-calling datasets and augments them with newly generated rejected responses and annotations. The original source datasets and models are credited in the paper, and the corresponding licenses and usage terms should be retained in the released dataset documentation. The derived dataset should state its own license separately and clearly identify the provenance of its source examples.
References
- [1]Mayank Agarwal, Ibrahim Abdelaziz, Kinjal Basu, Merve Unuvar, Luis A. Lastras, Yara Rizk, and Pavan Kapanipathi. ToolRM: Outcome reward models for tool-calling large language models, 2025. URL https://arxiv.org/abs/2509.11963.
- [2]Sparsh Bajoria, Shreyanshu Ranjan, Adhitya M, Vineet Suri, Vikas Hassija, Vinay Chamola, and Amir Hussain. From language models to agentic AI: A survey of autonomous, action-enabled, and collaborative LLM agents. Cognitive Computation, 18(1):103, 2026. doi: 10.1007/s12559-026-10619-1. URL https://doi.org/10.1007/s12559-026-10619-1.
- [3]Victor Barres, Honghua Dong, Soham Ray, Xujie Si, and Karthik Narasimhan. τ²-Bench: Evaluating conversational agents in a dual-control environment, 2025. URL https://arxiv.org/abs/2506.07982.
- [4]Ganqu Cui, Lifan Yuan, Ning Ding, Guanming Yao, Bingxiang He, Wei Zhu, Yuan Ni, Guotong Xie, Ruobing Xie, Yankai Lin, Zhiyuan Liu, and Maosong Sun. Ultrafeedback: Boosting language models with scaled AI feedback, 2024. URL https://arxiv.org/abs/2310.01377.
- [5]IBM Research. Granite 4.0 nano language models. https://github.com/ibm-granite/granite-4.0-nano-language-models, 2025. Accessed: 2026-08-27.
- [6]IBM Research. Granite 4.1 language models. https://huggingface.co/blog/ibm-granite/granite-4-1, 2026. Accessed: 2026-08-27.
- [7]Sunghee Jung, Donghun Lee, Shinbok Lee, Gaeun Seo, Daniel Lee, Byeongil Ko, Junrae Cho, Kihyun Kim, Eunggyun Kim, and Myeongcheol Shin. DiaTool-DPO: Multi-turn direct preference optimization for tool-augmented large language models, 2025. URL https://arxiv.org/abs/2504.02882.
- [8]Nathan Lambert, Jacob Morrison, Valentina Pyatkin, Shengyi Huang, Hamish Ivison, Faeze Brahman, Lester James V. Miranda, Alisa Liu, Nouha Dziri, Shane Lyu, Yuling Gu, Saumya Malik, Victoria Graf, Jena D. Hwang, Jiangjiang Yang, Ronan Le Bras, Oyvind Tafjord, Chris Wilhelm, Luca Soldaini, Noah A. Smith, Yizhong Wang, Pradeep Dasigi, and Hannaneh Hajishirzi. Tulu 3: Pushing frontiers in open language model post-training, 2025. URL https://arxiv.org/abs/2411.15124.
- [9]Qiang Lin, Muning Wen, Qiuying Peng, Guanyu Nie, Junwei Liao, Jun Wang, Xiaoyun Mo, Jiamu Zhou, Cheng Cheng, Yin Zhao, Jun Wang, and Weinan Zhang. Hammer: Robust function-calling for on-device language models via function masking, 2024. URL https://arxiv.org/abs/2410.04587.
- [10]Weiwen Liu, Xu Huang, Xingshan Zeng, Xinlong Hao, Shuai Yu, Dexin Li, Shuai Wang, Weinan Gan, Zhengying Liu, Yuanqing Yu, Zezhong Wang, Yuxian Wang, Wu Ning, Yutai Hou, Bin Wang, Chuhan Wu, Xinzhi Wang, Yong Liu, Yasheng Wang, Duyu Tang, Dandan Tu, Lifeng Shang, Xin Jiang, Ruiming Tang, Defu Lian, Qun Liu, and Enhong Chen. Toolace: Winning the points of llm function calling, 2025. URL https://arxiv.org/abs/2409.00920.
- [11]Zuxin Liu, Thai Hoang, Jianguo Zhang, Ming Zhu, Tian Lan, Shirley Kokane, Juntao Tan, Weiran Yao, Zhiwei Liu, Yihao Feng, Rithesh Murthy, Liangwei Yang, Silvio Savarese, Juan Carlos Niebles, Huan Wang, Shelby Heinecke, and Caiming Xiong. Apigen: Automated pipeline for generating verifiable and diverse function-calling datasets, 2024. URL https://arxiv.org/abs/2406.18518.
- [12]Mahmoud Mohammadi, Yipeng Li, Jane Lo, and Wendy Yin. Evaluation and benchmarking of LLM agents: A survey. In Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V.2, KDD ’25, pages 6129–6139. ACM, 2025. doi: 10.1145/3711896.3736570. URL https://doi.org/10.1145/3711896.3736570.
- [13]Team OLMo, Pete Walsh, Luca Soldaini, Dirk Groeneveld, Kyle Lo, Shane Arora, Akshita Bhagia, Yuling Gu, Shengyi Huang, Matt Jordan, Nathan Lambert, Dustin Schwenk, Oyvind Tafjord, Taira Anderson, David Atkinson, Faeze Brahman, Christopher Clark, Pradeep Dasigi, Nouha Dziri, Allyson Ettinger, Michal Guerquin, David Heineman, Hamish Ivison, Pang Wei Koh, Jiacheng Liu, Saumya Malik, William Merrill, Lester James V. Miranda, Jacob Morrison, Tyler Murray, Crystal Nam, Jake Poznanski, Valentina Pyatkin, Aman Rangapur, Michael Schmitz, Sam Skjonsberg, David Wadden, Christopher Wilhelm, Michael Wilson, Luke Zettlemoyer, Ali Farhadi, Noah A. Smith, and Hannaneh Hajishirzi. 2 olmo 2 furious, 2025. URL https://arxiv.org/abs/2501.00656.
- [14]Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. Training language models to follow instructions with human feedback, 2022. URL https://arxiv.org/abs/2203.02155.
- [15]Shishir G. Patil, Tianjun Zhang, Xin Wang, and Joseph E. Gonzalez. Gorilla: Large language model connected with massive apis, 2023. URL https://arxiv.org/abs/2305.15334.
- [16]Shishir G. Patil, Huanzhi Mao, Charlie Cheng-Jie Ji, Fanjia Yan, Vishnu Suresh, Ion Stoica, and Joseph E. Gonzalez. The berkeley function calling leaderboard (bfcl): From tool use to agentic evaluation of large language models. In Forty-second International Conference on Machine Learning, 2025.
- [17]Cheng Qian, Emre Can Acikgoz, Qi He, Hongru Wang, Xiusi Chen, Dilek Hakkani-Tür, Gokhan Tur, and Heng Ji. ToolRL: Reward is all tool learning needs, 2025. URL https://arxiv.org/abs/2504.13958.
- [18]Yujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu, Lan Yan, Yaxi Lu, Yankai Lin, Xin Cong, Xiangru Tang, Bill Qian, Sihan Zhao, Lauren Hong, Runchu Tian, Ruobing Xie, Jie Zhou, Mark Gerstein, Dahai Li, Zhiyuan Liu, and Maosong Sun. Toolllm: Facilitating large language models to master 16000+ real-world apis, 2023. URL https://arxiv.org/abs/2307.16789.
- [19]Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D. Manning, and Chelsea Finn. Direct preference optimization: Your language model is secretly a reward model, 2024. URL https://arxiv.org/abs/2305.18290.
- [20]Gemma Team. Gemma 4 technical report, 2026. URL https://arxiv.org/abs/2607.02770.
- [21]Qwen Team. Qwen3 technical report, 2025. URL https://arxiv.org/abs/2505.09388.
- [22]Zhangchen Xu, Adriana Meza Soria, Shawn Tan, Anurag Roy, Ashish Sunil Agrawal, Radha Poovendran, and Rameswar Panda. TOUCAN: Synthesizing 1.5M tool-agentic data from real-world MCP environments, 2025. URL https://arxiv.org/abs/2510.01179.
- [23]Jianguo Zhang, Tian Lan, Ming Zhu, Zuxin Liu, Thai Hoang, Shirley Kokane, Weiran Yao, Juntao Tan, Akshara Prabhakar, Haolin Chen, Zhiwei Liu, Yihao Feng, Tulika Awadgaonkar, Rithesh Murthy, Eric Hu, Zeyuan Chen, Ran Xu, Juan Carlos Niebles, Shelby Heinecke, Huan Wang, Silvio Savarese, and Caiming Xiong. xlam: A family of large action models to empower ai agent systems, 2024. URL https://arxiv.org/abs/2409.03215.











