Run Berkeley Function Calling Leaderboard
The same run guide is also available from the benchmark detail page.
BFCL is run via the official `bfcl-eval` Python package (the berkeley-function-call-leaderboard subdirectory of ShishirPatil/gorilla). You install it, set BFCL_PROJECT_ROOT and API keys (or pick a vLLM/SGLang backend for local OSS models), run `bfcl generate` to produce model responses, then `bfcl evaluate` to grade them with AST and executable checks, producing per-category accuracy JSON files and CSV summaries. When reporting a score, keep attached the exact bfcl-eval version/gorilla commit, the model name (the `-FC` suffix denotes native function-calling mode vs prompt-based), and the test categories evaluated, since overall accuracy mixes single-turn, live, and multi-turn subsets.
1Install
conda create -n BFCL python=3.10conda activate BFCLpip install bfcl-eval# For local OSS models instead, install from source with a backend extra:
# git clone https://github.com/ShishirPatil/gorilla.git
# cd gorilla/berkeley-function-call-leaderboard && pip install -e .[oss_eval_vllm] (or .[oss_eval_sglang])
export BFCL_PROJECT_ROOT=/path/to/your/desired/project/directorycp bfcl_eval/.env.example .env # then fill in API keys (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)2Run evaluation
bfcl generate --model MODEL_NAME --test-category TEST_CATEGORY --num-threads 1# Example with multiple models/categories:
bfcl generate --model claude-3-5-sonnet-20241022-FC,gpt-4o-2024-11-20-FC --test-category simple_python,parallel,live_multiple,multi_turn# For a local OSS model served via vLLM/SGLang:
bfcl generate --model MODEL_NAME --test-category TEST_CATEGORY --backend vllm --num-gpus 1 --gpu-memory-utilization 0.93Score output
bfcl evaluate --model MODEL_NAME --test-category TEST_CATEGORY# To score only the subset present in the result file:
bfcl evaluate --model MODEL_NAME --test-category TEST_CATEGORY --partial-eval4Expected output
`bfcl generate` writes model responses to result/MODEL_NAME/BFCL_v3_TEST_CATEGORY_result.json. `bfcl evaluate` writes per-category scores to score/MODEL_NAME/BFCL_v3_TEST_CATEGORY_score.json and produces four CSV summaries under ./score/ (data_overall.csv, data_live.csv, data_non_live.csv, data_multi_turn.csv), with accuracy as the headline metric. Do not mix accuracy across different BFCL versions (V1/V2/V3/V4) or different test-category subsets.
5Submit results
Local scores are produced entirely by the harness; no submission is required to reproduce a number. To appear on the public leaderboard at https://gorilla.cs.berkeley.edu/leaderboard.html you add your model to the harness and open a PR against ShishirPatil/gorilla (per SUPPORTED_MODELS.md). When reporting a score elsewhere, attach: the bfcl-eval version (or gorilla commit), the exact --model string (including any -FC suffix), the --test-category set evaluated, and the backend used for OSS models.