Design a testing strategy for tool contracts used by agents.

Instruction: Combine deterministic contract checks with task-based model evaluation and injected execution failures. Old tool results were {ok:true} only after completion. New results are {status:"pending",operation_id:"X"} or {status:"completed",operation_id:"X"}. An old parser treats any nonempty object as success. Give deterministic and model-level tests, including a timeout after remote completion.

Context: Test tools used by agents for both correct API behavior and correct tool selection under ambiguous user requests.

Updated

Official answer available

Read the opening below, then unlock the full answer and practical guidance.

I would keep three test layers. Contract tests validate required fields, types, output shape, and documented errors. Integration tests exercise authorization, business rules, and downstream failures. Task evaluations check whether the assistant selects the right tool, uses the right arguments, and reports the actual outcome.

For a hypothetical ticket...

Your preparation path

Work through these questions in order. Read the answer aloud, then explain it in your own words.

Related Questions