Skip to content

Conversation

lerouxb
Copy link
Contributor

@lerouxb lerouxb commented Sep 4, 2025

@Copilot Copilot AI review requested due to automatic review settings September 4, 2025 09:42
@lerouxb lerouxb added the feature flagged PRs labeled with this label will not be included in the release notes of the next release label Sep 4, 2025
@lerouxb lerouxb requested a review from a team as a code owner September 4, 2025 09:42
@github-actions github-actions bot added the feat label Sep 4, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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.

Copy link
Contributor

@gagik gagik left a 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

@lerouxb
Copy link
Contributor Author

lerouxb commented Sep 4, 2025

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.

@lerouxb lerouxb merged commit 83182d9 into main Sep 4, 2025
54 of 57 checks passed
@lerouxb lerouxb deleted the send-instructions branch September 4, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat feature flagged PRs labeled with this label will not be included in the release notes of the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants