# EvalCase

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.evalcase/
> Summary: EvalCase: A single test case inside an EvalSuite.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

A single test case inside an [EvalSuite](/api/tracon.evalsuite/).

```csharp
public sealed record EvalCase : IEquatable<EvalCase>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.evalcase/">EvalCase</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;EvalCase&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Constructors

### <a id="Tracon_EvalCase__ctor"></a> EvalCase\(\)

```csharp
public EvalCase()
```

## Properties

### <a id="Tracon_EvalCase_Context"></a> Context

Text given to the model as extra context.

```csharp
public string? Context { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

#### Remarks

The agent receives it through the document channel, ahead of
[EvalCase.Query](/api/tracon.evalcase/#Tracon_EvalCase_Query): the case run builds the messages a production run
with documents sends (see [AgentRunDocument](/api/tracon.agentrundocument/)). Plain text
goes as one document named `context`. Text made only of document
channel blocks - what promoting a run with documents stores here, one
`-----BEGIN TRACON DOCUMENT-----` block per document - goes back as
one document per block, unchanged, so the case repeats the run's
messages.

The evaluator receives the same text as its context, for checks that
judge an answer against reference material.

### <a id="Tracon_EvalCase_ExpectedOutput"></a> ExpectedOutput

The expected output. Referenced by the `containsExpected` check.

```csharp
public string? ExpectedOutput { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_EvalCase_ExpectedToolCalls"></a> ExpectedToolCalls

The tool calls this case expects, by name and optionally by arguments.

```csharp
public IReadOnlyList<EvalExpectedToolCall> ExpectedToolCalls { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[EvalExpectedToolCall](/api/tracon.evalexpectedtoolcall/)\>

#### Remarks

Referenced by the `toolCallArgsMatch` check. An empty list expects
nothing, so that check passes. The `toolCalled` check does not read
this field: it takes its tool names from its own `tools` field in the
suite's `checks` definition.

### <a id="Tracon_EvalCase_Id"></a> Id

The case identifier.

```csharp
public Guid Id { get; init; }
```

#### Property Value

 [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

### <a id="Tracon_EvalCase_Parameters"></a> Parameters

Values for the target agent's [AgentDefinition.Parameters](/api/tracon.agentdefinition/#Tracon_AgentDefinition_Parameters)
schema. [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for an agent that declares no parameters.

```csharp
public IReadOnlyDictionary<string, string>? Parameters { get; init; }
```

#### Property Value

 [IReadOnlyDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [string](https://learn.microsoft.com/dotnet/api/system.string)\>?

#### Remarks

Evaluating a parameterized agent without this field would run every
case against unresolved `{{name}}` placeholders left literally in
the instructions text - the same missing-parameter check that
`POST /api/agents/{name}/run` applies also runs here, and a case
missing a required value fails outright rather than running with a
broken prompt.

### <a id="Tracon_EvalCase_PromotedAt"></a> PromotedAt

The promotion time. [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when hand-written.

```csharp
public DateTimeOffset? PromotedAt { get; init; }
```

#### Property Value

 [DateTimeOffset](https://learn.microsoft.com/dotnet/api/system.datetimeoffset)?

### <a id="Tracon_EvalCase_Query"></a> Query

The query text sent to the agent.

```csharp
public required string Query { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_EvalCase_Seq"></a> Seq

The sequence number within the suite (starts at 0).

```csharp
public required int Seq { get; init; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_EvalCase_SourceKind"></a> SourceKind

The reason for promotion. [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when hand-written.

```csharp
public EvalCaseSource? SourceKind { get; init; }
```

#### Property Value

 [EvalCaseSource](/api/tracon.evalcasesource/)?

### <a id="Tracon_EvalCase_SourceRunId"></a> SourceRunId

The run the case was generated from. [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when hand-written.

```csharp
public Guid? SourceRunId { get; init; }
```

#### Property Value

 [Guid](https://learn.microsoft.com/dotnet/api/system.guid)?

### <a id="Tracon_EvalCase_SuiteId"></a> SuiteId

The identifier of the suite this case belongs to.

```csharp
public required Guid SuiteId { get; init; }
```

#### Property Value

 [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

## Methods

### <a id="Tracon_EvalCase_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_EvalCase_Equals_Tracon_EvalCase_"></a> Equals\(EvalCase?\)

```csharp
public bool Equals(EvalCase? other)
```

#### Parameters

`other` [EvalCase](/api/tracon.evalcase/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_EvalCase_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_EvalCase_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_EvalCase_op_Equality_Tracon_EvalCase_Tracon_EvalCase_"></a> operator ==\(EvalCase?, EvalCase?\)

```csharp
public static bool operator ==(EvalCase? left, EvalCase? right)
```

#### Parameters

`left` [EvalCase](/api/tracon.evalcase/)?

`right` [EvalCase](/api/tracon.evalcase/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_EvalCase_op_Inequality_Tracon_EvalCase_Tracon_EvalCase_"></a> operator \!=\(EvalCase?, EvalCase?\)

```csharp
public static bool operator !=(EvalCase? left, EvalCase? right)
```

#### Parameters

`left` [EvalCase](/api/tracon.evalcase/)?

`right` [EvalCase](/api/tracon.evalcase/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
