Docs Menu

Docs HomeView & Analyze DataMongoDB Compass

Enable Natural Language Querying

On this page

  • About this Task
  • Before you Begin
  • Steps
  • Next Steps

You can enable Compass natural language querying by toggling the Use Generative AI setting. Natural language queries can be a helpful starting point and assist you in learning to write MongoDB queries.

To enable natural language querying in Compass, follow the steps below. Alternatively, you can enable natural language querying by clicking the Log in to Atlas to enable button within the Use natural language to generate queries and pipelines modal. You can display this modal on Compass versions 1.40.0 or later when you click the Generate query or Generate aggregation button on the query bar.

To enable the generation of queries and aggregations in Compass, you must:

  • Sign into Atlas. For details on how to get a free Atlas account and deploy a free M0 cluster, see Get Started with Atlas.

  • Install Compass version 1.40.0 or later. For instructions on downloading and installing the latest version, see Download and Install Compass.


You can also enable Natural Language Querying using the configuration file. For details, see Configuration File Settings.

Operating System
Keyboard Shortcut
Windows / Linux
In the top menu bar, click Edit.
Ctrl + ,
In the top menu bar, click MongoDB Compass.
+ ,
  1. Select Feature preview.

  2. Click Log in with Atlas.

    A web browser displays the Atlas login page.

  3. Complete the login procedure.

    Once completed a Logged in with Atlas account message displays.

  1. The Data Processing Agreement displays.

  2. Read the Data Processing Agreement.

  3. Click Agree and continue.

  4. Click Save.

Prompt a Natural Language Query

← Query with Natural Language