baconnier commited on
Commit
e254022
·
verified ·
1 Parent(s): e87b10f

Update prompts.py

Browse files
Files changed (1) hide show
  1. prompts.py +76 -61
prompts.py CHANGED
@@ -20,87 +20,94 @@ 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
 
@@ -163,4 +170,12 @@ DEFAULT_RESPONSE = {
163
  "knowledge_gap_indicators": ["initial state"],
164
  "recommended_next_steps": ["begin exploration"]
165
  }
166
- }
 
 
 
 
 
 
 
 
 
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
+ ## CURRENT INPUT:
33
+ {
34
+ "user_query": "{{user_query}}",
35
+ "selected_path": {{selected_path}},
36
+ "exploration_parameters": {{exploration_parameters}}
37
+ }
38
+
39
  ### Input Components Explained:
40
  1. `user_query`: The fundamental question or exploration intent
41
+ - Can be broad or specific
42
+ - Represents the initial knowledge seeking goal
43
+ - Provides context for axis and value generation
44
 
45
  2. `selected_path`: Current exploration context
46
+ - Represents user's existing exploration trajectory
47
+ - Each tuple defines an axis-value pair
48
+ - Guides contextual relevance of future suggestions
49
 
50
  3. `exploration_parameters`:
51
+ - `depth`: Controls exploration granularity
52
+ - `domain`: Provides additional contextual constraints
53
+ - `previous_explorations`: Tracks exploration history
54
 
55
  ## OUTPUT BLUEPRINT
56
  {
57
  "exploration_summary": {
58
+ "current_context": "Narrative summary of exploration state",
59
+ "complexity_level": 0-10
60
  },
61
  "knowledge_axes": {
62
+ "standard_axes": [
63
+ {
64
+ "name": "string",
65
+ "current_values": [""],
66
+ "potential_values": [
67
+ {
68
+ "value": "string",
69
+ "relevance_score": 0-100,
70
+ "contextual_rationale": "Why this value matters"
71
+ }
72
+ ],
73
+ "axis_constraints": ["Logical limitations"]
74
+ }
75
+ ],
76
+ "emergent_axes": [
77
+ {
78
+ "name": "string",
79
+ "parent_axis": "string",
80
+ "innovative_values": [
81
+ {
82
+ "value": "string",
83
+ "innovation_score": 0-100,
84
+ "discovery_potential": "Unique exploration opportunity"
85
+ }
86
+ ]
87
+ }
88
+ ]
89
  },
90
  "navigation_strategies": {
91
+ "zoom_trajectories": [
92
+ {
93
+ "target_axis": "string",
94
+ "zoom_value": "string",
95
+ "unlocked_dimensions": [""],
96
+ "depth_increment": 1-3
97
+ }
98
+ ],
99
+ "dezoom_pathways": [
100
+ {
101
+ "removal_tuple": {"axis": "string", "value": "string"},
102
+ "contextual_expansion": "Broader exploration narrative",
103
+ "new_possibility_vectors": [""]
104
+ }
105
+ ]
106
  },
107
  "meta_insights": {
108
+ "exploration_efficiency": 0-100,
109
+ "knowledge_gap_indicators": [""],
110
+ "recommended_next_steps": [""]
111
  }
112
  }
113
 
 
170
  "knowledge_gap_indicators": ["initial state"],
171
  "recommended_next_steps": ["begin exploration"]
172
  }
173
+ }
174
+
175
+ def format_exploration_prompt(user_query: str, selected_path: list, exploration_parameters: dict) -> str:
176
+ """Helper function to format the prompt with proper JSON structure"""
177
+ return CONTEXTUAL_ZOOM_PROMPT.format(
178
+ user_query=json.dumps(user_query),
179
+ selected_path=json.dumps(selected_path),
180
+ exploration_parameters=json.dumps(exploration_parameters)
181
+ )