LLM evaluation

Assert the correct tool is called

Hard120 pts~45 min
  • Tool calling
  • Agents
Practice app · Acme Support Assistant

A deterministic LLM-style support assistant with retrieval (RAG), JSON mode, safety policies and tool calls, exposed via UI and API.

BASE_URL
/api/practice
Console app
/lab/ai-testing-assert-the-correct-tool-is-called

Your starter code already declares BASE_URL — call the API relative to it.

Objective

Ask the assistant to track a real order with tools enabled and assert the tool call and its arguments.

Your task

  1. 1GET BASE_URL + "/orders" and take items[0].id and status.
  2. 2Ask "Track order <id>" with tools: true.
  3. 3Assert tool_calls has one entry named "get_order_status" whose arguments.order_id equals the id (as a string).
  4. 4Assert finish_reason === "tool_calls" and output_text mentions the order's real status.

Acceptance criteria

  • GET /orders returns 200
  • POST /ai/chat returns 200
  • Tools are enabled
  • At least 4 assertions pass

LLM evaluation · AI Testing · Agents & tool use