nagur-shareef-shaik commited on
Commit
8c1b8b7
·
1 Parent(s): 9d72398

Updated Agent Orchestrator

Browse files
insucompass/core/agent_orchestrator.py CHANGED
@@ -93,23 +93,23 @@ def plan_recommender_node(state: AgentState) -> Dict[str, Any]:
93
  # 1. Formulate a search query to find up-to-date plans
94
 
95
 
96
- # ------------ 1) Capture today's date in a friendly format ------------
97
  current_date = datetime.date.today().strftime("%B %d %Y") # e.g., "July 21 2025"
98
 
99
- # ------------ 2) Tavern / Tavily search-query template ------------
100
  query_template = (
101
  '"Individual health-insurance plans" '
102
  '"{county} County {state} {zip_code}" "{current_date}" '
103
  '"{age}-year-old" "household size {household_size}" "income {income}" '
104
  '"employment {employment_status}" "citizenship {citizenship}" '
105
- '"coverage for {medical_history}" "formulary {medications}" "{special_cases}" '
106
  '"ACA marketplace OR Healthcare.gov OR CMS Landscape File" '
107
  '"off-exchange OR private health insurance OR direct-to-consumer plan OR short-term medical" '
108
  '"premium" "deductible" "out-of-pocket max" "metal tier bronze silver gold platinum" '
109
  '"network HMO PPO EPO" "Summary of Benefits and Coverage" "CMS 2025 final rate filings"'
110
  )
111
 
112
- # ------------ 3) Inject user-specific values ------------
113
  search_query = query_template.format(current_date=current_date, **user_profile)
114
  logger.info(f"Plan Recommender search query: '{search_query}'")
115
 
 
93
  # 1. Formulate a search query to find up-to-date plans
94
 
95
 
96
+ # ------------ A) Capture today's date in a friendly format ------------
97
  current_date = datetime.date.today().strftime("%B %d %Y") # e.g., "July 21 2025"
98
 
99
+ # ------------ B) Tavern / Tavily search-query template ------------
100
  query_template = (
101
  '"Individual health-insurance plans" '
102
  '"{county} County {state} {zip_code}" "{current_date}" '
103
  '"{age}-year-old" "household size {household_size}" "income {income}" '
104
  '"employment {employment_status}" "citizenship {citizenship}" '
105
+ '"medical history {medical_history}" "formulary {medications}" "{special_cases}" '
106
  '"ACA marketplace OR Healthcare.gov OR CMS Landscape File" '
107
  '"off-exchange OR private health insurance OR direct-to-consumer plan OR short-term medical" '
108
  '"premium" "deductible" "out-of-pocket max" "metal tier bronze silver gold platinum" '
109
  '"network HMO PPO EPO" "Summary of Benefits and Coverage" "CMS 2025 final rate filings"'
110
  )
111
 
112
+ # ------------ C) Inject user-specific values ------------
113
  search_query = query_template.format(current_date=current_date, **user_profile)
114
  logger.info(f"Plan Recommender search query: '{search_query}'")
115