Interface TrainingSelectionStrategy
- All Known Implementing Classes:
ExplicitMarkingStrategy,SamplingRateStrategy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Training Selection Strategy - Training request filtering strategy
Unified interface for deciding which Agent requests should be used for training.
Supports multiple filtering methods:
- Explicit marking - Users manually mark important requests
- Random sampling - Randomly sample by probability
- Combined strategy - Combination of multiple strategies (AND/OR)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault Stringname()Name of the strategy (for logging and debugging)default intpriority()Priority of the strategy (lower number means higher priority)shouldSelect(io.agentscope.core.agent.Agent agent, List<io.agentscope.core.message.Msg> inputMessages, io.agentscope.core.message.Msg outputMessage, reactor.util.context.ContextView reactorContext) Decide whether the current Agent call should be used for training
-
Method Details
-
shouldSelect
SelectionDecision shouldSelect(io.agentscope.core.agent.Agent agent, List<io.agentscope.core.message.Msg> inputMessages, io.agentscope.core.message.Msg outputMessage, reactor.util.context.ContextView reactorContext) Decide whether the current Agent call should be used for training- Parameters:
agent- The Agent being calledinputMessages- Input message listoutputMessage- Output messagereactorContext- Reactor context (for async scenarios)- Returns:
- Selection decision result, including whether to train and related metadata
-
priority
default int priority()Priority of the strategy (lower number means higher priority)When multiple strategies are combined, higher priority strategies execute first
- Returns:
- Priority value, defaults to 100
-
name
Name of the strategy (for logging and debugging)- Returns:
- Strategy name
-