BFCL: What the Berkeley Function Calling Leaderboard Tests, and How to Run It
The function-calling benchmark most model cards cite, taken apart for teams who need to know what a BFCL score says about their own agent, and what it leaves out.
What BFCL is
BFCL is the Berkeley Function Calling Leaderboard: an open-source benchmark and public leaderboard from UC Berkeley's Gorilla project that measures how well a language model turns a user request and a set of function definitions into correct function calls. The live leaderboard ranks hosted and open-weight models; the evaluation code is the berkeley-function-call-leaderboard directory of the Gorilla repository, and the test data is published on Hugging Face. The project releases its leaderboard data under Apache 2.0.
BFCL scores a model, not an agent. Every test hands the model BFCL's own function schemas and, for multi-turn tests, BFCL's own simulated backends. That makes scores comparable across models, and it is also the main limit on what a score can tell you about a system built on your APIs.
Each model is run in one of two modes. In FC (function calling) mode, BFCL passes the function definitions through the provider's native tools interface; model IDs in this mode end in -FC. In Prompt mode, the definitions go into the system prompt and the model writes the calls as text. The same base model can appear on the leaderboard twice, once per mode, with different scores.
How BFCL grew from V1 to V4
Each release kept the earlier test sets and added a harder kind of task on top. When someone quotes a BFCL number, the version matters as much as the score: a V1-era figure and a V4 overall score measure different things.
| Version | Released | What it added | How it is checked |
|---|---|---|---|
| V1 | February 2024 | Expert-written single-turn calls: simple, multiple (pick the right function from several), parallel, parallel multiple, and relevance detection, across Python, Java, JavaScript and REST | AST matching against an answer key; an executable subset runs the calls |
| V2 (Live) | August 2024 | Function documents and queries contributed by enterprises and open-source users, to cut contamination and reflect real use | AST matching |
| V3 | September 2024 | Multi-turn and multi-step tasks against stateful simulated APIs, including missing-parameter, missing-function and long-context variants | State-based and response-based checks |
| V4 (Agentic) | July 2025 | Web search (with and without result snippets), memory over key-value, vector and recursive-summary backends, and a non-scoring format-sensitivity test | Answer and state checks per category |
What each test category measures
The categories map directly to the names you pass to the bfcl command line, so you can run exactly the slice you care about. These are the groups as the repository's TEST_CATEGORIES.md lists them:
| Group | CLI name | What the model has to do |
|---|---|---|
| Non-live | non_live | Expert-written single-turn calls: simple_python, simple_java, simple_javascript, multiple, parallel, parallel_multiple |
| Live | live | The same call shapes on user-contributed functions and queries |
| Hallucination | irrelevance, live_irrelevance, live_relevance | Call nothing when no provided function fits, and call one when one does |
| Multi-turn | multi_turn | Hold state across turns: multi_turn_base, multi_turn_miss_func, multi_turn_miss_param, multi_turn_long_context |
| Web search | web_search | Answer multi-hop questions by searching and reading pages, with snippets (web_search_base) and without (web_search_no_snippet) |
| Memory | memory | Read and write a memory backend across sessions: memory_kv, memory_vector, memory_rec_sum |
| Format sensitivity | format_sensitivity | Keep calling correctly as the system prompt's format changes (Prompt-mode models only; not scored) |
The multi-turn backends are Python classes written for the benchmark: four primary domains (a file system, vehicle control, a trading bot and travel booking) plus companion APIs for messaging, posting, tickets and math. Because they keep state, a model that deletes the wrong file or books the wrong flight leaves evidence the checker can see.
How a BFCL score is computed
- AST evaluation (single-turn): the model's output is parsed into a call, then checked for the right function name, the required parameters, correct types, and values that match one of the acceptable answers recorded for that test.
- Executable evaluation (part of V1): the call is actually run, and its result is compared with the expected one, which catches calls that are well-formed but wrong.
- State-based evaluation (multi-turn): after each turn, the backend's state (its public attributes) is compared with the expected state, so any valid route to the right end state passes.
- Response-based evaluation (multi-turn): the model's calls must include the minimal set of calls the answer key says a read-only request needs, so a model cannot pass a lookup without doing the lookup.
With V4, the Gorilla team published the overall score as a fixed blend: Agentic 40%, Multi-Turn 30%, Live 10%, Non-Live 10% and Hallucination Measurement 10%, with format sensitivity reported but not counted. Check the leaderboard page for the current composition before comparing scores from different releases.
One trap when you run it yourself: in the summary columns of the score files, any category you did not evaluate counts as zero. A partial run's overall number is not comparable to the leaderboard's; compare category by category instead.
Running BFCL yourself
The package on PyPI is bfcl-eval. The project warns that an unrelated package named bfcl also exists there, so check the name before you install. A minimal run against a hosted model looks like this:
pip install bfcl-eval
export BFCL_PROJECT_ROOT=$PWD/bfcl-work
mkdir -p $BFCL_PROJECT_ROOT
cp $(python -c "import bfcl_eval; print(bfcl_eval.__path__[0])")/.env.example $BFCL_PROJECT_ROOT/.env
# add your provider API keys to $BFCL_PROJECT_ROOT/.env
bfcl generate --model MODEL_NAME --test-category simple_python,multi_turn --num-threads 1
bfcl evaluate --model MODEL_NAME --test-category simple_python,multi_turnbfcl modelslists the model IDs BFCL has handlers for;bfcl test-categorieslists the categories.--num-threadssets parallel requests. Keep it within your provider's rate limits, or the run will fill up with errors.- Open-weight models run locally through
--backend vllmor--backend sglang;--skip-server-setuppoints BFCL at an OpenAI-compatible server you already run. - The
web_searchcategories call SerpAPI by default and need a key in.env; the README shows where to swap in a different search API. - Model outputs land in
result/and scores inscore/, withdata_overall.csv,data_live.csv,data_non_live.csvanddata_multi_turn.csvsummaries. - To re-run a handful of failures, list their IDs in
test_case_ids_to_generate.json, pass--run-idstogenerateand--partial-evaltoevaluate. Those scores will not match the official leaderboard. - To add a model BFCL does not support yet, write a handler for it and register it in
model_config.py; the repository'sCONTRIBUTING.mdwalks through it.
Running a fixed BFCL slice on every model or prompt change is a cheap regression signal. Pin the bfcl-eval version so the test set doesn't change under you, and keep provider keys out of pull-request runs from forks. Our post on running agent evals in GitHub Actions without live API credentials covers that setup.
What a BFCL score won't tell you about your agent
- Your schemas aren't in it. Models are scored on BFCL's function definitions. How well one handles your parameter names, nested objects, enums and description style is something only your own fixtures can show.
- The backends behave themselves. BFCL's simulated APIs are designed to be deterministic. They don't throttle, time out, paginate unexpectedly or return half-finished writes the way live services do. See why stateful simulation is the substrate for judging decisions.
- Answer keys can be wrong. AST scoring is only as good as its list of acceptable calls, and independent reviews have found tasks whose keys mark correct calls wrong. Our tool-use benchmark design guide goes through that review and what it means for scoring.
- Public test data leaks. The dataset is public, so a model can have seen it in training. The Live categories were added partly for this reason. Keep a held-out set of your own; see contamination prevention in agent eval suites.
- Mode and version change the number. Compare FC with FC and Prompt with Prompt, on the same BFCL version.
Used for what it's good at, BFCL is a fast way to shortlist models for tool calling and to check that a new model or prompt hasn't regressed on basic call construction. The decision about what to ship should rest on tasks built from your own APIs, run against stubs that keep state and fail the way your real services fail.
BFCL next to other tool-use benchmarks
| Benchmark | What it emphasises | Reach for it when |
|---|---|---|
| BFCL | Call construction, relevance, multi-turn state and agentic tasks, scored deterministically | You want a broad, reproducible comparison of models' tool calling |
| τ-bench (Sierra) | Conversations with an LLM-simulated user under domain policies (retail, airline), with reliability over repeated trials (pass^k) | Your agent talks to customers and has to follow rules while it calls tools |
| ToolBench (ToolLLM) | Instructions over a large set of real REST APIs collected from RapidAPI | You care about choosing among many unfamiliar APIs |
| ToolSandbox (Apple) | Stateful, conversational tool use with a simulated user and implicit dependencies between tools | You need to test state dependencies and asking the user for missing information |
| AppWorld | Long tasks across simulated everyday apps, solved by agents that write code against the apps' APIs | Your agent acts by writing code rather than single calls |
Each project's own paper and repository has its current task counts and scoring rules; check them before you quote a number.
Frequently asked questions
What does BFCL stand for?
Berkeley Function Calling Leaderboard. It is built by UC Berkeley's Gorilla project, which also makes the Gorilla OpenFunctions models; BFCL is the benchmark, not a model.
Which model is top of BFCL right now?
Rankings change with every model release and every BFCL version, so check the live leaderboard at gorilla.cs.berkeley.edu/leaderboard.html rather than a figure quoted elsewhere. Note the version and mode (FC or Prompt) next to any score you cite.
Is bfcl-eval the same as the bfcl package?
No. The benchmark's package is bfcl-eval. The project's README warns that a package called bfcl on PyPI is unrelated.
What does it cost to run BFCL?
The code and data are free. Hosted models bill you for the tokens the run uses, at your provider's rates, and the web search categories need a search API key. The leaderboard also reports cost and latency per model; check it for current figures.
Can BFCL test my own agent or tools?
Not directly: it scores a model on BFCL's own functions. You can add a model handler to score a fine-tuned model, but to test your agent on your APIs you need your own tasks and stateful fixtures.
Sources
- Berkeley Function Calling Leaderboard
- berkeley-function-call-leaderboard (GitHub README)
- BFCL test categories
- BFCL supported models: FC vs. Prompt mode
- BFCL V1: Simple, Parallel, and Multiple Function Call eval with AST
- BFCL V2: Enterprise and OSS-contributed Live Data
- BFCL V3: Multi-Turn & Multi-Step Function Call Evaluation
- BFCL V4 Part 1: Agentic Web Search
- BFCL V4 Part 2: Agentic Memory Management
- BFCL V4 Part 3: Agentic Format Sensitivity




