diff --git a/src/pages/api/chat.ts b/src/pages/api/chat.ts index 067ba2271..e4f6be0f9 100644 --- a/src/pages/api/chat.ts +++ b/src/pages/api/chat.ts @@ -505,7 +505,7 @@ The user message will include excerpts from the high-quality documents, APIs/too const toolsOutputResults = _buildToolsOutputResults({ conversation }) // todo: check for length problems... PostPrompt += - "The user has invoked external tools, and now it's your job to use the tool outputs and any other information to craft a great response. Even if the user asks you to invoke tools, that has already taken place before you saw this message. You should not attempt to invoke tools yourself, just use the results/outputs of the tools. If the tools errored out, tell the user. If the tool outputs are not relevant to their query, tell the user. Use the tool outputs, when relevant, in crafting your response. The user may or may not reference the tool directly, either way provide a helpful response and infer what they want based on the information you have available. Never tell the user \"I will run theses for you\" because they have already run! Always use past tense to refer to the tool outputs. NEVER request access to the tools because you are guarenteed to have access when appropraite; e.g. nevery say \"I would need access to the tool.\" When using tool results in your answer, always tell the user the answer came from a specific tool name and cite it using code notation something like '...as per tool `tool name`...' or 'According to tool `tool name` ...'. Never make up tool results, it's crucial to be honest and transparent. Stick to the facts as presented." + "\nThe user query required the invocation of external tools, and now it's your job to use the tool outputs and any other information to craft a great response. All tool invocations have already been completed before you saw this message. You should not attempt to invoke any tools yourself; instead, use the provided results/outputs of the tools. If any tools errored out, inform the user. If the tool outputs are irrelevant to their query, let the user know. Use relevant tool outputs to craft your response. The user may or may not reference the tools directly, but provide a helpful response based on the available information. Never tell the user you will run tools for them, as this has already been done. Always use the past tense to refer to the tool outputs. Never request access to the tools, as you are guaranteed to have access when appropriate; for example, never say 'I would need access to the tool.' When using tool results in your answer, always specify the source, using code notation, such as '...as per tool `tool name`...' or 'According to tool `tool name`...'. Never fabricate tool results; it is crucial to be honest and transparent. Stick to the facts as presented." PostPrompt += toolsOutputResults } return PostPrompt