Expand description
Pluggable evaluation strategies for agent_loop_parallel.
EvaluationStrategy selects the best result after parallel branches finish.
Five built-in implementations cover the most common use cases; implement the
trait for custom evaluation logic.
§Built-in strategies
| Strategy | Selection criterion | Use case |
|---|---|---|
TransparentEvaluation | Pass-through (1 branch only) | Zero-overhead wrapper |
PickFirstEvaluation | Always index 0 | Testing / deterministic default |
TokenEfficientEvaluation | Lowest total token usage | Cost / latency priority |
ElaborateEvaluation | Highest total token usage | Depth / thoroughness priority |
LlmJudgeEvaluation | Separate LLM judge call | Best quality selection |
Re-exports§
pub use crate::types::EvaluationDecision;pub use crate::types::EvaluationStrategy;
Structs§
- Elaborate
Evaluation - Selects the branch with the highest total token usage.
- LlmJudge
Evaluation - Uses a separate LLM call to judge which branch response is best.
- Pick
First Evaluation - Always selects the first branch (index 0), regardless of content.
- Token
Efficient Evaluation - Selects the branch with the lowest total token usage.
- Transparent
Evaluation - Single-branch pass-through — panics if more than one branch is present.