-
Notifications
You must be signed in to change notification settings - Fork 35
DOCSP 43493 VSCode Copilot /query functionality #92
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
Changes from 11 commits
89c7826
02b3217
4be41f0
92b4315
172179e
3b0d9bf
fb2cd61
ad7a58d
4f22c05
fed6b9f
7f5915b
824ff26
1ebb8ce
270dc4e
9949ef9
ed3d794
1d4d0a6
5adb7b1
474a0a0
624a434
fb9cbe0
318a61a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. vscode-ai-data-usage: | ||
|
||
============================= | ||
AI and Data Usage Information | ||
============================= | ||
|
||
.. contents:: On this page | ||
:local: | ||
:backlinks: none | ||
:depth: 1 | ||
|
||
The MongoDB Github Copilot Participant is powered by Generative AI (Gen | ||
AI), and may give inaccurate responses. See our `Generative AI FAQ | ||
<https://dochub.mongodb.org/core/faq-ai-features>`__ for more | ||
information about Gen AI in MongoDB products. | ||
|
||
Third Party Providers | ||
--------------------- | ||
|
||
The MongoDB Github Copilot Participant is powered by `Github Copilot <https://github.com/features/copilot>`__. | ||
This is subject to change in the future. | ||
|
||
How Your Data is Used | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd like us to make sure to run this answer by Product legal if we haven't yet. This contains what we normally include but because we get so many questions from customers it's just good to be sure we have covered our bases here. We've been primarily working with Rachael McClure - let me know if you need any assistance in getting a check here. cc @GaurabAryal |
||
--------------------- | ||
|
||
When you use the MongoDB Github Copilot Participant, the following | ||
information is sent to MongoDB's backend and/or the third party AI | ||
Check failure on line 27 in source/ai-data-usage.txt
|
||
|
||
provider: | ||
|
||
- The full text of your natural language prompt. | ||
- The schema of the collection you are using, | ||
including database name, collection name, field names, and types. | ||
|
||
The information that is sent will not be shared with any other third | ||
parties or stored by the AI provider. We do not send database | ||
connection strings, credentials, or rows/documents from your databases. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
.. _vsce-copilot: | ||
|
||
================================== | ||
MongoDB Github Copilot Participant | ||
================================== | ||
|
||
.. default-domain:: mongodb | ||
|
||
.. contents:: On this page | ||
:local: | ||
:backlinks: none | ||
:depth: 1 | ||
:class: singlecol | ||
|
||
|
||
|vsce-full| includes a MongoDB Github Copilot Participant to assist in | ||
using `Github Copilot <https://github.com/features/copilot>`__ with your | ||
MongoDB deployments. Through Github Copilot's chat feature, users with | ||
|vsce| can interact with their MongoDB clusters and generate code with | ||
|
||
MongoDB domain-specific knowledge on top of Github Copilot's LLM. | ||
|
||
The MongoDB Github Copilot Participant includes MongoDB-specific | ||
commands to assist in interacting with your deployment. | ||
|
||
/query | ||
------ | ||
|
||
The ``/query`` command assists in generating queries from a natural | ||
language against a connected MongoDB cluster. The MongoDB Github Copilot | ||
Participant provides underlying schema information of the relevant | ||
collections to Github Copilot to generate a response. If you do not | ||
specify a collection in your prompt, the chat prompts you to select a | ||
relevant collection. | ||
|
||
When the LLM generates a query, you can open the query in a playground | ||
file or run the query directly in your collection. | ||
|
||
Example | ||
|
||
~~~~~~~ | ||
|
||
Consider the ``users`` collection in the `Mflix Sample Database | ||
<https://www.mongodb.com/docs/atlas/sample-data/sample-mflix/#sample_mflix.users>`__. | ||
Each document in the collection has the following structure: | ||
|
||
.. code-block:: javascript | ||
:copyable: false | ||
|
||
{ | ||
|
||
_id: { | ||
"$oid": "59b99db4cfa9a34dcd7885b6" | ||
}, | ||
name: "Kayden Washington", | ||
email: "[email protected]", | ||
password: "11222021" | ||
} | ||
Once you connect to the deployment that contains the ``users`` | ||
collection, you can ask the Github Copilot chat to generate a query that | ||
finds the document in the ``users`` collection that has the ``name`` | ||
value of `` "Kayden Washington"``. | ||
|
||
.. code-block:: javascript | ||
:copyable: false | ||
|
||
@MongoDB /query find a document in the users collection with the name | ||
of Kayden Washington. | ||
|
||
The Github Copilot Chat uses the MongoDB Github Copilot Participant to | ||
generate the following query using knowledge of your database schema: | ||
|
||
.. code-block:: javascript | ||
|
||
db.getCollection('users').findOne({ name: 'Kayden Washington' }); | ||
|
||
|
||
.. toctree:: | ||
:titlesonly: | ||
|
||
AI & Data Usage </ai-data-usage> | ||
|
||
|
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.
I'm not sure if this will ever change since it is an extension for Github Copilot.
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.
Removed the line about changing!