Skip to content

Commit 44cc5af

Browse files
authored
Merge pull request #61 from Public-Computing-Lab/development
fixed prompt wording
2 parents 1843b62 + 38dba1c commit 44cc5af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

experiment-7/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -977,9 +977,9 @@ def handle_chat_response_right(stored_input, slider_value, msgs, selected, refre
977977

978978
# Build prompt based on trigger source
979979
if is_user_question:
980-
prompt = f"response-type = community. Your neighbor wants to hear community voices for {selected_date}. Based on the available data, provide insight in a direct and to-the-point manner to your neighbor's question: {stored_input}"
980+
prompt = f"response-type = sentiment. Your neighbor wants to hear community voices for {selected_date}. Based on the available data, provide insight in a direct and to-the-point manner to your neighbor's question: {stored_input}"
981981
else:
982-
prompt = f"response-type = community. Share community voices and concerns from {selected_date}. Write from neighbors' perspectives using first-person quotes. Avoid using category headers like 'Living Conditions:', 'Trash:', etc. Focus on personal testimonials and community sentiment. Provide detailed multi-paragraph responses with several specific examples from community members."
982+
prompt = f"response-type = sentiment. Share community voices and concerns from {selected_date}. Write from neighbors' perspectives using first-person quotes. Do not include category headers like 'Living Conditions:', 'Trash:', etc. Focus on personal testimonials and community sentiment. Provide detailed multi-paragraph responses with several specific examples from community members."
983983

984984
# Get area context if available
985985
area_context = ""
@@ -1149,7 +1149,7 @@ def handle_initial_prompts(n_clicks, selected, slider_value, refresh_clicks):
11491149
stats_reply = get_chat_response(prompt=stats_prompt, structured_response=True)
11501150
stats_message = html.Div([html.Strong("A by-the-numbers overview of your neighborhood:"), dcc.Markdown(stats_reply, dangerously_allow_html=True)], className="bot-message", **{"data-response-type": "auto-generated", "data-date": selected_date})
11511151

1152-
community_prompt = f"response-type = community. Share voices from {selected_date} community meetings:{area_context} " "Write from the perspective of residents using first-person quotes. Avoid using category " "headers like 'Living Conditions:', 'Trash:', etc. Focus on personal testimonials and community sentiment. " "Provide detailed multi-paragraph responses with several specific examples from community members."
1152+
community_prompt = f"response-type = sentiment. Share voices from {selected_date} community meetings:{area_context} " "Write from the perspective of residents using first-person quotes. Do not use category " "headers like 'Living Conditions:', 'Trash:', etc. Focus on personal testimonials and community sentiment. " "Provide detailed multi-paragraph responses with several specific examples from community members."
11531153
community_reply = get_chat_response(prompt=community_prompt, structured_response=False)
11541154
community_message = html.Div([html.Strong("From recent community meetings:"), dcc.Markdown(community_reply, dangerously_allow_html=True)], className="bot-message", **{"data-response-type": "auto-generated", "data-date": selected_date})
11551155
refresh_clicks = 0 if refresh_clicks is None else refresh_clicks + 1

0 commit comments

Comments
 (0)