-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_phase3_integration.py
More file actions
71 lines (55 loc) · 2.43 KB
/
Copy pathtest_phase3_integration.py
File metadata and controls
71 lines (55 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env python3
"""
Test Phase 3 Integration
========================
Tests the integration of work history context enhancement with the main agent.
"""
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from agents.cover_letter_agent import CoverLetterAgent
from agents.work_history_context import WorkHistoryContextEnhancer
def test_phase3_integration():
"""Test the integration of Phase 3 work history context enhancement."""
print("🧪 Testing Phase 3 Integration...")
# Test work history context enhancement standalone
print("\n📋 Testing Work History Context Enhancement:")
enhancer = WorkHistoryContextEnhancer()
test_case_studies = [
{
'id': 'enact',
'name': 'Enact 0 to 1 Case Study',
'tags': ['growth', 'consumer', 'clean_energy', 'user_experience']
},
{
'id': 'aurora',
'name': 'Aurora Solar Growth Case Study',
'tags': ['growth', 'B2B', 'clean_energy', 'scaling']
}
]
enhanced = enhancer.enhance_case_studies_batch(test_case_studies)
print("✅ Work History Context Enhancement Results:")
for enhanced_case_study in enhanced:
print(f" {enhanced_case_study.case_study_id.upper()}:")
print(f" Original tags: {enhanced_case_study.original_tags}")
print(f" Enhanced tags: {enhanced_case_study.enhanced_tags}")
print(f" Confidence: {enhanced_case_study.confidence_score:.2f}")
# Test agent initialization with work history enhancement
print("\n📋 Testing Agent Integration:")
try:
agent = CoverLetterAgent()
print("✅ Agent initialized successfully")
# Test case study selection with enhanced context
print("\n📋 Testing Case Study Selection with Enhanced Context:")
job_keywords = ['product manager', 'growth', 'leadership']
case_studies = agent.get_case_studies(job_keywords)
print(f"✅ Found {len(case_studies)} case studies")
for case_study in case_studies:
print(f" - {case_study.get('name', case_study.get('id', 'Unknown'))}")
print("\n✅ Phase 3 Integration test completed successfully!")
except Exception as e:
print(f"❌ Agent integration failed: {e}")
import traceback
traceback.print_exc()
if __name__ == "__main__":
test_phase3_integration()