diff options
| author | A.J. Shulman <Shulman.aj@gmail.com> | 2024-08-29 21:01:29 -0400 |
|---|---|---|
| committer | A.J. Shulman <Shulman.aj@gmail.com> | 2024-08-29 21:01:29 -0400 |
| commit | 3a1d859359b462fc9a9f1c001d6681a8d886f2b6 (patch) | |
| tree | a0969bee2375be2c2d795dcd046de60ed67a3ad5 /src/client/views/nodes/ChatBox/prompts.ts | |
| parent | 9be434cddc30baada63aff0c5dae6dbf606f2590 (diff) | |
added loop summary and updated type for RAG tool output
Diffstat (limited to 'src/client/views/nodes/ChatBox/prompts.ts')
| -rw-r--r-- | src/client/views/nodes/ChatBox/prompts.ts | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/client/views/nodes/ChatBox/prompts.ts b/src/client/views/nodes/ChatBox/prompts.ts index 71a4f33b4..9ea86dbf4 100644 --- a/src/client/views/nodes/ChatBox/prompts.ts +++ b/src/client/views/nodes/ChatBox/prompts.ts @@ -37,16 +37,17 @@ export function getReactPrompt(tools: Tool[], summaries: () => string, chatHisto When providing your final response, use the following structure: </instruction> <answer> - <section> - <tag><grounded_text> - Wrap text that is derived from tool-based or chunk-based information within these tags, ensuring proper citation.</tag> - <tag><normal_text> - Wrap text that is not derived from tool-based or chunk-based information within these tags.</tag> - </section> + <tag><grounded_text> - Wrap text that is derived from tool-based or chunk-based information within these tags, ensuring proper citation.</tag> + <tag><normal_text> - Wrap text that is not derived from tool-based or chunk-based information within these tags.</tag> <citations> <tag><citation> - Provide citations for each grounded text, referencing the tool or chunk used.</tag> </citations> <follow_up_questions> <tag><question> - Include exactly three follow-up questions from the user's perspective within these tags.</tag> </follow_up_questions> + <loop_summary> + <tag><loop_summary> - Provide a summary of the actions and tools used by the assistant throughout the interaction within these tags.</tag> + </loop_summary> </answer> </response_structure> @@ -103,6 +104,7 @@ export function getReactPrompt(tools: Tool[], summaries: () => string, chatHisto <elements> <element>The complete answer to the user's query, with grounded information wrapped in <grounded_text> tags and general information wrapped in <normal_text> tags.</element> <element>Exactly three follow-up questions written from the user's perspective, enclosed within <follow_up_questions> tags.</element> + <element>A concise <loop_summary> that describes the actions and tools used throughout the interaction.</element> </elements> </final_answer_requirements> @@ -267,6 +269,9 @@ export function getReactPrompt(tools: Tool[], summaries: () => string, chatHisto <question>What specific infrastructure improvements were made in Vancouver as a result of hosting the 2010 Winter Olympics?</question> <question>How did the performance of Canadian athletes in the 2010 Vancouver Winter Olympics compare to their performance in previous Winter Olympics?</question> </follow_up_questions> + <loop_summary> + The assistant used the RAG tool to gather information from the user's documents, focusing on key moments and official statements. It then used the dataAnalysis tool to analyze the medal count and economic impact data, providing a comprehensive overview of the 2010 Vancouver Winter Olympics's impact. + </loop_summary> </answer> </stage> </interaction> @@ -424,6 +429,9 @@ export function getReactPrompt(tools: Tool[], summaries: () => string, chatHisto <question>Are there any special permits required for hiking certain trails in Yosemite?</question> <question>What wildlife might I encounter while hiking in Yosemite, and how should I prepare for potential encounters?</question> </follow_up_questions> + <loop_summary> + The assistant used the search tool to find relevant websites, then scraped information from those sites using the websiteInfoScraper tool. Additional information about current trail conditions was gathered from the NPS website to provide a comprehensive and safe hiking guide. + </loop_summary> </answer> </stage> </interaction> |
