diff --git a/app/backend/approaches/chatreadretrieveread.py b/app/backend/approaches/chatreadretrieveread.py index 5434da7982..95ca08f0f0 100644 --- a/app/backend/approaches/chatreadretrieveread.py +++ b/app/backend/approaches/chatreadretrieveread.py @@ -196,7 +196,7 @@ async def run_until_final_call( "thoughts": [ ThoughtStep( "Prompt to generate search query", - [str(message) for message in query_messages], + query_messages, ( {"model": self.chatgpt_model, "deployment": self.chatgpt_deployment} if self.chatgpt_deployment @@ -221,7 +221,7 @@ async def run_until_final_call( ), ThoughtStep( "Prompt to generate answer", - [str(message) for message in messages], + messages, ( {"model": self.chatgpt_model, "deployment": self.chatgpt_deployment} if self.chatgpt_deployment diff --git a/app/backend/approaches/chatreadretrievereadvision.py b/app/backend/approaches/chatreadretrievereadvision.py index 68d371c6cd..df64f266f7 100644 --- a/app/backend/approaches/chatreadretrievereadvision.py +++ b/app/backend/approaches/chatreadretrievereadvision.py @@ -200,7 +200,7 @@ async def run_until_final_call( "thoughts": [ ThoughtStep( "Prompt to generate search query", - [str(message) for message in query_messages], + query_messages, ( {"model": query_model, "deployment": query_deployment} if query_deployment @@ -225,7 +225,7 @@ async def run_until_final_call( ), ThoughtStep( "Prompt to generate answer", - [str(message) for message in messages], + messages, ( {"model": self.gpt4v_model, "deployment": self.gpt4v_deployment} if self.gpt4v_deployment diff --git a/app/backend/approaches/retrievethenread.py b/app/backend/approaches/retrievethenread.py index db956742f0..d5b05a0fbe 100644 --- a/app/backend/approaches/retrievethenread.py +++ b/app/backend/approaches/retrievethenread.py @@ -155,7 +155,7 @@ async def run( ), ThoughtStep( "Prompt to generate answer", - [str(message) for message in updated_messages], + updated_messages, ( {"model": self.chatgpt_model, "deployment": self.chatgpt_deployment} if self.chatgpt_deployment diff --git a/app/backend/approaches/retrievethenreadvision.py b/app/backend/approaches/retrievethenreadvision.py index 74afb6274f..5e318ce8ea 100644 --- a/app/backend/approaches/retrievethenreadvision.py +++ b/app/backend/approaches/retrievethenreadvision.py @@ -177,7 +177,7 @@ async def run( ), ThoughtStep( "Prompt to generate answer", - [str(message) for message in updated_messages], + updated_messages, ( {"model": self.gpt4v_model, "deployment": self.gpt4v_deployment} if self.gpt4v_deployment diff --git a/tests/snapshots/test_app/test_ask_rtr_hybrid/client0/result.json b/tests/snapshots/test_app/test_ask_rtr_hybrid/client0/result.json index f6da11ac73..bf52b372ca 100644 --- a/tests/snapshots/test_app/test_ask_rtr_hybrid/client0/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_hybrid/client0/result.json @@ -46,10 +46,22 @@ }, { "description": [ - "{'role': 'system', 'content': \"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer\"}", - "{'role': 'user', 'content': \"\\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\\n\\nSources:\\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\\ninfo2.pdf: Overlake is in-network for the employee plan.\\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\\n\"}", - "{'role': 'assistant', 'content': 'In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].'}", - "{'role': 'user', 'content': 'What is the capital of France?\\nSources:\\n Benefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer", + "role": "system" + }, + { + "content": "\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\n\nSources:\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\ninfo2.pdf: Overlake is in-network for the employee plan.\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\n", + "role": "user" + }, + { + "content": "In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].", + "role": "assistant" + }, + { + "content": "What is the capital of France?\nSources:\n Benefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_ask_rtr_hybrid/client1/result.json b/tests/snapshots/test_app/test_ask_rtr_hybrid/client1/result.json index e0eebab128..ed09cd39a6 100644 --- a/tests/snapshots/test_app/test_ask_rtr_hybrid/client1/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_hybrid/client1/result.json @@ -46,10 +46,22 @@ }, { "description": [ - "{'role': 'system', 'content': \"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer\"}", - "{'role': 'user', 'content': \"\\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\\n\\nSources:\\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\\ninfo2.pdf: Overlake is in-network for the employee plan.\\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\\n\"}", - "{'role': 'assistant', 'content': 'In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].'}", - "{'role': 'user', 'content': 'What is the capital of France?\\nSources:\\n Benefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer", + "role": "system" + }, + { + "content": "\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\n\nSources:\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\ninfo2.pdf: Overlake is in-network for the employee plan.\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\n", + "role": "user" + }, + { + "content": "In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].", + "role": "assistant" + }, + { + "content": "What is the capital of France?\nSources:\n Benefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_ask_rtr_text/client0/result.json b/tests/snapshots/test_app/test_ask_rtr_text/client0/result.json index 3697e2a4b3..c11293882e 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text/client0/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text/client0/result.json @@ -46,10 +46,22 @@ }, { "description": [ - "{'role': 'system', 'content': \"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer\"}", - "{'role': 'user', 'content': \"\\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\\n\\nSources:\\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\\ninfo2.pdf: Overlake is in-network for the employee plan.\\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\\n\"}", - "{'role': 'assistant', 'content': 'In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].'}", - "{'role': 'user', 'content': 'What is the capital of France?\\nSources:\\n Benefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer", + "role": "system" + }, + { + "content": "\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\n\nSources:\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\ninfo2.pdf: Overlake is in-network for the employee plan.\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\n", + "role": "user" + }, + { + "content": "In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].", + "role": "assistant" + }, + { + "content": "What is the capital of France?\nSources:\n Benefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_ask_rtr_text/client1/result.json b/tests/snapshots/test_app/test_ask_rtr_text/client1/result.json index 9ba5441a76..e2f4527695 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text/client1/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text/client1/result.json @@ -46,10 +46,22 @@ }, { "description": [ - "{'role': 'system', 'content': \"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer\"}", - "{'role': 'user', 'content': \"\\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\\n\\nSources:\\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\\ninfo2.pdf: Overlake is in-network for the employee plan.\\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\\n\"}", - "{'role': 'assistant', 'content': 'In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].'}", - "{'role': 'user', 'content': 'What is the capital of France?\\nSources:\\n Benefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer", + "role": "system" + }, + { + "content": "\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\n\nSources:\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\ninfo2.pdf: Overlake is in-network for the employee plan.\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\n", + "role": "user" + }, + { + "content": "In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].", + "role": "assistant" + }, + { + "content": "What is the capital of France?\nSources:\n Benefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_ask_rtr_text_filter/auth_client0/result.json b/tests/snapshots/test_app/test_ask_rtr_text_filter/auth_client0/result.json index 7edecf2573..5c22651705 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text_filter/auth_client0/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text_filter/auth_client0/result.json @@ -46,10 +46,22 @@ }, { "description": [ - "{'role': 'system', 'content': \"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer\"}", - "{'role': 'user', 'content': \"\\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\\n\\nSources:\\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\\ninfo2.pdf: Overlake is in-network for the employee plan.\\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\\n\"}", - "{'role': 'assistant', 'content': 'In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].'}", - "{'role': 'user', 'content': 'What is the capital of France?\\nSources:\\n Benefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer", + "role": "system" + }, + { + "content": "\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\n\nSources:\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\ninfo2.pdf: Overlake is in-network for the employee plan.\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\n", + "role": "user" + }, + { + "content": "In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].", + "role": "assistant" + }, + { + "content": "What is the capital of France?\nSources:\n Benefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_ask_rtr_text_filter_public_documents/auth_public_documents_client0/result.json b/tests/snapshots/test_app/test_ask_rtr_text_filter_public_documents/auth_public_documents_client0/result.json index f9ad675632..07fcb3cd40 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text_filter_public_documents/auth_public_documents_client0/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text_filter_public_documents/auth_public_documents_client0/result.json @@ -46,10 +46,22 @@ }, { "description": [ - "{'role': 'system', 'content': \"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer\"}", - "{'role': 'user', 'content': \"\\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\\n\\nSources:\\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\\ninfo2.pdf: Overlake is in-network for the employee plan.\\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\\n\"}", - "{'role': 'assistant', 'content': 'In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].'}", - "{'role': 'user', 'content': 'What is the capital of France?\\nSources:\\n Benefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer", + "role": "system" + }, + { + "content": "\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\n\nSources:\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\ninfo2.pdf: Overlake is in-network for the employee plan.\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\n", + "role": "user" + }, + { + "content": "In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].", + "role": "assistant" + }, + { + "content": "What is the capital of France?\nSources:\n Benefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client0/result.json b/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client0/result.json index 3b7f910b41..84ce594ac4 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client0/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client0/result.json @@ -46,10 +46,22 @@ }, { "description": [ - "{'role': 'system', 'content': \"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer\"}", - "{'role': 'user', 'content': \"\\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\\n\\nSources:\\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\\ninfo2.pdf: Overlake is in-network for the employee plan.\\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\\n\"}", - "{'role': 'assistant', 'content': 'In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].'}", - "{'role': 'user', 'content': 'What is the capital of France?\\nSources:\\n Benefit_Options-2.pdf: Caption: A whistleblower policy.'}" + { + "content": "You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer", + "role": "system" + }, + { + "content": "\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\n\nSources:\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\ninfo2.pdf: Overlake is in-network for the employee plan.\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\n", + "role": "user" + }, + { + "content": "In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].", + "role": "assistant" + }, + { + "content": "What is the capital of France?\nSources:\n Benefit_Options-2.pdf: Caption: A whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client1/result.json b/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client1/result.json index c16ee73943..ba0591bcff 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client1/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text_semanticcaptions/client1/result.json @@ -46,10 +46,22 @@ }, { "description": [ - "{'role': 'system', 'content': \"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer\"}", - "{'role': 'user', 'content': \"\\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\\n\\nSources:\\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\\ninfo2.pdf: Overlake is in-network for the employee plan.\\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\\n\"}", - "{'role': 'assistant', 'content': 'In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].'}", - "{'role': 'user', 'content': 'What is the capital of France?\\nSources:\\n Benefit_Options-2.pdf: Caption: A whistleblower policy.'}" + { + "content": "You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer", + "role": "system" + }, + { + "content": "\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\n\nSources:\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\ninfo2.pdf: Overlake is in-network for the employee plan.\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\n", + "role": "user" + }, + { + "content": "In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].", + "role": "assistant" + }, + { + "content": "What is the capital of France?\nSources:\n Benefit_Options-2.pdf: Caption: A whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client0/result.json b/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client0/result.json index 7d22b4b4b0..ff67dab680 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client0/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client0/result.json @@ -46,10 +46,22 @@ }, { "description": [ - "{'role': 'system', 'content': \"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer\"}", - "{'role': 'user', 'content': \"\\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\\n\\nSources:\\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\\ninfo2.pdf: Overlake is in-network for the employee plan.\\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\\n\"}", - "{'role': 'assistant', 'content': 'In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].'}", - "{'role': 'user', 'content': 'What is the capital of France?\\nSources:\\n Benefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer", + "role": "system" + }, + { + "content": "\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\n\nSources:\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\ninfo2.pdf: Overlake is in-network for the employee plan.\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\n", + "role": "user" + }, + { + "content": "In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].", + "role": "assistant" + }, + { + "content": "What is the capital of France?\nSources:\n Benefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client1/result.json b/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client1/result.json index 1ecfaaee20..605a5275a4 100644 --- a/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client1/result.json +++ b/tests/snapshots/test_app/test_ask_rtr_text_semanticranker/client1/result.json @@ -46,10 +46,22 @@ }, { "description": [ - "{'role': 'system', 'content': \"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer\"}", - "{'role': 'user', 'content': \"\\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\\n\\nSources:\\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\\ninfo2.pdf: Overlake is in-network for the employee plan.\\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\\n\"}", - "{'role': 'assistant', 'content': 'In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].'}", - "{'role': 'user', 'content': 'What is the capital of France?\\nSources:\\n Benefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer", + "role": "system" + }, + { + "content": "\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\n\nSources:\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\ninfo2.pdf: Overlake is in-network for the employee plan.\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\n", + "role": "user" + }, + { + "content": "In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].", + "role": "assistant" + }, + { + "content": "What is the capital of France?\nSources:\n Benefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_ask_vision/client0/result.json b/tests/snapshots/test_app/test_ask_vision/client0/result.json index 9655e6c828..b2f77bb714 100644 --- a/tests/snapshots/test_app/test_ask_vision/client0/result.json +++ b/tests/snapshots/test_app/test_ask_vision/client0/result.json @@ -46,10 +46,22 @@ }, { "description": [ - "{'role': 'system', 'content': \"You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer\"}", - "{'role': 'user', 'content': \"\\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\\n\\nSources:\\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\\ninfo2.pdf: Overlake is in-network for the employee plan.\\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\\n\"}", - "{'role': 'assistant', 'content': 'In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].'}", - "{'role': 'user', 'content': 'Are interest rates high?\\nSources:\\n Benefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions. Use 'you' to refer to the individual asking the questions even if they ask with 'I'. Answer the following question using only the data provided in the sources below. Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. If you cannot answer using the sources below, say you don't know. Use below example to answer", + "role": "system" + }, + { + "content": "\n'What is the deductible for the employee plan for a visit to Overlake in Bellevue?'\n\nSources:\ninfo1.txt: deductibles depend on whether you are in-network or out-of-network. In-network deductibles are $500 for employee and $1000 for family. Out-of-network deductibles are $1000 for employee and $2000 for family.\ninfo2.pdf: Overlake is in-network for the employee plan.\ninfo3.pdf: Overlake is the name of the area that includes a park and ride near Bellevue.\ninfo4.pdf: In-network institutions include Overlake, Swedish and others in the region\n", + "role": "user" + }, + { + "content": "In-network deductibles are $500 for employee and $1000 for family [info1.txt] and Overlake is in-network for the employee plan [info2.pdf][info4.pdf].", + "role": "assistant" + }, + { + "content": "Are interest rates high?\nSources:\n Benefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_ask_vision/client1/result.json b/tests/snapshots/test_app/test_ask_vision/client1/result.json index abbc79983a..b217b87cbf 100644 --- a/tests/snapshots/test_app/test_ask_vision/client1/result.json +++ b/tests/snapshots/test_app/test_ask_vision/client1/result.json @@ -50,8 +50,30 @@ }, { "description": [ - "{'role': 'system', 'content': \"You are an intelligent assistant helping analyze the Annual Financial Report of Contoso Ltd., The documents contain text, graphs, tables and images. Each image source has the file name in the top left corner of the image with coordinates (10,10) pixels and is in the format SourceFileName: Each text source starts in a new line and has the file name followed by colon and the actual information Always include the source name from the image or text for each fact you use in the response in the format: [filename] Answer the following question using only the data provided in the sources below. The text and image source can be the same file name, don't use the image title when citing the image source, only use the file name as mentioned If you cannot answer using the sources below, say you don't know. Return just the answer without any input texts \"}", - "{'role': 'user', 'content': [{'text': 'Are interest rates high?', 'type': 'text'}, {'text': 'Financial Market Analysis Report 2023-6.png: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions ', 'type': 'text'}, {'image_url': {'url': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==', 'detail': 'auto'}, 'type': 'image_url'}]}" + { + "content": "You are an intelligent assistant helping analyze the Annual Financial Report of Contoso Ltd., The documents contain text, graphs, tables and images. Each image source has the file name in the top left corner of the image with coordinates (10,10) pixels and is in the format SourceFileName: Each text source starts in a new line and has the file name followed by colon and the actual information Always include the source name from the image or text for each fact you use in the response in the format: [filename] Answer the following question using only the data provided in the sources below. The text and image source can be the same file name, don't use the image title when citing the image source, only use the file name as mentioned If you cannot answer using the sources below, say you don't know. Return just the answer without any input texts ", + "role": "system" + }, + { + "content": [ + { + "text": "Are interest rates high?", + "type": "text" + }, + { + "text": "Financial Market Analysis Report 2023-6.png: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions ", + "type": "text" + }, + { + "image_url": { + "detail": "auto", + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==" + }, + "type": "image_url" + } + ], + "role": "user" + } ], "props": { "model": "gpt-4" diff --git a/tests/snapshots/test_app/test_chat_followup/client0/result.json b/tests/snapshots/test_app/test_chat_followup/client0/result.json index d9bbc2ec24..f54fe54b15 100644 --- a/tests/snapshots/test_app/test_chat_followup/client0/result.json +++ b/tests/snapshots/test_app/test_chat_followup/client0/result.json @@ -11,12 +11,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -63,8 +81,14 @@ }, { "description": [ - "{'role': 'system', 'content': 'Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn\\'t enough information below, say you don\\'t know. Do not generate answers that don\\'t use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don\\'t combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n Generate 3 very brief follow-up questions that the user would likely ask next.\\n Enclose the follow-up questions in double angle brackets. Example:\\n <>\\n <>\\n <>\\n Do no repeat questions that have already been asked.\\n Make sure the last question ends with \">>\".\\n \\n \\n '}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n Generate 3 very brief follow-up questions that the user would likely ask next.\n Enclose the follow-up questions in double angle brackets. Example:\n <>\n <>\n <>\n Do no repeat questions that have already been asked.\n Make sure the last question ends with \">>\".\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_followup/client1/result.json b/tests/snapshots/test_app/test_chat_followup/client1/result.json index b1d63f4ef5..77d77dcdc0 100644 --- a/tests/snapshots/test_app/test_chat_followup/client1/result.json +++ b/tests/snapshots/test_app/test_chat_followup/client1/result.json @@ -11,12 +11,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -64,8 +82,14 @@ }, { "description": [ - "{'role': 'system', 'content': 'Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn\\'t enough information below, say you don\\'t know. Do not generate answers that don\\'t use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don\\'t combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n Generate 3 very brief follow-up questions that the user would likely ask next.\\n Enclose the follow-up questions in double angle brackets. Example:\\n <>\\n <>\\n <>\\n Do no repeat questions that have already been asked.\\n Make sure the last question ends with \">>\".\\n \\n \\n '}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n Generate 3 very brief follow-up questions that the user would likely ask next.\n Enclose the follow-up questions in double angle brackets. Example:\n <>\n <>\n <>\n Do no repeat questions that have already been asked.\n Make sure the last question ends with \">>\".\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_hybrid/client0/result.json b/tests/snapshots/test_app/test_chat_hybrid/client0/result.json index e9229ca968..92c4500159 100644 --- a/tests/snapshots/test_app/test_chat_hybrid/client0/result.json +++ b/tests/snapshots/test_app/test_chat_hybrid/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_hybrid/client1/result.json b/tests/snapshots/test_app/test_chat_hybrid/client1/result.json index 1c71f358eb..e29c933c0f 100644 --- a/tests/snapshots/test_app/test_chat_hybrid/client1/result.json +++ b/tests/snapshots/test_app/test_chat_hybrid/client1/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client0/result.json b/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client0/result.json index edcacafce5..ecb1ec8a9a 100644 --- a/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client0/result.json +++ b/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: Caption: A whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: Caption: A whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client1/result.json b/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client1/result.json index 2b081d2978..276fb50068 100644 --- a/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client1/result.json +++ b/tests/snapshots/test_app/test_chat_hybrid_semantic_captions/client1/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: Caption: A whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: Caption: A whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client0/result.json b/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client0/result.json index bd325f34ee..dbe56f1452 100644 --- a/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client0/result.json +++ b/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client1/result.json b/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client1/result.json index 7b7a061b65..ac5fc33cb3 100644 --- a/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client1/result.json +++ b/tests/snapshots/test_app/test_chat_hybrid_semantic_ranker/client1/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_prompt_template/client0/result.json b/tests/snapshots/test_app/test_chat_prompt_template/client0/result.json index 48bc451ec8..1936bb9b48 100644 --- a/tests/snapshots/test_app/test_chat_prompt_template/client0/result.json +++ b/tests/snapshots/test_app/test_chat_prompt_template/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': 'You are a cat.'}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "You are a cat.", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_prompt_template/client1/result.json b/tests/snapshots/test_app/test_chat_prompt_template/client1/result.json index 2d1d0cb14e..d9a45967ac 100644 --- a/tests/snapshots/test_app/test_chat_prompt_template/client1/result.json +++ b/tests/snapshots/test_app/test_chat_prompt_template/client1/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': 'You are a cat.'}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "You are a cat.", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_prompt_template_concat/client0/result.json b/tests/snapshots/test_app/test_chat_prompt_template_concat/client0/result.json index 9719d58e92..9c559d6ee6 100644 --- a/tests/snapshots/test_app/test_chat_prompt_template_concat/client0/result.json +++ b/tests/snapshots/test_app/test_chat_prompt_template_concat/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n Meow like a cat.\\n\\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n Meow like a cat.\n\n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_prompt_template_concat/client1/result.json b/tests/snapshots/test_app/test_chat_prompt_template_concat/client1/result.json index 0c84027415..942b517d31 100644 --- a/tests/snapshots/test_app/test_chat_prompt_template_concat/client1/result.json +++ b/tests/snapshots/test_app/test_chat_prompt_template_concat/client1/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n Meow like a cat.\\n\\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n Meow like a cat.\n\n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_seed/client0/result.json b/tests/snapshots/test_app/test_chat_seed/client0/result.json index e9229ca968..92c4500159 100644 --- a/tests/snapshots/test_app/test_chat_seed/client0/result.json +++ b/tests/snapshots/test_app/test_chat_seed/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_seed/client1/result.json b/tests/snapshots/test_app/test_chat_seed/client1/result.json index 1c71f358eb..e29c933c0f 100644 --- a/tests/snapshots/test_app/test_chat_seed/client1/result.json +++ b/tests/snapshots/test_app/test_chat_seed/client1/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_session_state_persists/client0/result.json b/tests/snapshots/test_app/test_chat_session_state_persists/client0/result.json index 2869a8b0f7..0fe1cb6f19 100644 --- a/tests/snapshots/test_app/test_chat_session_state_persists/client0/result.json +++ b/tests/snapshots/test_app/test_chat_session_state_persists/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_session_state_persists/client1/result.json b/tests/snapshots/test_app/test_chat_session_state_persists/client1/result.json index 9dc0440529..9d6149dedb 100644 --- a/tests/snapshots/test_app/test_chat_session_state_persists/client1/result.json +++ b/tests/snapshots/test_app/test_chat_session_state_persists/client1/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_stream_followup/client0/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_followup/client0/result.jsonlines index be02f9a2e1..6a7b95a5d7 100644 --- a/tests/snapshots/test_app/test_chat_stream_followup/client0/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_followup/client0/result.jsonlines @@ -1,4 +1,4 @@ -{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": true, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': 'Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn\\'t enough information below, say you don\\'t know. Do not generate answers that don\\'t use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don\\'t combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n Generate 3 very brief follow-up questions that the user would likely ask next.\\n Enclose the follow-up questions in double angle brackets. Example:\\n <>\\n <>\\n <>\\n Do no repeat questions that have already been asked.\\n Make sure the last question ends with \">>\".\\n \\n \\n '}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo"}}]}, "session_state": null} +{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": [{"role": "system", "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n "}, {"role": "user", "content": "How did crypto do last year?"}, {"role": "assistant", "content": "Summarize Cryptocurrency Market Dynamics from last year"}, {"role": "user", "content": "What are my health plans?"}, {"role": "assistant", "content": "Show available health plans"}, {"role": "user", "content": "Generate search query for: What is the capital of France?"}], "props": {"model": "gpt-35-turbo"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": true, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": [{"role": "system", "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n Generate 3 very brief follow-up questions that the user would likely ask next.\n Enclose the follow-up questions in double angle brackets. Example:\n <>\n <>\n <>\n Do no repeat questions that have already been asked.\n Make sure the last question ends with \">>\".\n \n \n "}, {"role": "user", "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy."}], "props": {"model": "gpt-35-turbo"}}]}, "session_state": null} {"delta": {"content": null, "role": "assistant"}} {"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf]. ", "role": "assistant"}} {"delta": {"role": "assistant"}, "context": {"followup_questions": ["What is the capital of Spain?"]}} diff --git a/tests/snapshots/test_app/test_chat_stream_followup/client1/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_followup/client1/result.jsonlines index c217a02561..b894a2ea6b 100644 --- a/tests/snapshots/test_app/test_chat_stream_followup/client1/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_followup/client1/result.jsonlines @@ -1,4 +1,4 @@ -{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": true, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': 'Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn\\'t enough information below, say you don\\'t know. Do not generate answers that don\\'t use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don\\'t combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n Generate 3 very brief follow-up questions that the user would likely ask next.\\n Enclose the follow-up questions in double angle brackets. Example:\\n <>\\n <>\\n <>\\n Do no repeat questions that have already been asked.\\n Make sure the last question ends with \">>\".\\n \\n \\n '}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}]}, "session_state": null} +{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": [{"role": "system", "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n "}, {"role": "user", "content": "How did crypto do last year?"}, {"role": "assistant", "content": "Summarize Cryptocurrency Market Dynamics from last year"}, {"role": "user", "content": "What are my health plans?"}, {"role": "assistant", "content": "Show available health plans"}, {"role": "user", "content": "Generate search query for: What is the capital of France?"}], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": true, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": [{"role": "system", "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n Generate 3 very brief follow-up questions that the user would likely ask next.\n Enclose the follow-up questions in double angle brackets. Example:\n <>\n <>\n <>\n Do no repeat questions that have already been asked.\n Make sure the last question ends with \">>\".\n \n \n "}, {"role": "user", "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy."}], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}]}, "session_state": null} {"delta": {"content": null, "role": "assistant"}} {"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf]. ", "role": "assistant"}} {"delta": {"role": "assistant"}, "context": {"followup_questions": ["What is the capital of Spain?"]}} diff --git a/tests/snapshots/test_app/test_chat_stream_session_state_persists/client0/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_session_state_persists/client0/result.jsonlines index c41cb0d531..f3286e8289 100644 --- a/tests/snapshots/test_app/test_chat_stream_session_state_persists/client0/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_session_state_persists/client0/result.jsonlines @@ -1,3 +1,3 @@ -{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo"}}]}, "session_state": {"conversation_id": 1234}} +{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": [{"role": "system", "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n "}, {"role": "user", "content": "How did crypto do last year?"}, {"role": "assistant", "content": "Summarize Cryptocurrency Market Dynamics from last year"}, {"role": "user", "content": "What are my health plans?"}, {"role": "assistant", "content": "Show available health plans"}, {"role": "user", "content": "Generate search query for: What is the capital of France?"}], "props": {"model": "gpt-35-turbo"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": [{"role": "system", "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n "}, {"role": "user", "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy."}], "props": {"model": "gpt-35-turbo"}}]}, "session_state": {"conversation_id": 1234}} {"delta": {"content": null, "role": "assistant"}} {"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_stream_session_state_persists/client1/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_session_state_persists/client1/result.jsonlines index e24dffb978..7d4c60cddb 100644 --- a/tests/snapshots/test_app/test_chat_stream_session_state_persists/client1/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_session_state_persists/client1/result.jsonlines @@ -1,3 +1,3 @@ -{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}]}, "session_state": {"conversation_id": 1234}} +{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": [{"role": "system", "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n "}, {"role": "user", "content": "How did crypto do last year?"}, {"role": "assistant", "content": "Summarize Cryptocurrency Market Dynamics from last year"}, {"role": "user", "content": "What are my health plans?"}, {"role": "assistant", "content": "Show available health plans"}, {"role": "user", "content": "Generate search query for: What is the capital of France?"}], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": [{"role": "system", "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n "}, {"role": "user", "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy."}], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}]}, "session_state": {"conversation_id": 1234}} {"delta": {"content": null, "role": "assistant"}} {"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_stream_text/client0/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_text/client0/result.jsonlines index e54cca5d42..4fd9c89494 100644 --- a/tests/snapshots/test_app/test_chat_stream_text/client0/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_text/client0/result.jsonlines @@ -1,3 +1,3 @@ -{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo"}}]}, "session_state": null} +{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": [{"role": "system", "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n "}, {"role": "user", "content": "How did crypto do last year?"}, {"role": "assistant", "content": "Summarize Cryptocurrency Market Dynamics from last year"}, {"role": "user", "content": "What are my health plans?"}, {"role": "assistant", "content": "Show available health plans"}, {"role": "user", "content": "Generate search query for: What is the capital of France?"}], "props": {"model": "gpt-35-turbo"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": [{"role": "system", "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n "}, {"role": "user", "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy."}], "props": {"model": "gpt-35-turbo"}}]}, "session_state": null} {"delta": {"content": null, "role": "assistant"}} {"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_stream_text/client1/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_text/client1/result.jsonlines index 0565ac3042..46afaf35a3 100644 --- a/tests/snapshots/test_app/test_chat_stream_text/client1/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_text/client1/result.jsonlines @@ -1,3 +1,3 @@ -{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}]}, "session_state": null} +{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": [{"role": "system", "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n "}, {"role": "user", "content": "How did crypto do last year?"}, {"role": "assistant", "content": "Summarize Cryptocurrency Market Dynamics from last year"}, {"role": "user", "content": "What are my health plans?"}, {"role": "assistant", "content": "Show available health plans"}, {"role": "user", "content": "Generate search query for: What is the capital of France?"}], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": [{"role": "system", "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n "}, {"role": "user", "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy."}], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}]}, "session_state": null} {"delta": {"content": null, "role": "assistant"}} {"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_stream_text_filter/auth_client0/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_text_filter/auth_client0/result.jsonlines index 4c3d5da37a..2b34548d52 100644 --- a/tests/snapshots/test_app/test_chat_stream_text_filter/auth_client0/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_text_filter/auth_client0/result.jsonlines @@ -1,3 +1,3 @@ -{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": "category ne 'excluded' and (oids/any(g:search.in(g, 'OID_X')) or groups/any(g:search.in(g, 'GROUP_Y, GROUP_Z')))", "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}]}, "session_state": null} +{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Benefit_Options-2.pdf: There is a whistleblower policy."]}, "thoughts": [{"title": "Prompt to generate search query", "description": [{"role": "system", "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n "}, {"role": "user", "content": "How did crypto do last year?"}, {"role": "assistant", "content": "Summarize Cryptocurrency Market Dynamics from last year"}, {"role": "user", "content": "What are my health plans?"}, {"role": "assistant", "content": "Show available health plans"}, {"role": "user", "content": "Generate search query for: What is the capital of France?"}], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "capital of France", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": "category ne 'excluded' and (oids/any(g:search.in(g, 'OID_X')) or groups/any(g:search.in(g, 'GROUP_Y, GROUP_Z')))", "use_vector_search": false, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Benefit_Options_pdf-42656E656669745F4F7074696F6E732E706466-page-2", "content": "There is a whistleblower policy.", "embedding": null, "imageEmbedding": null, "category": null, "sourcepage": "Benefit_Options-2.pdf", "sourcefile": "Benefit_Options.pdf", "oids": null, "groups": null, "captions": [{"additional_properties": {}, "text": "Caption: A whistleblower policy.", "highlights": []}], "score": 0.03279569745063782, "reranker_score": 3.4577205181121826}], "props": null}, {"title": "Prompt to generate answer", "description": [{"role": "system", "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n "}, {"role": "user", "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy."}], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}]}, "session_state": null} {"delta": {"content": null, "role": "assistant"}} {"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_stream_vision/client0/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_vision/client0/result.jsonlines index 0a89142a28..b9a6b9e5c5 100644 --- a/tests/snapshots/test_app/test_chat_stream_vision/client0/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_vision/client0/result.jsonlines @@ -1,3 +1,3 @@ -{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Financial Market Analysis Report 2023.pdf#page=6: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions "]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: Are interest rates high?'}"], "props": {"model": "gpt-35-turbo"}}, {"title": "Search using generated search query", "description": "interest rates", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": true, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Financial_Market_Analysis_Report_2023_pdf-46696E616E6369616C204D61726B657420416E616C79736973205265706F727420323032332E706466-page-14", "content": "31\nFinancial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors\nImpact of Interest Rates, Inflation, and GDP Growth on Financial Markets\n5\n4\n3\n2\n1\n0\n-1 2018 2019\n-2\n-3\n-4\n-5\n2020\n2021 2022 2023\nMacroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance.\n-Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends\nRelative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100)\n2028\nBased on historical data, current trends, and economic indicators, this section presents predictions ", "embedding": "[-0.012668486, -0.02251158 ...+8 more]", "imageEmbedding": null, "category": null, "sourcepage": "Financial Market Analysis Report 2023-6.png", "sourcefile": "Financial Market Analysis Report 2023.pdf", "oids": null, "groups": null, "captions": [], "score": 0.04972677677869797, "reranker_score": 3.1704962253570557}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", "{'role': 'user', 'content': 'Are interest rates high?\\n\\nSources:\\nFinancial Market Analysis Report 2023.pdf#page=6: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions '}"], "props": {"model": "gpt-35-turbo"}}]}, "session_state": null} +{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Financial Market Analysis Report 2023.pdf#page=6: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions "]}, "thoughts": [{"title": "Prompt to generate search query", "description": [{"role": "system", "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n "}, {"role": "user", "content": "How did crypto do last year?"}, {"role": "assistant", "content": "Summarize Cryptocurrency Market Dynamics from last year"}, {"role": "user", "content": "What are my health plans?"}, {"role": "assistant", "content": "Show available health plans"}, {"role": "user", "content": "Generate search query for: Are interest rates high?"}], "props": {"model": "gpt-35-turbo"}}, {"title": "Search using generated search query", "description": "interest rates", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "use_vector_search": true, "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Financial_Market_Analysis_Report_2023_pdf-46696E616E6369616C204D61726B657420416E616C79736973205265706F727420323032332E706466-page-14", "content": "31\nFinancial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors\nImpact of Interest Rates, Inflation, and GDP Growth on Financial Markets\n5\n4\n3\n2\n1\n0\n-1 2018 2019\n-2\n-3\n-4\n-5\n2020\n2021 2022 2023\nMacroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance.\n-Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends\nRelative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100)\n2028\nBased on historical data, current trends, and economic indicators, this section presents predictions ", "embedding": "[-0.012668486, -0.02251158 ...+8 more]", "imageEmbedding": null, "category": null, "sourcepage": "Financial Market Analysis Report 2023-6.png", "sourcefile": "Financial Market Analysis Report 2023.pdf", "oids": null, "groups": null, "captions": [], "score": 0.04972677677869797, "reranker_score": 3.1704962253570557}], "props": null}, {"title": "Prompt to generate answer", "description": [{"role": "system", "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n "}, {"role": "user", "content": "Are interest rates high?\n\nSources:\nFinancial Market Analysis Report 2023.pdf#page=6: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions "}], "props": {"model": "gpt-35-turbo"}}]}, "session_state": null} {"delta": {"content": null, "role": "assistant"}} {"delta": {"content": "The capital of France is Paris. [Benefit_Options-2.pdf].", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_stream_vision/client1/result.jsonlines b/tests/snapshots/test_app/test_chat_stream_vision/client1/result.jsonlines index 8f6b071e62..bd4866a51b 100644 --- a/tests/snapshots/test_app/test_chat_stream_vision/client1/result.jsonlines +++ b/tests/snapshots/test_app/test_chat_stream_vision/client1/result.jsonlines @@ -1,3 +1,3 @@ -{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Financial Market Analysis Report 2023-6.png: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions "], "images": [{"url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==", "detail": "auto"}]}, "thoughts": [{"title": "Prompt to generate search query", "description": ["{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", "{'role': 'user', 'content': 'How did crypto do last year?'}", "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", "{'role': 'user', 'content': 'What are my health plans?'}", "{'role': 'assistant', 'content': 'Show available health plans'}", "{'role': 'user', 'content': 'Generate search query for: Are interest rates high?'}"], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "interest rates", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "vector_fields": ["embedding", "imageEmbedding"], "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Financial_Market_Analysis_Report_2023_pdf-46696E616E6369616C204D61726B657420416E616C79736973205265706F727420323032332E706466-page-14", "content": "31\nFinancial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors\nImpact of Interest Rates, Inflation, and GDP Growth on Financial Markets\n5\n4\n3\n2\n1\n0\n-1 2018 2019\n-2\n-3\n-4\n-5\n2020\n2021 2022 2023\nMacroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance.\n-Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends\nRelative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100)\n2028\nBased on historical data, current trends, and economic indicators, this section presents predictions ", "embedding": "[-0.012668486, -0.02251158 ...+8 more]", "imageEmbedding": null, "category": null, "sourcepage": "Financial Market Analysis Report 2023-6.png", "sourcefile": "Financial Market Analysis Report 2023.pdf", "oids": null, "groups": null, "captions": [], "score": 0.04972677677869797, "reranker_score": 3.1704962253570557}], "props": null}, {"title": "Prompt to generate answer", "description": ["{'role': 'system', 'content': \"\\n You are an intelligent assistant helping analyze the Annual Financial Report of Contoso Ltd., The documents contain text, graphs, tables and images.\\n Each image source has the file name in the top left corner of the image with coordinates (10,10) pixels and is in the format SourceFileName:\\n Each text source starts in a new line and has the file name followed by colon and the actual information\\n Always include the source name from the image or text for each fact you use in the response in the format: [filename]\\n Answer the following question using only the data provided in the sources below.\\n If asking a clarifying question to the user would help, ask the question.\\n Be brief in your answers.\\n The text and image source can be the same file name, don't use the image title when citing the image source, only use the file name as mentioned\\n If you cannot answer using the sources below, say you don't know. Return just the answer without any input texts.\\n \\n \\n \"}", "{'role': 'user', 'content': [{'text': 'Are interest rates high?', 'type': 'text'}, {'text': '\\n\\nSources:\\nFinancial Market Analysis Report 2023-6.png: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions ', 'type': 'text'}, {'image_url': {'url': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==', 'detail': 'auto'}, 'type': 'image_url'}]}"], "props": {"model": "gpt-4"}}]}, "session_state": null} +{"delta": {"role": "assistant"}, "context": {"data_points": {"text": ["Financial Market Analysis Report 2023-6.png: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions "], "images": [{"url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==", "detail": "auto"}]}, "thoughts": [{"title": "Prompt to generate search query", "description": [{"role": "system", "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n "}, {"role": "user", "content": "How did crypto do last year?"}, {"role": "assistant", "content": "Summarize Cryptocurrency Market Dynamics from last year"}, {"role": "user", "content": "What are my health plans?"}, {"role": "assistant", "content": "Show available health plans"}, {"role": "user", "content": "Generate search query for: Are interest rates high?"}], "props": {"model": "gpt-35-turbo", "deployment": "test-chatgpt"}}, {"title": "Search using generated search query", "description": "interest rates", "props": {"use_semantic_captions": false, "use_semantic_ranker": false, "top": 3, "filter": null, "vector_fields": ["embedding", "imageEmbedding"], "use_text_search": true}}, {"title": "Search results", "description": [{"id": "file-Financial_Market_Analysis_Report_2023_pdf-46696E616E6369616C204D61726B657420416E616C79736973205265706F727420323032332E706466-page-14", "content": "31\nFinancial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors\nImpact of Interest Rates, Inflation, and GDP Growth on Financial Markets\n5\n4\n3\n2\n1\n0\n-1 2018 2019\n-2\n-3\n-4\n-5\n2020\n2021 2022 2023\nMacroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance.\n-Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends\nRelative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100)\n2028\nBased on historical data, current trends, and economic indicators, this section presents predictions ", "embedding": "[-0.012668486, -0.02251158 ...+8 more]", "imageEmbedding": null, "category": null, "sourcepage": "Financial Market Analysis Report 2023-6.png", "sourcefile": "Financial Market Analysis Report 2023.pdf", "oids": null, "groups": null, "captions": [], "score": 0.04972677677869797, "reranker_score": 3.1704962253570557}], "props": null}, {"title": "Prompt to generate answer", "description": [{"role": "system", "content": "\n You are an intelligent assistant helping analyze the Annual Financial Report of Contoso Ltd., The documents contain text, graphs, tables and images.\n Each image source has the file name in the top left corner of the image with coordinates (10,10) pixels and is in the format SourceFileName:\n Each text source starts in a new line and has the file name followed by colon and the actual information\n Always include the source name from the image or text for each fact you use in the response in the format: [filename]\n Answer the following question using only the data provided in the sources below.\n If asking a clarifying question to the user would help, ask the question.\n Be brief in your answers.\n The text and image source can be the same file name, don't use the image title when citing the image source, only use the file name as mentioned\n If you cannot answer using the sources below, say you don't know. Return just the answer without any input texts.\n \n \n "}, {"role": "user", "content": [{"text": "Are interest rates high?", "type": "text"}, {"text": "\n\nSources:\nFinancial Market Analysis Report 2023-6.png: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions ", "type": "text"}, {"image_url": {"url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==", "detail": "auto"}, "type": "image_url"}]}], "props": {"model": "gpt-4"}}]}, "session_state": null} {"delta": {"content": null, "role": "assistant"}} {"delta": {"content": "From the provided sources, the impact of interest rates and GDP growth on financial markets can be observed through the line graph. [Financial Market Analysis Report 2023-7.png]", "role": null}} diff --git a/tests/snapshots/test_app/test_chat_text/client0/result.json b/tests/snapshots/test_app/test_chat_text/client0/result.json index 7930eaa2b3..ab2e7668b6 100644 --- a/tests/snapshots/test_app/test_chat_text/client0/result.json +++ b/tests/snapshots/test_app/test_chat_text/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_text/client1/result.json b/tests/snapshots/test_app/test_chat_text/client1/result.json index ed0443ed59..c5b8b27424 100644 --- a/tests/snapshots/test_app/test_chat_text/client1/result.json +++ b/tests/snapshots/test_app/test_chat_text/client1/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_text_filter/auth_client0/result.json b/tests/snapshots/test_app/test_chat_text_filter/auth_client0/result.json index 6b8dddab65..d29eb3d05a 100644 --- a/tests/snapshots/test_app/test_chat_text_filter/auth_client0/result.json +++ b/tests/snapshots/test_app/test_chat_text_filter/auth_client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_text_filter_public_documents/auth_public_documents_client0/result.json b/tests/snapshots/test_app/test_chat_text_filter_public_documents/auth_public_documents_client0/result.json index a370d8b100..bb67fe067b 100644 --- a/tests/snapshots/test_app/test_chat_text_filter_public_documents/auth_public_documents_client0/result.json +++ b/tests/snapshots/test_app/test_chat_text_filter_public_documents/auth_public_documents_client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_text_semantic_ranker/client0/result.json b/tests/snapshots/test_app/test_chat_text_semantic_ranker/client0/result.json index 048cdfced9..0562d723c7 100644 --- a/tests/snapshots/test_app/test_chat_text_semantic_ranker/client0/result.json +++ b/tests/snapshots/test_app/test_chat_text_semantic_ranker/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_text_semantic_ranker/client1/result.json b/tests/snapshots/test_app/test_chat_text_semantic_ranker/client1/result.json index dc552a4a15..f86a9c4467 100644 --- a/tests/snapshots/test_app/test_chat_text_semantic_ranker/client1/result.json +++ b/tests/snapshots/test_app/test_chat_text_semantic_ranker/client1/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_text_semanticcaptions/client0/result.json b/tests/snapshots/test_app/test_chat_text_semanticcaptions/client0/result.json index ea323e5211..d9562e71b6 100644 --- a/tests/snapshots/test_app/test_chat_text_semanticcaptions/client0/result.json +++ b/tests/snapshots/test_app/test_chat_text_semanticcaptions/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: Caption: A whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: Caption: A whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_text_semanticcaptions/client1/result.json b/tests/snapshots/test_app/test_chat_text_semanticcaptions/client1/result.json index e699855705..71a5586c8d 100644 --- a/tests/snapshots/test_app/test_chat_text_semanticcaptions/client1/result.json +++ b/tests/snapshots/test_app/test_chat_text_semanticcaptions/client1/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: Caption: A whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: Caption: A whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_text_semanticranker/client0/result.json b/tests/snapshots/test_app/test_chat_text_semanticranker/client0/result.json index 048cdfced9..0562d723c7 100644 --- a/tests/snapshots/test_app/test_chat_text_semanticranker/client0/result.json +++ b/tests/snapshots/test_app/test_chat_text_semanticranker/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_text_semanticranker/client1/result.json b/tests/snapshots/test_app/test_chat_text_semanticranker/client1/result.json index dc552a4a15..f86a9c4467 100644 --- a/tests/snapshots/test_app/test_chat_text_semanticranker/client1/result.json +++ b/tests/snapshots/test_app/test_chat_text_semanticranker/client1/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_vector/client0/result.json b/tests/snapshots/test_app/test_chat_vector/client0/result.json index 98ed58f4ea..bca2bf5eca 100644 --- a/tests/snapshots/test_app/test_chat_vector/client0/result.json +++ b/tests/snapshots/test_app/test_chat_vector/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_vector/client1/result.json b/tests/snapshots/test_app/test_chat_vector/client1/result.json index 4a8b36c9ff..4ede77e2bc 100644 --- a/tests/snapshots/test_app/test_chat_vector/client1/result.json +++ b/tests/snapshots/test_app/test_chat_vector/client1/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client0/result.json b/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client0/result.json index 81d15493f2..75a7a1ffce 100644 --- a/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client0/result.json +++ b/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client1/result.json b/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client1/result.json index 595d878a30..946d53c514 100644 --- a/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client1/result.json +++ b/tests/snapshots/test_app/test_chat_vector_semantic_ranker/client1/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: What is the capital of France?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: What is the capital of France?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -61,8 +79,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What is the capital of France?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What is the capital of France?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_vision/client0/result.json b/tests/snapshots/test_app/test_chat_vision/client0/result.json index d62eaa08d3..f9d035f5d2 100644 --- a/tests/snapshots/test_app/test_chat_vision/client0/result.json +++ b/tests/snapshots/test_app/test_chat_vision/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: Are interest rates high?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: Are interest rates high?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -54,8 +72,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'Are interest rates high?\\n\\nSources:\\nFinancial Market Analysis Report 2023.pdf#page=6: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions '}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "Are interest rates high?\n\nSources:\nFinancial Market Analysis Report 2023.pdf#page=6: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions ", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_vision/client1/result.json b/tests/snapshots/test_app/test_chat_vision/client1/result.json index abe98c8624..1733837125 100644 --- a/tests/snapshots/test_app/test_chat_vision/client1/result.json +++ b/tests/snapshots/test_app/test_chat_vision/client1/result.json @@ -14,12 +14,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: Are interest rates high?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: Are interest rates high?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -64,8 +82,30 @@ }, { "description": [ - "{'role': 'system', 'content': \"\\n You are an intelligent assistant helping analyze the Annual Financial Report of Contoso Ltd., The documents contain text, graphs, tables and images.\\n Each image source has the file name in the top left corner of the image with coordinates (10,10) pixels and is in the format SourceFileName:\\n Each text source starts in a new line and has the file name followed by colon and the actual information\\n Always include the source name from the image or text for each fact you use in the response in the format: [filename]\\n Answer the following question using only the data provided in the sources below.\\n If asking a clarifying question to the user would help, ask the question.\\n Be brief in your answers.\\n The text and image source can be the same file name, don't use the image title when citing the image source, only use the file name as mentioned\\n If you cannot answer using the sources below, say you don't know. Return just the answer without any input texts.\\n \\n \\n \"}", - "{'role': 'user', 'content': [{'text': 'Are interest rates high?', 'type': 'text'}, {'text': '\\n\\nSources:\\nFinancial Market Analysis Report 2023-6.png: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions ', 'type': 'text'}, {'image_url': {'url': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==', 'detail': 'auto'}, 'type': 'image_url'}]}" + { + "content": "\n You are an intelligent assistant helping analyze the Annual Financial Report of Contoso Ltd., The documents contain text, graphs, tables and images.\n Each image source has the file name in the top left corner of the image with coordinates (10,10) pixels and is in the format SourceFileName:\n Each text source starts in a new line and has the file name followed by colon and the actual information\n Always include the source name from the image or text for each fact you use in the response in the format: [filename]\n Answer the following question using only the data provided in the sources below.\n If asking a clarifying question to the user would help, ask the question.\n Be brief in your answers.\n The text and image source can be the same file name, don't use the image title when citing the image source, only use the file name as mentioned\n If you cannot answer using the sources below, say you don't know. Return just the answer without any input texts.\n \n \n ", + "role": "system" + }, + { + "content": [ + { + "text": "Are interest rates high?", + "type": "text" + }, + { + "text": "\n\nSources:\nFinancial Market Analysis Report 2023-6.png: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions ", + "type": "text" + }, + { + "image_url": { + "detail": "auto", + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==" + }, + "type": "image_url" + } + ], + "role": "user" + } ], "props": { "model": "gpt-4" diff --git a/tests/snapshots/test_app/test_chat_vision_vectors/client0/result.json b/tests/snapshots/test_app/test_chat_vision_vectors/client0/result.json index deddc38805..67e182c310 100644 --- a/tests/snapshots/test_app/test_chat_vision_vectors/client0/result.json +++ b/tests/snapshots/test_app/test_chat_vision_vectors/client0/result.json @@ -8,12 +8,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: Are interest rates high?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: Are interest rates high?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -60,8 +78,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'Are interest rates high?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "Are interest rates high?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_vision_vectors/client1/result.json b/tests/snapshots/test_app/test_chat_vision_vectors/client1/result.json index 70cbed1f00..507be8e3f9 100644 --- a/tests/snapshots/test_app/test_chat_vision_vectors/client1/result.json +++ b/tests/snapshots/test_app/test_chat_vision_vectors/client1/result.json @@ -14,12 +14,30 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Generate search query for: Are interest rates high?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Generate search query for: Are interest rates high?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -64,8 +82,30 @@ }, { "description": [ - "{'role': 'system', 'content': \"\\n You are an intelligent assistant helping analyze the Annual Financial Report of Contoso Ltd., The documents contain text, graphs, tables and images.\\n Each image source has the file name in the top left corner of the image with coordinates (10,10) pixels and is in the format SourceFileName:\\n Each text source starts in a new line and has the file name followed by colon and the actual information\\n Always include the source name from the image or text for each fact you use in the response in the format: [filename]\\n Answer the following question using only the data provided in the sources below.\\n If asking a clarifying question to the user would help, ask the question.\\n Be brief in your answers.\\n The text and image source can be the same file name, don't use the image title when citing the image source, only use the file name as mentioned\\n If you cannot answer using the sources below, say you don't know. Return just the answer without any input texts.\\n \\n \\n \"}", - "{'role': 'user', 'content': [{'text': 'Are interest rates high?', 'type': 'text'}, {'text': '\\n\\nSources:\\nFinancial Market Analysis Report 2023-6.png: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions ', 'type': 'text'}, {'image_url': {'url': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==', 'detail': 'auto'}, 'type': 'image_url'}]}" + { + "content": "\n You are an intelligent assistant helping analyze the Annual Financial Report of Contoso Ltd., The documents contain text, graphs, tables and images.\n Each image source has the file name in the top left corner of the image with coordinates (10,10) pixels and is in the format SourceFileName:\n Each text source starts in a new line and has the file name followed by colon and the actual information\n Always include the source name from the image or text for each fact you use in the response in the format: [filename]\n Answer the following question using only the data provided in the sources below.\n If asking a clarifying question to the user would help, ask the question.\n Be brief in your answers.\n The text and image source can be the same file name, don't use the image title when citing the image source, only use the file name as mentioned\n If you cannot answer using the sources below, say you don't know. Return just the answer without any input texts.\n \n \n ", + "role": "system" + }, + { + "content": [ + { + "text": "Are interest rates high?", + "type": "text" + }, + { + "text": "\n\nSources:\nFinancial Market Analysis Report 2023-6.png: 31 Financial markets are interconnected, with movements in one segment often influencing others. This section examines the correlations between stock indices, cryptocurrency prices, and commodity prices, revealing how changes in one market can have ripple effects across the financial ecosystem.Impact of Macroeconomic Factors Impact of Interest Rates, Inflation, and GDP Growth on Financial Markets 5 4 3 2 1 0 -1 2018 2019 -2 -3 -4 -5 2020 2021 2022 2023 Macroeconomic factors such as interest rates, inflation, and GDP growth play a pivotal role in shaping financial markets. This section analyzes how these factors have influenced stock, cryptocurrency, and commodity markets over recent years, providing insights into the complex relationship between the economy and financial market performance. -Interest Rates % -Inflation Data % GDP Growth % :unselected: :unselected:Future Predictions and Trends Relative Growth Trends for S&P 500, Bitcoin, and Oil Prices (2024 Indexed to 100) 2028 Based on historical data, current trends, and economic indicators, this section presents predictions ", + "type": "text" + }, + { + "image_url": { + "detail": "auto", + "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==" + }, + "type": "image_url" + } + ], + "role": "user" + } ], "props": { "model": "gpt-4" diff --git a/tests/snapshots/test_app/test_chat_with_history/client0/result.json b/tests/snapshots/test_app/test_chat_with_history/client0/result.json index ef89f5b6b3..5980c140bb 100644 --- a/tests/snapshots/test_app/test_chat_with_history/client0/result.json +++ b/tests/snapshots/test_app/test_chat_with_history/client0/result.json @@ -8,14 +8,38 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'What happens in a performance review?'}", - "{'role': 'assistant', 'content': \"During a performance review, employees will receive feedback on their performance over the past year, including both successes and areas for improvement. The feedback will be provided by the employee's supervisor and is intended to help the employee develop and grow in their role [employee_handbook-3.pdf]. The review is a two-way dialogue between the employee and their manager, so employees are encouraged to be honest and open during the process [employee_handbook-3.pdf]. The employee will also have the opportunity to discuss their goals and objectives for the upcoming year [employee_handbook-3.pdf]. A written summary of the performance review will be provided to the employee, which will include a rating of their performance, feedback, and goals and objectives for the upcoming year [employee_handbook-3.pdf].\"}", - "{'role': 'user', 'content': 'Generate search query for: Is dental covered?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "What happens in a performance review?", + "role": "user" + }, + { + "content": "During a performance review, employees will receive feedback on their performance over the past year, including both successes and areas for improvement. The feedback will be provided by the employee's supervisor and is intended to help the employee develop and grow in their role [employee_handbook-3.pdf]. The review is a two-way dialogue between the employee and their manager, so employees are encouraged to be honest and open during the process [employee_handbook-3.pdf]. The employee will also have the opportunity to discuss their goals and objectives for the upcoming year [employee_handbook-3.pdf]. A written summary of the performance review will be provided to the employee, which will include a rating of their performance, feedback, and goals and objectives for the upcoming year [employee_handbook-3.pdf].", + "role": "assistant" + }, + { + "content": "Generate search query for: Is dental covered?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -62,10 +86,22 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What happens in a performance review?'}", - "{'role': 'assistant', 'content': \"During a performance review, employees will receive feedback on their performance over the past year, including both successes and areas for improvement. The feedback will be provided by the employee's supervisor and is intended to help the employee develop and grow in their role [employee_handbook-3.pdf]. The review is a two-way dialogue between the employee and their manager, so employees are encouraged to be honest and open during the process [employee_handbook-3.pdf]. The employee will also have the opportunity to discuss their goals and objectives for the upcoming year [employee_handbook-3.pdf]. A written summary of the performance review will be provided to the employee, which will include a rating of their performance, feedback, and goals and objectives for the upcoming year [employee_handbook-3.pdf].\"}", - "{'role': 'user', 'content': 'Is dental covered?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What happens in a performance review?", + "role": "user" + }, + { + "content": "During a performance review, employees will receive feedback on their performance over the past year, including both successes and areas for improvement. The feedback will be provided by the employee's supervisor and is intended to help the employee develop and grow in their role [employee_handbook-3.pdf]. The review is a two-way dialogue between the employee and their manager, so employees are encouraged to be honest and open during the process [employee_handbook-3.pdf]. The employee will also have the opportunity to discuss their goals and objectives for the upcoming year [employee_handbook-3.pdf]. A written summary of the performance review will be provided to the employee, which will include a rating of their performance, feedback, and goals and objectives for the upcoming year [employee_handbook-3.pdf].", + "role": "assistant" + }, + { + "content": "Is dental covered?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_with_history/client1/result.json b/tests/snapshots/test_app/test_chat_with_history/client1/result.json index c89fd6c627..1bddfaac88 100644 --- a/tests/snapshots/test_app/test_chat_with_history/client1/result.json +++ b/tests/snapshots/test_app/test_chat_with_history/client1/result.json @@ -8,14 +8,38 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'What happens in a performance review?'}", - "{'role': 'assistant', 'content': \"During a performance review, employees will receive feedback on their performance over the past year, including both successes and areas for improvement. The feedback will be provided by the employee's supervisor and is intended to help the employee develop and grow in their role [employee_handbook-3.pdf]. The review is a two-way dialogue between the employee and their manager, so employees are encouraged to be honest and open during the process [employee_handbook-3.pdf]. The employee will also have the opportunity to discuss their goals and objectives for the upcoming year [employee_handbook-3.pdf]. A written summary of the performance review will be provided to the employee, which will include a rating of their performance, feedback, and goals and objectives for the upcoming year [employee_handbook-3.pdf].\"}", - "{'role': 'user', 'content': 'Generate search query for: Is dental covered?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "What happens in a performance review?", + "role": "user" + }, + { + "content": "During a performance review, employees will receive feedback on their performance over the past year, including both successes and areas for improvement. The feedback will be provided by the employee's supervisor and is intended to help the employee develop and grow in their role [employee_handbook-3.pdf]. The review is a two-way dialogue between the employee and their manager, so employees are encouraged to be honest and open during the process [employee_handbook-3.pdf]. The employee will also have the opportunity to discuss their goals and objectives for the upcoming year [employee_handbook-3.pdf]. A written summary of the performance review will be provided to the employee, which will include a rating of their performance, feedback, and goals and objectives for the upcoming year [employee_handbook-3.pdf].", + "role": "assistant" + }, + { + "content": "Generate search query for: Is dental covered?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -63,10 +87,22 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What happens in a performance review?'}", - "{'role': 'assistant', 'content': \"During a performance review, employees will receive feedback on their performance over the past year, including both successes and areas for improvement. The feedback will be provided by the employee's supervisor and is intended to help the employee develop and grow in their role [employee_handbook-3.pdf]. The review is a two-way dialogue between the employee and their manager, so employees are encouraged to be honest and open during the process [employee_handbook-3.pdf]. The employee will also have the opportunity to discuss their goals and objectives for the upcoming year [employee_handbook-3.pdf]. A written summary of the performance review will be provided to the employee, which will include a rating of their performance, feedback, and goals and objectives for the upcoming year [employee_handbook-3.pdf].\"}", - "{'role': 'user', 'content': 'Is dental covered?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What happens in a performance review?", + "role": "user" + }, + { + "content": "During a performance review, employees will receive feedback on their performance over the past year, including both successes and areas for improvement. The feedback will be provided by the employee's supervisor and is intended to help the employee develop and grow in their role [employee_handbook-3.pdf]. The review is a two-way dialogue between the employee and their manager, so employees are encouraged to be honest and open during the process [employee_handbook-3.pdf]. The employee will also have the opportunity to discuss their goals and objectives for the upcoming year [employee_handbook-3.pdf]. A written summary of the performance review will be provided to the employee, which will include a rating of their performance, feedback, and goals and objectives for the upcoming year [employee_handbook-3.pdf].", + "role": "assistant" + }, + { + "content": "Is dental covered?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/snapshots/test_app/test_chat_with_long_history/client0/result.json b/tests/snapshots/test_app/test_chat_with_long_history/client0/result.json index ddfa8008cd..bccc607425 100644 --- a/tests/snapshots/test_app/test_chat_with_long_history/client0/result.json +++ b/tests/snapshots/test_app/test_chat_with_long_history/client0/result.json @@ -8,14 +8,38 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Is there a dress code?'}", - "{'role': 'assistant', 'content': 'Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]'}", - "{'role': 'user', 'content': 'Generate search query for: What does a product manager do?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Is there a dress code?", + "role": "user" + }, + { + "content": "Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]", + "role": "assistant" + }, + { + "content": "Generate search query for: What does a product manager do?", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" @@ -62,8 +86,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What does a product manager do?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What does a product manager do?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "model": "gpt-35-turbo" diff --git a/tests/snapshots/test_app/test_chat_with_long_history/client1/result.json b/tests/snapshots/test_app/test_chat_with_long_history/client1/result.json index db554905d9..e329a92813 100644 --- a/tests/snapshots/test_app/test_chat_with_long_history/client1/result.json +++ b/tests/snapshots/test_app/test_chat_with_long_history/client1/result.json @@ -8,14 +8,38 @@ "thoughts": [ { "description": [ - "{'role': 'system', 'content': \"Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\\n You have access to Azure AI Search index with 100's of documents.\\n Generate a search query based on the conversation and the new question.\\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\\n Do not include any text inside [] or <<>> in the search query terms.\\n Do not include any special characters like '+'.\\n If the question is not in English, translate the question to English before generating the search query.\\n If you cannot generate a search query, return just the number 0.\\n \"}", - "{'role': 'user', 'content': 'How did crypto do last year?'}", - "{'role': 'assistant', 'content': 'Summarize Cryptocurrency Market Dynamics from last year'}", - "{'role': 'user', 'content': 'What are my health plans?'}", - "{'role': 'assistant', 'content': 'Show available health plans'}", - "{'role': 'user', 'content': 'Is there a dress code?'}", - "{'role': 'assistant', 'content': 'Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]'}", - "{'role': 'user', 'content': 'Generate search query for: What does a product manager do?'}" + { + "content": "Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base.\n You have access to Azure AI Search index with 100's of documents.\n Generate a search query based on the conversation and the new question.\n Do not include cited source filenames and document names e.g info.txt or doc.pdf in the search query terms.\n Do not include any text inside [] or <<>> in the search query terms.\n Do not include any special characters like '+'.\n If the question is not in English, translate the question to English before generating the search query.\n If you cannot generate a search query, return just the number 0.\n ", + "role": "system" + }, + { + "content": "How did crypto do last year?", + "role": "user" + }, + { + "content": "Summarize Cryptocurrency Market Dynamics from last year", + "role": "assistant" + }, + { + "content": "What are my health plans?", + "role": "user" + }, + { + "content": "Show available health plans", + "role": "assistant" + }, + { + "content": "Is there a dress code?", + "role": "user" + }, + { + "content": "Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]Yes, there is a dress code at Contoso Electronics. Look sharp! [employee_handbook-1.pdf]", + "role": "assistant" + }, + { + "content": "Generate search query for: What does a product manager do?", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", @@ -63,8 +87,14 @@ }, { "description": [ - "{'role': 'system', 'content': \"Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\\n If the question is not in English, answer in the language used in the question.\\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\\n \\n \\n \"}", - "{'role': 'user', 'content': 'What does a product manager do?\\n\\nSources:\\nBenefit_Options-2.pdf: There is a whistleblower policy.'}" + { + "content": "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.\n Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.\n If the question is not in English, answer in the language used in the question.\n Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].\n \n \n ", + "role": "system" + }, + { + "content": "What does a product manager do?\n\nSources:\nBenefit_Options-2.pdf: There is a whistleblower policy.", + "role": "user" + } ], "props": { "deployment": "test-chatgpt", diff --git a/tests/test_app.py b/tests/test_app.py index fad23ed02a..1b8775fac5 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -41,12 +41,10 @@ def fake_response(http_code): ) -def thought_contains_text(thought, text): - description = thought["description"] - if isinstance(description, str) and text in description: - return True - elif isinstance(description, list) and any(text in item for item in description): - return True +def messages_contains_text(messages, text): + for message in messages: + if text in message["content"]: + return True return False @@ -778,7 +776,7 @@ async def test_chat_with_history(client, snapshot): ) assert response.status_code == 200 result = await response.get_json() - assert thought_contains_text(result["context"]["thoughts"][3], "performance review") + assert messages_contains_text(result["context"]["thoughts"][3]["description"], "performance review") snapshot.assert_match(json.dumps(result, indent=4), "result.json") @@ -806,7 +804,7 @@ async def test_chat_with_long_history(client, snapshot, caplog): assert response.status_code == 200 result = await response.get_json() # Assert that it doesn't find the first message, since it wouldn't fit in the max tokens. - assert not thought_contains_text(result["context"]["thoughts"][3], "Is there a dress code?") + assert not messages_contains_text(result["context"]["thoughts"][3]["description"], "Is there a dress code?") assert "Reached max tokens" in caplog.text snapshot.assert_match(json.dumps(result, indent=4), "result.json")