Skip to content
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

feat(participant): add disambiguation examples to answer MongoDB queries in Copilot #911

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

GaurabAryal
Copy link
Contributor

@GaurabAryal GaurabAryal commented Jan 17, 2025

Description

Based on VS Code extension documentation for implementing chat participant detection (see: https://code.visualstudio.com/api/extension-guides/chat#implement-participant-detection), I've added some examples to detect prompts related to MongoDB that our Copilot extension can help answer.

We need more dedicated time to ensure the examples are stronger and cover more cases, however, I believe this should be a good starting point until then.

image

Checklist

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)

@GaurabAryal GaurabAryal added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label Jan 17, 2025
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.

Seem to be nice examples! Do you know if they're looking to add a way where we can also differentiate between different commands, i.e. query? Could be great.

"How to convert this MongoDB query to Node.js?",
"How to convert this MongoDB query to Go?",
"How to convert this MongoDB query to php?",
"How do I update documents in MongoDB?",
Copy link
Contributor

Choose a reason for hiding this comment

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

more complicated so doesn't need to be included necessarily but I often ask about a query like "How do I find all documents with name "Bob" in my MongoDB collection?"

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if that wiill be frowned upon, but we could consider dropping the MongoDB there - How do I find all documents in my collection - the terms document and collection are quite often associated with MongoDB and if they have the extension installed, it's very likely that they're interfacing on some level with a mongodb database.

Copy link
Contributor

Choose a reason for hiding this comment

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

I must say GitHub Copilot has been doing this automatic inference thing with other things and it always ends inferring something I did not want it to (I was looking to disable it completely) so my worry is that it'll be too permissive with the word "documents" in general. We can try this and test it out though, collections + documents is reasonable if it stays strict to it.

Copy link
Contributor

Choose a reason for hiding this comment

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

It also might be a more common use case without the "How to" prefix, e.g. find all documents with name "bob" in my "test" collection.

Copy link
Contributor Author

@GaurabAryal GaurabAryal Jan 21, 2025

Choose a reason for hiding this comment

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

Agreed with y'all, I added "find all documents in my collection" example

"How do I stream data using MongoDB?",
"How do I monitor change streams in MongoDB?",
"How do I set up a MongoDB replica set for local development?"
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add some examlers about schema?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added some more examples about schema!

@GaurabAryal GaurabAryal changed the title Initial list of disambiguation examples to answer mongodb queries in Copilot feat(participant): add disambiguation examples to answer MongoDB queries in Copilot Jan 23, 2025
@GaurabAryal GaurabAryal added no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) and removed no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) labels Jan 23, 2025
@GaurabAryal
Copy link
Contributor Author

Merging, thanks ya'll

@GaurabAryal GaurabAryal merged commit cd7a82b into main Jan 23, 2025
8 of 9 checks passed
@GaurabAryal GaurabAryal deleted the gaurab/copilot-disambiguation branch January 23, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants