Skip to content

Add BFCL v4 non-web external evaluation - #340

Open
ReinforcedKnowledge wants to merge 1 commit into
allenai:mainfrom
ReinforcedKnowledge:feat/bfcl-v4-non-web
Open

ReinforcedKnowledge wants to merge 1 commit into
allenai:mainfrom
ReinforcedKnowledge:feat/bfcl-v4-non-web

Conversation

@ReinforcedKnowledge

@ReinforcedKnowledge ReinforcedKnowledge commented Aug 31, 2026 •

Copy link
Copy Markdown

Summary

Add a model-independent bfcl_v4_non_web external evaluation backed by the pinned official Berkeley Function Calling Leaderboard v4 harness.

The evaluation covers the deterministic 80% of the official BFCL v4 score:

  • non-live function calling
  • live function calling
  • irrelevance
  • multi-turn
  • memory

The credentialed, paid web-search categories are intentionally excluded and will be proposed separately.

Implementation

  • Pins the official Gorilla repository to commit 6ea57973c7a6097fd7c5915698c54c17c5b1b6c8.
  • Runs BFCL's official generation and evaluation code against olmo-eval's OpenAI-compatible provider boundary.
  • Pins sentence-transformers/all-MiniLM-L6-v2 to revision 1110a243fdf4706b3f48f1d95db1a4f5529b4d41 and resolves it offline during the memory-vector evaluation.
  • Validates the exact expected output inventory:
    • 23 result files
    • 20 score files
    • 5,017 result rows
  • Rejects missing or unexpected files, missing or duplicate IDs, inference errors, tracebacks, malformed score headers, and inconsistent score counts.
  • Computes the official fixed-weight non-web contribution without renormalizing the excluded web-search weight. The maximum reported contribution is therefore 0.8.
  • Preserves the native category accuracies and task counts in the exported result.
  • Quotes provider-controlled command arguments before constructing the sandbox command.
  • Prevents ambient OpenAI credentials from being forwarded to the benchmark container.

The pinned BFCL evaluator does not apply its existing multi-turn irrelevance checker before the generic multi-turn checker. A small hash-verified patch invokes that existing checker so empty-ground-truth turns receive the intended abstention verdict. The patch is included as package data and verified against its pinned SHA-256 before application.

Why web search is separate

BFCL web search uses a paid, live external service and requires a credential. Its results can fail or change for reasons unrelated to the evaluated model.

Keeping it separate means a search-service or quota failure cannot invalidate the deterministic non-web evaluation. A follow-up can add the remaining 20% as an explicit opt-in evaluation with its own credential, quota, and failure-handling contract.

Validation

  • Exact 5,017-row non-web end-to-end run completed with the expected file and ID inventories.
  • 9 focused BFCL adapter tests passed.
  • Repository unit suite: 2158 passed, 8 skipped.
  • Full Ruff lint and formatting checks passed.
  • Full ty type checking passed.
  • git diff --check passed.
  • The scorer patch applies cleanly to the pinned Gorilla commit.
  • A freshly built wheel contains the runner and scorer patch.

Run the pinned official BFCL generator and evaluator against an OpenAI-compatible endpoint, covering the non-live, live, multi-turn, and memory collections. Validate exact file and ID inventories, reject inference failures, independently recompute the fixed-weight score contribution, pin the memory encoder, and record reproducibility metadata. Apply a hash-verified temporary scorer patch for BFCL's currently uncalled multi-turn irrelevance check.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant