You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Analyze if this question can be answered from the conversation history and/or cached data above, or if it needs new data retrieval.\n"
175
-
"Return JSON only."
176
-
)
170
+
user_prompt="Conversation History:\n"+ (history_contextifhistory_contextelse"(No previous conversation)") +"\n\n""Cached Data:\n"+cache_summary+"\n\n""Current Question: "+question+"\n\n""Analyze if this question can be answered from the conversation history and/or cached data above, or if it needs new data retrieval.\n""Return JSON only."
177
171
178
172
default_result= {"needs_new_data": True, "reason": "Error analyzing question, defaulting to new data"}
" - If question mentions a SPECIFIC policy by name (e.g., 'Anti-Displacement Plan', 'Slow Streets', 'Imagine Boston 2030'):\n"
267
261
" * Set policy_sources to that specific document (e.g., ['Boston Anti-Displacement Plan Analysis.txt'])\n"
268
262
" * ALWAYS also add relevant transcript_tags for community perspective\n"
269
-
" - If question is GENERAL about policy/planning but doesn't name a specific document:\n"
270
-
" * Examples: 'What are current policy issues?', 'What policies affect housing?', 'What is being planned for the neighborhood?'\n"
263
+
" - If question is GENERAL about policy/policies/planning/housing (doesn't name a specific document):\n"
264
+
" * Examples: 'What are current policy issues?', 'What policies affect housing?', 'What is being planned for the neighborhood?', 'What does the city say about displacement?'\n"
271
265
" * Set policy_sources to null (will search ALL policy documents)\n"
272
-
" * Add relevant transcript_tags\n"
273
-
" * Set k to at least 10 to get diverse policy coverage\n\n"
266
+
" * Set folder_categories to ['policies'] to search the policy folder\n"
267
+
" * Set k to at least 15 to get diverse policy coverage\n\n"
274
268
"RULE 6: COMBINED DATA + CONTEXT → 'hybrid' mode\n"
275
269
" - Questions that explicitly ask for BOTH numbers/data AND context/explanation\n"
276
270
" - Examples: 'How many homicides and what concerns come up?', 'Show trends and how policies address them'\n"
0 commit comments