nat.experimental.test_time_compute.search.multi_query_retrieval_search#
Attributes#
Classes#
A strategy that, for each incoming TTCItem, generates multiple new items by |
Functions#
|
Module Contents#
- logger#
- class MultiQueryRetrievalSearch( )#
Bases:
nat.experimental.test_time_compute.models.strategy_base.StrategyBaseA strategy that, for each incoming TTCItem, generates multiple new items by re-writing the input ‘task_description’ from different perspectives. Uses multiple LLMs to encourage diversity.
- config#
- llms_bound = []#
- async build_components(builder: nat.builder.builder.Builder) None#
Binds each LLMRef in self.config.llms to an actual LLM client.
- supported_pipeline_types() list[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) list[nat.experimental.test_time_compute.models.ttc_item.TTCItem]#
For each TTCItem, rewrite the ‘input’ using each LLM to create a new perspective. The new TTCItems’ ‘output’ field will store the newly generated query.
- async register_multi_query_retrieval_search(
- config: nat.experimental.test_time_compute.models.search_config.MultiQueryRetrievalSearchConfig,
- builder: nat.builder.builder.Builder,