Skip to content

Conversation

nlarew
Copy link
Contributor

@nlarew nlarew commented Sep 24, 2025

Description

  • Add new eval cases for "humility" in the Compass/DE chatbot system prompt

    • Be more humble and instead of giving definitive answers that the user should blindly follow / copy-paste, encourage users to read the sources and understand what they are doing. E.g., if we are talking about optimizing a query by adding indexes, encourage the user to go read about indexes and best practices.
    • Avoid encouraging users to perform destructive operations. Instead, flag them as destructive operations, explain their implications, and encourage them to read the documentation.
  • Update the client instructions system prompt with guidance to this effect

Braintrust Eval Results

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@Copilot Copilot AI review requested due to automatic review settings September 24, 2025 20:49
@nlarew nlarew requested a review from a team as a code owner September 24, 2025 20:49
@nlarew nlarew requested a review from gribnoysup September 24, 2025 20:49
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 improves the Compass assistant system prompting to promote more responsible AI interactions by encouraging user education and caution with destructive operations.

  • Adds new evaluation cases to test for "humility" in assistant responses
  • Implements guidance for encouraging users to read documentation rather than blindly following instructions
  • Adds safeguards against promoting destructive database operations without proper warnings

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
packages/compass-assistant/test/eval-cases/index.ts Imports and includes new humility evaluation cases
packages/compass-assistant/test/eval-cases/humility.ts Defines test cases for humble assistant behavior and destructive operation warnings
packages/compass-assistant/.gitignore Adds .env file to gitignore

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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 its products. Do not assume the user 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where's the changed system prompt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a dummy and deleted it to test the before state 😓 Adding back now.

@lerouxb lerouxb merged commit a232979 into mongodb-js:main Sep 26, 2025
25 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants