nat.experimental.test_time_compute.selection.llm_based_agent_output_selector#
Attributes#
Classes#
Abstract base class for strategy implementations. |
Functions#
|
Register the LLMBasedAgentOutputSelector with the builder. |
Module Contents#
- logger#
- class LLMBasedAgentOutputSelector( )#
Bases:
nat.experimental.test_time_compute.models.strategy_base.StrategyBaseAbstract base class for strategy implementations.
This class defines the interface for strategies that can be used in the TTC framework. Concrete strategy classes should implement the methods defined in this class.
- llm_bound = None#
- async build_components(builder: nat.builder.builder.Builder) None#
Build the components required for the selector.
- supported_pipeline_types() [nat.experimental.test_time_compute.models.stage_enums.PipelineTypeEnum]#
Return the stage types supported by this selector.
- stage_type() nat.experimental.test_time_compute.models.stage_enums.StageTypeEnum#
Return the stage type of this strategy.
- async ainvoke(
- items: list[nat.experimental.test_time_compute.models.ttc_item.TTCItem],
- original_prompt: str | None = None,
- agent_context: str | None = None,
- **kwargs,
Select the planning items based on the selection strategy.
- Args:
original_prompt (str): The prompt the user provided the agent. agent_context (str): The context of the agent, if applicable. items (list[TTCItem]): The list of planning items to select from.
- Returns:
TTCItem: The selected planning item.
- async register_llm_based_agent_output_selector(
- config: nat.experimental.test_time_compute.models.selection_config.LLMBasedAgentOutputSelectionConfig,
- builder: nat.builder.builder.Builder,
Register the LLMBasedAgentOutputSelector with the builder.