LoopEvaluation Class

Definition

Represents the result produced by a LoopEvaluator after an agent iteration: whether the LoopAgent should re-invoke the wrapped agent and, optionally, the feedback or explicit messages that should inform the next iteration.

public sealed class LoopEvaluation
type LoopEvaluation = class
Public NotInheritable Class LoopEvaluation
Inheritance
LoopEvaluation

Remarks

An evaluator is concerned only with the judgment (continue or stop) and what to carry forward. In the common case it returns a feedback string and lets the LoopAgent decide how that feedback is turned into the next input (and whether the session is reset). For full control, ContinueWithMessages(IEnumerable<ChatMessage>) supplies the exact messages to send next, bypassing the loop's feedback and message construction.

Properties

Name Description
Feedback

Gets the feedback describing what is missing or what the agent should do next, or null when no feedback was produced.

ShouldReinvoke

Gets a value indicating whether the loop should run the wrapped agent again.

Methods

Name Description
Continue(String)

Creates an evaluation that re-invokes the wrapped agent, optionally carrying feedback forward.

ContinueWithMessages(IEnumerable<ChatMessage>)

Creates an evaluation that re-invokes the wrapped agent with the specified messages, bypassing the loop's feedback and message construction.

Stop()

Creates an evaluation that stops the loop and returns the latest response to the caller.

Applies to