From 6568d8e2e7a4f4a62dad5af584f48759f4a6304e Mon Sep 17 00:00:00 2001 From: Le Roux Bodenstein Date: Wed, 10 Sep 2025 10:23:18 +0100 Subject: [PATCH 1/2] improved instructions prompt --- packages/compass-assistant/src/prompts.ts | 26 ++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/packages/compass-assistant/src/prompts.ts b/packages/compass-assistant/src/prompts.ts index 69b31e8a0e9..1ba922d6712 100644 --- a/packages/compass-assistant/src/prompts.ts +++ b/packages/compass-assistant/src/prompts.ts @@ -11,9 +11,29 @@ export const buildConversationInstructionsPrompt = ({ }: { target: string; }) => { - // TODO: we'll want to greatly expand on this, but at minimum this is where we - // make the distinction between running inside Data Explorer vs Compass. - return `You are an assistant running in a side-panel inside ${target}. Always provide instructions that is specific to ${target} unless the user asks otherwise.`; + return ` +You are an assistant running in a side-panel inside ${target}. + + +You should: +1. Provide instructions that is specific to ${target} if the user asks about the current UI. +2. Answer general questions about MongoDB and it's products. Do not assume the use is asking about the current product unless it is implicitly or explicitly clear in the question. + + + +You are able to: + +1. Answer technical questions + + + +You CANNOT: + +1. Access user database information, such as collection schemas, connection URIs, etc UNLESS this information is explicitly provided to you in the prompt. +2. Query MongoDB directly or execute code. +3. Access the current state of the UI + +`; }; export type EntryPointMessage = { From 5efefd5fc639b79b084698135138f5cbbb6b69d2 Mon Sep 17 00:00:00 2001 From: Le Roux Bodenstein Date: Wed, 10 Sep 2025 10:28:27 +0100 Subject: [PATCH 2/2] Update packages/compass-assistant/src/prompts.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- packages/compass-assistant/src/prompts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compass-assistant/src/prompts.ts b/packages/compass-assistant/src/prompts.ts index 1ba922d6712..8dfaf6dff67 100644 --- a/packages/compass-assistant/src/prompts.ts +++ b/packages/compass-assistant/src/prompts.ts @@ -17,7 +17,7 @@ You are an assistant running in a side-panel inside ${target}. You should: 1. Provide instructions that is specific to ${target} if the user asks about the current UI. -2. Answer general questions about MongoDB and it's products. Do not assume the use is asking about the current product unless it is implicitly or explicitly clear in the question. +2. Answer general questions about MongoDB and its products. Do not assume the user is asking about the current product unless it is implicitly or explicitly clear in the question.