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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,45 @@
"isSticky": true,
"description": "Analyze a collection's schema."
}
],
"disambiguation": [
{
"category": "mongodb",
"description": "The user is asking for assistance or information related to MongoDB.",
"examples": [
"Explain this MongoDB query.",
"How do I write this MongoDB query in Python?",
"How do I use $lookup in MongoDB?",
"Can you help me debug a MongoDB query?",
"Rewrite this MongoDB query",
"How to convert this MongoDB query to Python?",
"How to convert this MongoDB query to Java?",
"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?",
alenakhineika marked this conversation as resolved.
Show resolved Hide resolved
"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 insert documents in MongoDB?",
"How do I create documents in MongoDB?",
alenakhineika marked this conversation as resolved.
Show resolved Hide resolved
"How do I delete documents in MongoDB?",
"Explain how to use MongoDB transactions.",
"Help me write this MongoDB query:",
alenakhineika marked this conversation as resolved.
Show resolved Hide resolved
"Explain MongoDB query syntax.",
"Help me write a MongoDB aggregation pipeline.",
"Help me debug this aggregation pipeline.",
"How do I use $lookup in a MongoDB aggregation pipeline?",
alenakhineika marked this conversation as resolved.
Show resolved Hide resolved
"How do I optimize this MongoDB query?",
"How do I optimize indexes in MongoDB?",
"How do I optimize this data model in MongoDB?",
"How do I create a compound index for this query?",
"How do I model relationships in MongoDB?",
"MongoDB best practices for indexing",
"How do I use MongoDB Atlas search?",
"How do I perform semantic search in MongoDB?",
"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!

}
]
}
],
Expand Down
Loading