Skip to content

PipelineEvaluationExtensions

NexusLabs.Needlr.AgentFramework.Evaluation

PipelineEvaluationExtensions Class

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

public static class PipelineEvaluationExtensions

Inheritance System.Object 🡒 PipelineEvaluationExtensions

Methods

PipelineEvaluationExtensions.ToEvaluationInputs(this IPipelineRunResult) Method

Projects a pipeline run result into EvaluationInputs for the full pipeline. Input messages are collected from all stages that have diagnostics, and the response is taken from the last stage that produced a non-null Microsoft.Extensions.AI.ChatResponse.

public static NexusLabs.Needlr.AgentFramework.Evaluation.EvaluationInputs ToEvaluationInputs(this NexusLabs.Needlr.AgentFramework.Diagnostics.IPipelineRunResult result);

Parameters

result NexusLabs.Needlr.AgentFramework.Diagnostics.IPipelineRunResult

The pipeline run result to convert.

Returns

EvaluationInputs
An EvaluationInputs whose Messages is the union of all stage input messages, and whose ModelResponse is the last stage's response. When no stage produced a response, the returned response contains a single empty assistant message so evaluators always receive a non-null Microsoft.Extensions.AI.ChatResponse.

Exceptions

System.ArgumentNullException
result is null.