agents.planning.enhanced_plan_execute_v5.planner.promptsΒΆ
Planner Prompts - Advanced prompt templates for strategic planning.
This module provides sophisticated prompt templates designed for creating comprehensive, actionable plans using modern prompt engineering techniques.
FunctionsΒΆ
|
Create a complete context dictionary for planning prompts. |
|
Format previous attempts for inclusion in prompts. |
|
Format tools list for inclusion in prompts. |
|
Select the most appropriate planning template based on context. |
Module ContentsΒΆ
- agents.planning.enhanced_plan_execute_v5.planner.prompts.create_planning_context(objective, available_tools=None, domain_focus=None, complexity_level='moderate', time_constraints=None, previous_attempts=None, additional_context=None)ΒΆ
Create a complete context dictionary for planning prompts.
- Parameters:
objective (str) β The main objective
available_tools (list) β Tools available for execution
domain_focus (str) β Specific domain focus
complexity_level (str) β Desired complexity level
time_constraints (str) β Time limitations
previous_attempts (list) β Previous planning attempts
additional_context (str) β Additional context information
- Returns:
Complete context for planning prompts
- Return type:
Examples
Basic context:
context = create_planning_context( objective="Research market trends", available_tools=["web_search", "calculator"], complexity_level="detailed" )
Advanced context:
context = create_planning_context( objective="Analyze competitor strategy", available_tools=["web_search", "document_reader"], domain_focus="business_analysis", time_constraints="Complete within 2 hours", previous_attempts=["Initial research was too broad"] )
- agents.planning.enhanced_plan_execute_v5.planner.prompts.format_previous_attempts(attempts)ΒΆ
Format previous attempts for inclusion in prompts.
- agents.planning.enhanced_plan_execute_v5.planner.prompts.format_tools_list(tools)ΒΆ
Format tools list for inclusion in prompts.
- agents.planning.enhanced_plan_execute_v5.planner.prompts.get_planning_template(objective, domain_focus=None, has_previous_attempts=False, additional_context=None)ΒΆ
Select the most appropriate planning template based on context.
- Parameters:
- Returns:
The most suitable template for the context
- Return type:
ChatPromptTemplate
Examples
Research planning:
template = get_planning_template( objective="Research AI trends", domain_focus="artificial_intelligence" )
Adaptive planning:
template = get_planning_template( objective="Complete analysis", has_previous_attempts=True )