Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
3 changes: 2 additions & 1 deletion snooty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ toc_landing_pages = [
"/playgrounds",
"/crud-ops",
"/playground-databases",
"/require-playgrounds"
"/require-playgrounds",
"/copilot"
]

[constants]
Expand Down
36 changes: 36 additions & 0 deletions source/ai-data-usage.txt
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.

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.

Copy link
Collaborator Author

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!


How Your Data is Used

Choose a reason for hiding this comment

The 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

View workflow job for this annotation

GitHub Actions / TDBX Vale rules

[vale] reported by reviewdog 🐶 [MongoDB.Avoid] Don't use 'and/or'. Raw Output: {"message": "[MongoDB.Avoid] Don't use 'and/or'.", "location": {"path": "source/ai-data-usage.txt", "range": {"start": {"line": 27, "column": 42}}}, "severity": "ERROR"}

Choose a reason for hiding this comment

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

The 'third party AI provider' here refer distinct to two things:

  1. The LLM API exposed by Copilot itself (we theoretically use the exact same LLM that Copilot uses)
  2. Our docs chatbot API endpoint used by our Docs Chatbot

Choose a reason for hiding this comment

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

Not sure if we need to be that specific, however,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@themantissa What do you think?

Choose a reason for hiding this comment

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

It doesn't really fit the header but I tend to like to over-provide than under so it would be good to note we augment the underlying LLM with our own docs chatbot.

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.
77 changes: 77 additions & 0 deletions source/copilot.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
.. _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

Choose a reason for hiding this comment

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

Let's also include that they can ask questions about their database collection schema, and ask MongoDB documentation questions that the participant will provide an answer to with specific docs URLs as a reference.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

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

Choose a reason for hiding this comment

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

Could we provide an example where we can show that users can iteratively build an aggregation with Copilot? Sent over a view of this example to you over slack!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done! Because adding this example requires more page space, I made the /query section a separate page so that we can add longer examples for each command without resulting in one super long page.

~~~~~~~

Consider a ``fruits`` collection that contains documents with the
following structure:

.. code-block:: javascript
:copyable: false

{
Copy link
Collaborator

Choose a reason for hiding this comment

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

[question] Should we use the edu dataset for examples like this?

Copy link
Collaborator Author

@ltran-mdb2 ltran-mdb2 Sep 17, 2024

Choose a reason for hiding this comment

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

I think it makes sense to do so! I changed the example to use the sample Mflix database

_id: 1,
item: "tangerine",
type: "citrus"
}

Once you connect to the deployment that contains the ``fruits``
collection, you can ask the Github Copilot chat to generate a query that
finds all documents in the ``fruits`` collection that have the type
``citrus``.

.. code-block:: javascript
:copyable: false

@MongoDB /query find all documents in the fruits collection that have
the type citrus

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('fruits').find({ type: 'citrus' })


.. toctree::
:titlesonly:

AI & Data Usage </ai-data-usage>


1 change: 1 addition & 0 deletions source/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Get Started
/connect
/databases-collections
/playgrounds
/copilot
/create-cluster-terraform
/reference
Changelog <https://github.com/mongodb-js/vscode/releases>
Loading