Skip to content

AgentRunDiagnosticsEvaluationExtensions

NexusLabs.Needlr.AgentFramework.Evaluation

AgentRunDiagnosticsEvaluationExtensions Class

Extensions that convert NexusLabs.Needlr.AgentFramework.Diagnostics.IAgentRunDiagnostics into the input shape expected by Microsoft.Extensions.AI.Evaluation evaluators.

public static class AgentRunDiagnosticsEvaluationExtensions

Inheritance System.Object 🡒 AgentRunDiagnosticsEvaluationExtensions

Methods

AgentRunDiagnosticsEvaluationExtensions.ToEvaluationInputs(this IAgentRunDiagnostics) Method

Projects a captured agent run into EvaluationInputs that can be handed directly to any IEvaluator.EvaluateAsync overload without re-invoking the model.

public static NexusLabs.Needlr.AgentFramework.Evaluation.EvaluationInputs ToEvaluationInputs(this NexusLabs.Needlr.AgentFramework.Diagnostics.IAgentRunDiagnostics diagnostics);

Parameters

diagnostics NexusLabs.Needlr.AgentFramework.Diagnostics.IAgentRunDiagnostics

Diagnostics captured for a single agent run.

Returns

EvaluationInputs
An EvaluationInputs whose Messages is the captured input, and whose ModelResponse is built from the captured AgentResponse. When the run produced no output response, the returned response contains a single empty assistant message so evaluators always receive a non-null Microsoft.Extensions.AI.ChatResponse.

Exceptions

System.ArgumentNullException
diagnostics is null.