-
Notifications
You must be signed in to change notification settings - Fork 234
feat(compass-assistant): add global per-conversation instructions COMPASS-9766 #7279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds global per-conversation instructions to the Compass assistant, allowing the chatbot to distinguish between different application contexts (Atlas Data Explorer vs MongoDB Compass) when providing responses.
- Adds a method to determine the appropriate app name for prompts based on API URL preset
- Introduces conversation instructions that inform the assistant which application it's running in
- Updates the docs provider transport to accept and use instructions parameter
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
packages/compass-generative-ai/src/atlas-ai-service.ts | Adds getAppNameForPrompt() method to return context-appropriate app names |
packages/compass-generative-ai/src/atlas-ai-service.spec.ts | Adds test coverage for the new app name method |
packages/compass-assistant/src/prompts.ts | Creates buildConversationInstructionsPrompt() function to generate instructions |
packages/compass-assistant/src/docs-provider-transport.ts | Updates constructor to accept instructions and passes them to OpenAI provider |
packages/compass-assistant/src/compass-assistant-provider.tsx | Integrates the new instruction system into the chat transport |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good, I think we should have a better prompt at this stage since I find it to work much better if we provide a specific instruction
I realised I have to use the instructions in the braintrust evals too, so I just incorporated #7256 because I already did the work there. |
COMPASS-9766