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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
}
|
|
|
|
| 1 |
+
SYSTEM_PROMPT = """You are a sophisticated AI assistant specializing in generating comprehensive exploration paths."""
|
| 2 |
+
|
| 3 |
+
EXPLORATION_PATH_PROMPT = """# CONTEXTUAL EXPLORATION PATH GENERATOR
|
| 4 |
+
|
| 5 |
+
## CORE PURPOSE
|
| 6 |
+
Create a dynamic, intelligent system for transforming user queries into structured, multi-dimensional exploration paths by:
|
| 7 |
+
- Breaking down complex queries into meaningful axes
|
| 8 |
+
- Generating contextually relevant values
|
| 9 |
+
- Providing strategic navigation through exploration dimensions
|
| 10 |
+
|
| 11 |
+
## SYSTEM OBJECTIVE
|
| 12 |
+
Transform unstructured user inquiries into a comprehensive, navigable knowledge exploration framework that:
|
| 13 |
+
- Deconstructs complex topics into manageable exploration dimensions
|
| 14 |
+
- Generates intelligent, contextually-linked axes and values
|
| 15 |
+
- Enables flexible navigation through knowledge spaces
|
| 16 |
+
- Supports iterative learning and discovery
|
| 17 |
+
|
| 18 |
+
## INPUT REQUIREMENTS
|
| 19 |
+
Input is a JSON object containing:
|
| 20 |
+
{
|
| 21 |
+
"user_query": "Primary exploration intent or research question",
|
| 22 |
+
"selected_path": [
|
| 23 |
+
{"axis": "string", "value": "string"} // Current exploration context
|
| 24 |
+
],
|
| 25 |
+
"exploration_parameters": {
|
| 26 |
+
"depth": 0-10, // Exploration granularity
|
| 27 |
+
"domain": "optional domain-specific context",
|
| 28 |
+
"previous_explorations": [] // Historical exploration context
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
### Input Components Explained:
|
| 33 |
+
1. `user_query`: The fundamental question or exploration intent
|
| 34 |
+
- Can be broad or specific
|
| 35 |
+
- Represents the initial knowledge seeking goal
|
| 36 |
+
- Provides context for axis and value generation
|
| 37 |
+
|
| 38 |
+
2. `selected_path`: Current exploration context
|
| 39 |
+
- Represents user's existing exploration trajectory
|
| 40 |
+
- Each tuple defines an axis-value pair
|
| 41 |
+
- Guides contextual relevance of future suggestions
|
| 42 |
+
|
| 43 |
+
3. `exploration_parameters`:
|
| 44 |
+
- `depth`: Controls exploration granularity
|
| 45 |
+
- `domain`: Provides additional contextual constraints
|
| 46 |
+
- `previous_explorations`: Tracks exploration history
|
| 47 |
+
|
| 48 |
+
## OUTPUT BLUEPRINT
|
| 49 |
+
{
|
| 50 |
+
"exploration_summary": {
|
| 51 |
+
"current_context": "Narrative summary of exploration state",
|
| 52 |
+
"complexity_level": 0-10
|
| 53 |
+
},
|
| 54 |
+
"knowledge_axes": {
|
| 55 |
+
"standard_axes": [
|
| 56 |
+
{
|
| 57 |
+
"name": "string",
|
| 58 |
+
"current_values": [""],
|
| 59 |
+
"potential_values": [
|
| 60 |
+
{
|
| 61 |
+
"value": "string",
|
| 62 |
+
"relevance_score": 0-100,
|
| 63 |
+
"contextual_rationale": "Why this value matters"
|
| 64 |
+
}
|
| 65 |
+
],
|
| 66 |
+
"axis_constraints": ["Logical limitations"]
|
| 67 |
+
}
|
| 68 |
],
|
| 69 |
+
"emergent_axes": [
|
| 70 |
+
{
|
| 71 |
+
"name": "string",
|
| 72 |
+
"parent_axis": "string",
|
| 73 |
+
"innovative_values": [
|
| 74 |
+
{
|
| 75 |
+
"value": "string",
|
| 76 |
+
"innovation_score": 0-100,
|
| 77 |
+
"discovery_potential": "Unique exploration opportunity"
|
| 78 |
+
}
|
| 79 |
+
]
|
| 80 |
+
}
|
| 81 |
+
]
|
| 82 |
+
},
|
| 83 |
+
"navigation_strategies": {
|
| 84 |
+
"zoom_trajectories": [
|
| 85 |
+
{
|
| 86 |
+
"target_axis": "string",
|
| 87 |
+
"zoom_value": "string",
|
| 88 |
+
"unlocked_dimensions": [""],
|
| 89 |
+
"depth_increment": 1-3
|
| 90 |
+
}
|
| 91 |
+
],
|
| 92 |
+
"dezoom_pathways": [
|
| 93 |
+
{
|
| 94 |
+
"removal_tuple": {"axis": "string", "value": "string"},
|
| 95 |
+
"contextual_expansion": "Broader exploration narrative",
|
| 96 |
+
"new_possibility_vectors": [""]
|
| 97 |
+
}
|
| 98 |
+
]
|
| 99 |
+
},
|
| 100 |
+
"meta_insights": {
|
| 101 |
+
"exploration_efficiency": 0-100,
|
| 102 |
+
"knowledge_gap_indicators": [""],
|
| 103 |
+
"recommended_next_steps": [""]
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
## PROCESSING GUIDELINES
|
| 108 |
+
1. Prioritize high-relevance, low-redundancy axes
|
| 109 |
+
2. Maintain semantic coherence across generated dimensions
|
| 110 |
+
3. Ensure logical progression in exploration paths
|
| 111 |
+
4. Dynamically adjust complexity based on exploration depth
|
| 112 |
+
|
| 113 |
+
## COGNITIVE MAPPING PRINCIPLES
|
| 114 |
+
- Connect axes through semantic and contextual relationships
|
| 115 |
+
- Generate values that expand conceptual understanding
|
| 116 |
+
- Provide actionable, insight-driven navigation suggestions
|
| 117 |
+
- Respect domain-specific knowledge constraints
|
| 118 |
+
|
| 119 |
+
## ADVANCED CONSTRAINTS
|
| 120 |
+
- Avoid circular or repetitive exploration paths
|
| 121 |
+
- Maintain logical consistency with initial query
|
| 122 |
+
- Provide clear rationale for axis and value selections
|
| 123 |
+
- Support iterative, progressive knowledge discovery
|
| 124 |
+
|
| 125 |
+
## OUTPUT INTERPRETATION GUIDE
|
| 126 |
+
- `exploration_summary`: Overall context and complexity
|
| 127 |
+
- `knowledge_axes`:
|
| 128 |
+
- `standard_axes`: Traditional exploration dimensions
|
| 129 |
+
- `emergent_axes`: Innovative, context-derived dimensions
|
| 130 |
+
- `navigation_strategies`:
|
| 131 |
+
- `zoom_trajectories`: Depth-increasing exploration paths
|
| 132 |
+
- `dezoom_pathways`: Breadth-expanding exploration options
|
| 133 |
+
- `meta_insights`: Performance and discovery potential metrics"""
|
| 134 |
+
|
| 135 |
+
DEFAULT_RESPONSE = {
|
| 136 |
+
"exploration_summary": {
|
| 137 |
+
"current_context": "Initial exploration state",
|
| 138 |
+
"complexity_level": 1
|
| 139 |
+
},
|
| 140 |
+
"knowledge_axes": {
|
| 141 |
+
"standard_axes": [
|
| 142 |
+
{
|
| 143 |
+
"name": "temporal",
|
| 144 |
+
"current_values": ["present"],
|
| 145 |
+
"potential_values": [
|
| 146 |
+
{
|
| 147 |
+
"value": "past",
|
| 148 |
+
"relevance_score": 80,
|
| 149 |
+
"contextual_rationale": "Historical context"
|
| 150 |
+
}
|
| 151 |
+
],
|
| 152 |
+
"axis_constraints": ["chronological order"]
|
| 153 |
+
}
|
| 154 |
+
],
|
| 155 |
+
"emergent_axes": []
|
| 156 |
+
},
|
| 157 |
+
"navigation_strategies": {
|
| 158 |
+
"zoom_trajectories": [],
|
| 159 |
+
"dezoom_pathways": []
|
| 160 |
+
},
|
| 161 |
+
"meta_insights": {
|
| 162 |
+
"exploration_efficiency": 50,
|
| 163 |
+
"knowledge_gap_indicators": ["initial state"],
|
| 164 |
+
"recommended_next_steps": ["begin exploration"]
|
| 165 |
+
}
|
| 166 |
}
|