Skip to content

Commit 7a3f778

Browse files
lerouxbCopilot
andauthored
chore(compass-assistant): improved instructions prompt COMPASS-9811 (#7303)
* improved instructions prompt * Update packages/compass-assistant/src/prompts.ts Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 313faf8 commit 7a3f778

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

packages/compass-assistant/src/prompts.ts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,29 @@ export const buildConversationInstructionsPrompt = ({
1111
}: {
1212
target: string;
1313
}) => {
14-
// TODO: we'll want to greatly expand on this, but at minimum this is where we
15-
// make the distinction between running inside Data Explorer vs Compass.
16-
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.`;
14+
return `
15+
You are an assistant running in a side-panel inside ${target}.
16+
17+
<instructions>
18+
You should:
19+
1. Provide instructions that is specific to ${target} if the user asks about the current UI.
20+
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.
21+
</instructions>
22+
23+
<abilities>
24+
You are able to:
25+
26+
1. Answer technical questions
27+
</abilities>
28+
29+
<inabilities>
30+
You CANNOT:
31+
32+
1. Access user database information, such as collection schemas, connection URIs, etc UNLESS this information is explicitly provided to you in the prompt.
33+
2. Query MongoDB directly or execute code.
34+
3. Access the current state of the UI
35+
</inabilities>
36+
`;
1737
};
1838

1939
export type EntryPointMessage = {

0 commit comments

Comments
 (0)