Class LlmEvalCase
Declarative description of a single eval case. Combines the inputs the harness
feeds to with the assertions it scores
against the produced . Cases are pure data so the
same set can be replayed offline (via ReplayProvider) and against a
live provider.
public sealed class LlmEvalCase
Inheritance
Properties
CustomScorer
Optional custom scorer — receives the final and
public Func<AgentResponse, LlmEvalCaseScore>? CustomScorer { get; init; }
ExpectedStopReason
When set, the run's final stop reason must equal this value.
public LlmStopReason? ExpectedStopReason { get; init; }
ExpectedTextContains
Substrings the final assistant text must contain (case-sensitive).
public IReadOnlyList<string> ExpectedTextContains { get; init; }
ExpectedTextNotContains
Substrings the final assistant text must NOT contain (case-sensitive).
public IReadOnlyList<string> ExpectedTextNotContains { get; init; }
ExpectedToolCalls
Tool names that must be invoked at least once across the run (in any order).
public IReadOnlyList<string> ExpectedToolCalls { get; init; }
MaxObservedCostUsd
When set, the run's total cost must be ≤ this value (USD).
public decimal? MaxObservedCostUsd { get; init; }
MaxObservedIterations
When set, the run's iteration count must be ≤ this value.
public int? MaxObservedIterations { get; init; }
SystemPrompt
System prompt for the run. Null = no system prompt.
public string? SystemPrompt { get; init; }
Tools
Tools available to the model on this case (empty = no tools).
public IReadOnlyList<ILlmToolDescriptor> Tools { get; init; }
UserContent
User content blocks for the initial turn. Use for the common text-only case.
public IReadOnlyList<LlmContentBlock> UserContent { get; init; }
Methods
UserText(string)
Convenience: builds a single-text-block .
public static IReadOnlyList<LlmContentBlock> UserText(string text)