pub struct ExpectedCall {
pub name: String,
pub required_args: Map<String, Value>,
pub ordered: bool,
pub depends_on_result: bool,
}Expand description
One expected tool call within a task’s ExpectedOutcome::ToolCalls.
Matching is AST-style (BFCL-inspired), not a string diff: the recorded
call’s name must match exactly, and required_args must be a subset of
the recorded arguments (extra arguments the model supplies are ignored).
Fields§
§name: StringExpected tool name.
required_args: Map<String, Value>Required argument key/value pairs. The recorded call’s arguments must contain each of these keys with matching values; additional arguments in the recorded call are ignored.
ordered: boolWhen true, this call must occur in the given position relative to
other expected calls (order matters). When false, expected calls
may be matched against recorded calls in any order.
Ordering is checked across tool-call batches, not across the flat call log. Two calls the model emitted in one parallel batch were not ordered by the model at all, so demanding an order between them scores a scheduler’s arbitrary completion sequence rather than the model.
depends_on_result: boolWhen true, this call’s arguments depend on the result of the call
before it, so it may only be credited in a strictly later batch.
Self::ordered alone cannot express this. A model that emits
file_exists and delete_file in a single parallel batch satisfies
every ordering constraint available — the calls are simultaneous, so no
order is violated — while demonstrating none of the competency the task
exists to test: it deleted the file without ever seeing whether it was
there. Marking the second call here makes the two-turn structure a
requirement rather than an accident of how the model chose to batch.
Deliberately not set on every multi-turn task. Creating a file and then appending to a path you already know needs no intervening result, so a model that does both at once is being more efficient rather than skipping a step, and should keep the credit.
Trait Implementations§
Source§impl Clone for ExpectedCall
impl Clone for ExpectedCall
Source§fn clone(&self) -> ExpectedCall
fn clone(&self) -> ExpectedCall
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more