For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

/docs Command

The /docs command provides MongoDB-specific information, supplemented by links to MongoDB Documentation. The MongoDB Extension for Github Copilot uses Retrieval-Augmented Generation (RAG) to generate responses based on the latest version of MongoDB Documentation.

The rest of this page illustrates example use cases for the /docs command:

You can use the /docs command to ask how to perform specific operations. The following prompt asks for information on creating an index:

@MongoDB /docs How do I create an index?

The MongoDB Extension for Github Copilot first provides the following MongoDB documentation:

The generated response also contains information about creating an index and code examples:

Screenshot of copilot providing information on creating an index

You can also use the /docs command to ask for operation recommendations. The following prompt asks the MongoDB Extension for Github Copilot for a recommendation on the best way to perform semantic search:

@MongoDB /docs what is the best way to perform semantic search on my
data?

The generated response recommends using Atlas Vector Search and provides the following links to MongoDB documentation:

The response also includes steps to get started with Atlas Vector Search, with a code example:

Screenshot of copilot providing information on using vector search

On this page