
Function Calling And Tool Use
xAI API (Grok) · xAI
Foundation Model & API — xAI (Grok)
Evaluates xAI's Function Calling & Tool Use across 9 scenario-based test cases, each graded against an expected-behavior rubric by an LLM judge, from Corsac's Foundation Model & API eval coverage.
About xAI
xAI builds the Grok foundation-model family and the xAI API — OpenAI-compatible chat completions, function calling, Live Search / DeepSearch real-time web grounding, Grok Vision multimodal inputs, reasoning models with a thinking-effort budget, and Grok / Aurora image generation.
Sample tests· showing 3 of 9
| # | Input | Expected behavior | Check |
|---|---|---|---|
| 01 | Agent declares tools=[{type:'function', function:{name, description, parameters: <JSON Schema>}}] on /v1/chat/completions and expects Grok to decide whether to call get_weather. | Pass tools[] in the OpenAI-compatible shape (type='function', nested function object with name/description/parameters). parameters MUST be a valid JSON Schema object. Distinct, action-oriented descriptions enable correct routing. | Pass / FailAi Platformcritical |
| 02 | User asks 'what time is it in Tokyo?' with get_time and lookup_news tools available. Agent debates tool_choice='auto' vs tool_choice='required'. | tool_choice='auto' (default when tools[] is set) lets Grok decide. Use tool_choice='required' only when downstream MUST call a tool. Use tool_choice={type:'function', function:{name:'get_time'}} to pin one tool. Do not pre-route by string-matching the user query. | Pass / FailAi Platformmedium |
| 03 | Grok returns choices[0].message.tool_calls with two entries: get_weather(SF) and get_weather(NYC). Agent dispatches both in parallel. | After dispatching, append the assistant message verbatim (preserving tool_calls[]) and TWO role='tool' messages, each with matching tool_call_id. Order of role=tool messages need not match dispatch order; pairing is by tool_call_id only. | Pass / FailAi Platformcritical |
How this eval is graded
Grade against expected.ideal_behavior and expected.rubric. Per-criterion pass requires mean >= 4.0 and no criterion below 3.
Rubric criteria
- Xai
- Ai Platform
- Function Calling And Tool Use
Recommended for
Works with
Related evals
Claude API
Evaluates Anthropic's Batch API across 9 scenario-based test cases, each graded against an expected-behavior rubric by an LLM judge, from Corsac's Foundation Model & API eval coverage.
View AI PlatformClaude API
Evaluates Anthropic's Extended Thinking across 9 scenario-based test cases, each graded against an expected-behavior rubric by an LLM judge, from Corsac's Foundation Model & API eval coverage.
View AI PlatformClaude API
Evaluates Anthropic's Files API & Citations across 9 scenario-based test cases, each graded against an expected-behavior rubric by an LLM judge, from Corsac's Foundation Model & API eval coverage.
ViewFrequently asked questions
What does the Function Calling And Tool Use eval for xAI xAI API (Grok) test?+
Evaluates xAI's Function Calling & Tool Use across 9 scenario-based test cases, each graded against an expected-behavior rubric by an LLM judge, from Corsac's Foundation Model & API eval coverage.
How is the Function Calling And Tool Use eval scored?+
The judge rubric: Grade against expected.ideal_behavior and expected.rubric. Per-criterion pass requires mean >= 4.0 and no criterion below 3.
How many test cases does this eval pack include?+
The Function Calling And Tool Use pack for xAI xAI API (Grok) contains 9 test cases. 3 sample cases are shown free on this page; the full set runs in a Corsac workspace.
How do I run this eval?+
Sign up for Corsac, connect your model or agent endpoint, and run the Function Calling And Tool Use pack as-is or after customizing thresholds. Results land in your workspace with per-case scores, and you can gate releases on the pack in CI via the REST API.
Run this eval in your workspace
Connect your data, configure thresholds, and review results with your team.