GuglielmoTor commited on
Commit
b27237e
·
verified ·
1 Parent(s): 96cc5d6

Update features/insight_and_tasks/agents/task_extraction_model.py

Browse files
features/insight_and_tasks/agents/task_extraction_model.py CHANGED
@@ -30,28 +30,37 @@ def create_example_structure():
30
  "current_quarter_info": "Q2 2025, 24 days remaining",
31
  "okrs": [
32
  {
33
- "objective": "Improve LinkedIn employer branding performance",
34
- "data_subject": "linkedin_performance",
 
35
  "key_results": [
36
  {
37
- "description": "Increase monthly follower growth by 50%",
 
38
  "target_value": "50% increase",
39
  "current_value": "22 followers/month",
 
 
40
  "tasks": [
41
  {
42
- "title": "Increase posting frequency",
43
- "description": "Post 2-3 times per week consistently",
44
- "task_type": "content_creation",
45
  "priority": "high",
46
- "effort_level": "medium",
47
  "timeline": "this_quarter",
48
- "data_subject": "linkedin_performance"
 
 
 
 
49
  }
50
  ]
51
  }
52
  ]
53
  }
54
- ]
 
55
  }
56
 
57
  # --- Helper Function for Date Calculations ---
@@ -124,7 +133,7 @@ def extract_tasks_from_text(user_text_input: str, api_key: str) -> TaskExtractio
124
 
125
  Your output MUST be a valid JSON object that strictly conforms to the 'TaskExtractionOutput' schema provided.
126
  EXAMPLE STRUCTURE (follow this pattern exactly):
127
- {json.dumps(example_structure, indent=2)}
128
 
129
  CURRENT CONTEXTUAL INFORMATION (CRITICAL - Use these exact values in your output where specified):
130
  - Current Quarter: Q{quarter}
 
30
  "current_quarter_info": "Q2 2025, 24 days remaining",
31
  "okrs": [
32
  {
33
+ "objective_description": "Improve LinkedIn employer branding performance",
34
+ "objective_timeline": "short",
35
+ "objective_owner": "marketing",
36
  "key_results": [
37
  {
38
+ "key_result_description": "Increase monthly follower growth by 50%",
39
+ "target_metric": "+50 followers",
40
  "target_value": "50% increase",
41
  "current_value": "22 followers/month",
42
+ "key_result_type": "performance",
43
+ "data_subject": "posts",
44
  "tasks": [
45
  {
46
+ "task_description": "Increase posting frequency",
47
+ "objective_deliverable": "Post 2-3 times per week consistently",
48
+ "task_category": "content_creation",
49
  "priority": "high",
50
+ "effort": "medium",
51
  "timeline": "this_quarter",
52
+ "data_subject": "linkedin_performance",
53
+ "responsible_party": "marketing",
54
+ "success_criteria_metrics": "post 3 times",
55
+ "dependencies_prerequisites": "a linkedin account",
56
+ "why_proposed": "because previous data show low post frequency and low follwoer gains"
57
  }
58
  ]
59
  }
60
  ]
61
  }
62
+ ],
63
+ "overall_strategic_focus": "increase followers"
64
  }
65
 
66
  # --- Helper Function for Date Calculations ---
 
133
 
134
  Your output MUST be a valid JSON object that strictly conforms to the 'TaskExtractionOutput' schema provided.
135
  EXAMPLE STRUCTURE (follow this pattern exactly):
136
+ {json.dumps(create_example_structure, indent=2)}
137
 
138
  CURRENT CONTEXTUAL INFORMATION (CRITICAL - Use these exact values in your output where specified):
139
  - Current Quarter: Q{quarter}