Class LlmEvalCase

Assembly: redb.Route.Llm.dll

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

Object→LlmEvalCase

Properties

Budget

Per-run budget forwarded to .

public AgentBudget Budget { get; init; }

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; }

MaxIterations

Maximum tool-loop iterations forwarded to .

public int MaxIterations { 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; }

MaxTokens

Max-tokens override.

public int? MaxTokens { get; init; }

Scenario

Stable scenario name — also persisted on .

public required string Scenario { get; init; }

SystemPrompt

System prompt for the run. Null = no system prompt.

public string? SystemPrompt { get; init; }

Temperature

Sampling temperature override.

public double? Temperature { 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)