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
# for now only search on the first message until I can figure this out - apparently we can't just replace the system prompt once the conversation is rolling...
468
470
returnNone
469
471
#print(f"on replies now..")
470
472
#system_message = "Do you need to do any searching to answer the latest chat message? If so provide a comma delimited list of searches you would like me to perform for you to give you all the background data and links you need. If you can answer with full confidence without any searches, then reply with simply 'No searches required.'.\n\n"
471
473
else:
472
474
ifSummariesisNone:
473
-
system_preamble="The Original System Prompt that follows is your primary objective, but for this chat, you just need to provide a list of a few searches you might need me to perform in order to respond to the current user message, while documenting reference links to any claims you make, as specified in the Original System Prompt. If you can answer with full confidence without any searches, then reply with simply 'No searches required.'. Otherwise, send a comma delimited array of searches with one or several searches you would like me to perform for you to give you all the background data and links you need to respond. Do nothing else but provide the array of search strings or the 'No searches required.' message.\nOriginal System Prompt:\n"
475
+
system_preamble=prompts["identify_searches"];
474
476
else:
475
-
system_preamble="The Original System Prompt that follows is your primary objective, but for this chat, you just need to provide a list of a few additional searches you need me to perform in order to fully research and document your response to the user message. If you can answer with full confidence without any searches, then reply with simply 'No searches required.'. Otherwise, send a comma delimited array with one or several new searches you would like me to perform for you to give you all the background data and links you need. Do nothing else but provide the array of search strings or the 'No searches required.' message. Existing gathered background data that you determined was insufficient so far to answer follows.\n\nExisting Background Data:\n\n"+json.dumps(Summaries, indent=4) +"\n\nOriginal System Prompt:\n"
477
+
system_preamble=prompts["identify_additional_searches"]+json.dumps(Summaries, indent=4) +"\n\nOriginal System Prompt:\n"
system_prompt="You are tasked with helping content developers resolve customer feedback on their content on learn.microsoft.com. Right now, you've searched and identified the following list of potential URLs for further research. Return nothing except an array of strings, with each string being a URL we should browse to research further, so we can fully answer and document sources if necessary. Here is the summary of the possible sites we can browse:\n\n"+strsearchresults
system_prompt="You are tasked with helping content developers resolve customer feedback on their content on learn.microsoft.com. Right now, you've summarized the content of the URLs you've identified for further research. Review the summaries below and determine if you have enough background information to fully address the feedback on the URL provided by the user and document current sources. If you need more information, reply with 'More information needed.' If you have enough information, reply with 'Sufficient information.'\n\n"+strSummaries
return"Use the following background references to thoroughly document your answer for the customer in the Primary System Message at the end.\n\nBackground References:\n\n"+json.dumps(Summaries, indent=4) +"\n\nPrimary System Message:"
551
+
returnprompts["background_info_preamble"]+json.dumps(Summaries, indent=4) +"\n\nPrimary System Message:"
result=awaitstream_chat_request(request_body, request_headers, "NOTE: An error occurred while searching for background information. Please inform the user that you were unable to search to validate results, but do your best to answer regardless.\n\nPrimary System Message:\n\n")
"The Original System Prompt that follows is your primary objective, but for this chat, you just need to provide a list of a few searches you might need me to perform in order to respond to the current user message, while documenting reference links to any claims you make, as specified in the Original System Prompt. If you can answer with full confidence without any searches, then reply with simply 'No searches required.'. Otherwise, send a comma delimited array of searches with one or several searches you would like me to perform for you to give you all the background data and links you need to respond. Do nothing else but provide the array of search strings or the 'No searches required.' message.\nOriginal System Prompt:\n",
5
+
6
+
"identify_additional_searches":
7
+
8
+
"The Original System Prompt that follows is your primary objective, but for this chat, you just need to provide a list of a few additional searches you need me to perform in order to fully research and document your response to the user message. If you can answer with full confidence without any searches, then reply with simply 'No searches required.'. Otherwise, send a comma delimited array with one or several new searches you would like me to perform for you to give you all the background data and links you need. Do nothing else but provide the array of search strings or the 'No searches required.' message. Existing gathered background data that you determined was insufficient so far to answer follows.\n\nExisting Background Data:\n\n",
9
+
10
+
"get_urls_to_browse":
11
+
12
+
"You are tasked with helping content developers resolve customer feedback on their content on learn.microsoft.com. Right now, you've searched and identified the following list of potential URLs for further research. Return nothing except an array of strings, with each string being a URL we should browse to research further, so we can fully answer and document sources if necessary. Here is the summary of the possible sites we can browse:\n\n",
13
+
14
+
"get_article_summaries":
15
+
16
+
"EMPTY_FOR_NOW",
17
+
18
+
"is_background_info_sufficient":
19
+
20
+
"You are tasked with helping content developers resolve customer feedback on their content on learn.microsoft.com. Right now, you've summarized the content of the URLs you've identified for further research. Review the summaries below and determine if you have enough background information to fully address the feedback on the URL provided by the user and document current sources. If you need more information, reply with 'More information needed.' If you have enough information, reply with 'Sufficient information.'\n\n",
21
+
22
+
"background_info_preamble":
23
+
"Use the following background references to thoroughly document your answer for the customer as described in the Primary System Message at the end.\n\nBackground References:\n\n",
24
+
25
+
"search_error_preamble":
26
+
27
+
"NOTE: An error occurred while searching for background information. Please inform the user that you were unable to search to validate results, but do your best to answer regardless.\n\nPrimary System Message:\n\n"
0 commit comments