{
  "licence": "https://creativecommons.org/licenses/by/4.0/",
  "credit": "Saulius Beconis, sbeconis.com",
  "page": "https://sbeconis.com/lab/tool-calling/",
  "url": "https://sbeconis.com/lab/tool-calling/toolcall-2026-10-09.json",
  "note": "Measurements and text are CC BY 4.0. Source data and quoted excerpts keep their own licences: see \"attribution\".",
  "lab": "LAB/015",
  "title": "Tool-calling reliability of local models",
  "date": "2026-10-09",
  "method": {
    "data": "Berkeley Function Calling Leaderboard v3 (Apache-2.0): simple, multiple, live simple, irrelevance (all), live multiple and live irrelevance (300 each, seed 15); 1,698 items, first turn only",
    "models": "Qwen3-4B-Instruct-2507, Qwen3-8B, Qwen3-14B (Q4_K_M, llama.cpp native tool calling, thinking off, greedy)",
    "system prompt": "You are an assistant with access to tools. Call a tool only if it can answer the request; otherwise reply in text.",
    "scoring": "simplified BFCL AST check: right function, every ground-truth argument within its accepted values (strings standardised as BFCL does, nested dicts key by key), no undefined arguments; irrelevance: no call. The first scoring pass was too strict on nested dicts and punctuation and was corrected before publication (rescore.py)",
    "guardrail": "the same first answer validated against the tool's own schema (known function, required arguments, types, enums); on failure the error is returned and the model asked once more"
  },
  "environment": {
    "gpu": "RTX 4070 12 GB"
  },
  "tables": {
    "accuracy": {
      "caption": "Correct behaviour (%), by kind of request, raw tool calling. Median time per request on one RTX 4070.",
      "columns": [
        {
          "key": "simple",
          "label": "One tool offered",
          "suffix": "%"
        },
        {
          "key": "multiple",
          "label": "Pick from several tools",
          "suffix": "%"
        },
        {
          "key": "live_simple",
          "label": "Real-world, one tool",
          "suffix": "%"
        },
        {
          "key": "irrelevance",
          "label": "No tool fits (should not call)",
          "suffix": "%"
        },
        {
          "key": "live_multiple",
          "label": "Real-world, several tools",
          "suffix": "%"
        },
        {
          "key": "live_irrelevance",
          "label": "Real-world, no tool fits",
          "suffix": "%"
        },
        {
          "key": "all",
          "label": "All",
          "suffix": "%"
        },
        {
          "key": "lat",
          "label": "Median time",
          "suffix": " s",
          "decimals": 2
        }
      ],
      "rows": [
        {
          "label": "Qwen3-4B Instruct-2507 Q4_K_M",
          "cells": {
            "simple": 96,
            "multiple": 92,
            "live_simple": 72.1,
            "irrelevance": 91.2,
            "live_multiple": 73.7,
            "live_irrelevance": 88.3,
            "all": 85.9,
            "lat": 0.369
          }
        },
        {
          "label": "Qwen3-8B Q4_K_M",
          "cells": {
            "simple": 94,
            "multiple": 92,
            "live_simple": 66.7,
            "irrelevance": 89.6,
            "live_multiple": 70.7,
            "live_irrelevance": 83.7,
            "all": 83,
            "lat": 0.572
          }
        },
        {
          "label": "Qwen3-14B Q4_K_M",
          "cells": {
            "simple": 95.5,
            "multiple": 90.5,
            "live_simple": 71.3,
            "irrelevance": 90.8,
            "live_multiple": 72,
            "live_irrelevance": 88,
            "all": 85.1,
            "lat": 0.99
          }
        }
      ],
      "note": "Subset and simplified checker, so not directly comparable with the official leaderboard"
    },
    "guardrail": {
      "caption": "The schema guardrail: answers that failed the schema check (and were retried), and overall accuracy with and without it.",
      "columns": [
        {
          "key": "retried",
          "label": "Failed the schema check",
          "decimals": 0
        },
        {
          "key": "raw",
          "label": "Accuracy, raw",
          "suffix": "%"
        },
        {
          "key": "guard",
          "label": "Accuracy, with guardrail",
          "suffix": "%"
        }
      ],
      "rows": [
        {
          "label": "Qwen3-4B Instruct-2507 Q4_K_M",
          "cells": {
            "retried": 2,
            "raw": 85.9,
            "guard": 85.9
          }
        },
        {
          "label": "Qwen3-8B Q4_K_M",
          "cells": {
            "retried": 3,
            "raw": 83,
            "guard": 83
          }
        },
        {
          "label": "Qwen3-14B Q4_K_M",
          "cells": {
            "retried": 1,
            "raw": 85.1,
            "guard": 85.1
          }
        }
      ]
    },
    "failures": {
      "caption": "Why answers were wrong, all three models together (5,094 answers).",
      "columns": [
        {
          "key": "n",
          "label": "Answers",
          "decimals": 0
        }
      ],
      "rows": [
        {
          "label": "Right function, wrong argument value",
          "cells": {
            "n": 337
          }
        },
        {
          "label": "Called a tool when none fitted",
          "cells": {
            "n": 188
          }
        },
        {
          "label": "No call when a tool fitted",
          "cells": {
            "n": 138
          }
        },
        {
          "label": "Missing a required argument",
          "cells": {
            "n": 73
          }
        },
        {
          "label": "Several calls instead of one",
          "cells": {
            "n": 24
          }
        },
        {
          "label": "Wrong function",
          "cells": {
            "n": 18
          }
        },
        {
          "label": "Invented an argument",
          "cells": {
            "n": 2
          }
        }
      ]
    }
  },
  "charts": {
    "lab_vs_real": {
      "title": "Benchmark-style vs real-world requests, one tool offered",
      "meta": "Correct (%) · real-world requests and tools were contributed by users",
      "max": 100,
      "suffix": "%",
      "groups": [
        {
          "label": "Qwen3-4B Instruct-2507 Q4_K_M",
          "bars": [
            {
              "label": "Benchmark-style",
              "value": 96
            },
            {
              "label": "Real-world",
              "value": 72.1,
              "highlight": true
            }
          ]
        },
        {
          "label": "Qwen3-8B Q4_K_M",
          "bars": [
            {
              "label": "Benchmark-style",
              "value": 94
            },
            {
              "label": "Real-world",
              "value": 66.7,
              "highlight": true
            }
          ]
        },
        {
          "label": "Qwen3-14B Q4_K_M",
          "bars": [
            {
              "label": "Benchmark-style",
              "value": 95.5
            },
            {
              "label": "Real-world",
              "value": 71.3,
              "highlight": true
            }
          ]
        }
      ]
    }
  },
  "examples": {
    "percent": {
      "title": "A valid call, 100 times wrong (Qwen3-14B Q4_K_M)",
      "verdict": "wrong",
      "fields": [
        {
          "label": "Request",
          "text": "Predict the total expected profit of stocks XYZ in 5 years given I have invested $5000 and annual return rate is 7%."
        },
        {
          "label": "Tool argument, as described to the model",
          "text": "annual_return (float): The annual return rate of the investment."
        },
        {
          "label": "Qwen3-14B Q4_K_M called",
          "text": "investment_predictProfit({\"investment_amount\": 5000, \"annual_return\": 7, \"years\": 5})",
          "mono": true
        },
        {
          "label": "Expected",
          "text": "annual_return = 0.07. Qwen3-4B Instruct-2507 Q4_K_M and Qwen3-8B Q4_K_M got it right."
        }
      ],
      "source": "BFCL v3 item simple_134 (Apache-2.0)."
    }
  },
  "attribution": "Requests and tools: Berkeley Function-Calling Leaderboard v3 (Patil et al.), Apache-2.0.",
  "compares": {
    "lab_vs_real": {
      "title": "One tool offered: benchmark-style → real user requests",
      "meta": "Share of correct calls",
      "fromLabel": "Benchmark-style",
      "toLabel": "Real-world",
      "min": 50,
      "max": 100,
      "decimals": 1,
      "suffix": "%",
      "better": "higher",
      "rows": [
        {
          "label": "Qwen3-4B Q4_K_M",
          "from": 96,
          "to": 72.1,
          "highlight": false
        },
        {
          "label": "Qwen3-8B Q4_K_M",
          "from": 94,
          "to": 66.7,
          "highlight": false
        },
        {
          "label": "Qwen3-14B Q4_K_M",
          "from": 95.5,
          "to": 71.3,
          "highlight": false
        }
      ]
    }
  }
}
