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

Manage Native Reranking

Important

Native Reranking is available as a Preview feature. The feature and the corresponding documentation might change at any time during the Preview period. Therefore, we don't recommend using this feature in production environments. We do not use any customer data from this feature to train our models at this time. To learn more, see Preview Features.

You can perform the following tasks in the Atlas UI:

To enable or disable Native Reranking, you must have Project Owner access to the project. If you have Organization Owner access, you must add yourself as a Project Owner to the project for enabling or disabling Native Reranking.

To view rate limits and usage metrics, you must have Project Read Only or Project Search Index Editor access or above to the project.

Before you can use the $rerank stage, you must enable Native Reranking for your project.

To enable or disable reranking, complete the following steps:

1
  1. If it's not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. In the sidebar, click the icon next to Project Overview.

The Project Settings page displays.

2

To enable reranking, do the following:

  1. In the Project Settings tab, set the Native Reranking: $rerank in the Aggregation Pipeline toggle to On.

  2. In the Confirm Rerank Model Usage window, select the checkbox to confirm that you understand the costs associated with using the $rerank stage and click Confirm.

To disable reranking, complete the following steps:

  1. In the Project Settings tab, set the Native Reranking: $rerank in the Aggregation Pipeline toggle to Off.

  2. In the Disable Native Reranking confirmation window, type Disable and click Disable.

    Disabling reranking might cause running queries that use the $rerank stage to fail.

You can configure a resource policy at the organization level to block $rerank entirely or with exceptions. To do this, add a forbid rule written in Cedar that targets the $rerank action. If you configure this policy, new projects can't enable $rerank. However, the policy does not disable projects that already have $rerank enabled. You must disable $rerank individually for each project that already has it enabled. To disable $rerank for a project, see Enable or Disable Native Reranking.

You can disable $rerank with exceptions by using the unless clause in the forbid rule.

Example: Disable $rerank with Exceptions
forbid (principal, action == ResourcePolicy::Action::"$rerank", resource) unless { <exception> };

To learn more about setting the resource policy, see Atlas Resource Policies.

Monitor your token usage on the Usage page in the Atlas UI. To view usage:

1

You can go the MongoDB Search page from the Search & Vector Search option, or the Data Explorer.

  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Search & Vector Search under the Database heading.

  4. If your project has multiple clusters, select the cluster you want to use from the Select cluster dropdown, then click Go to Atlas Search.

    The Search & Vector Search page displays.

  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Data Explorer under the Database heading.

  4. Expand the database and select the collection.

  5. Click the Indexes tab for the collection.

  6. Click the Search and Vector Search link in the banner.

    The Search & Vector Search page displays.

2

The Usage page provides several views to monitor and analyze your token usage. To learn more, see Token Usage.

The Rate Limits page in the Atlas UI provides the rate limits for your project and guidance on how to increase them.

Atlas enforces rate limits on the number of requests that you can make within a specific time frame, measured in tokens per minute (TPM) or requests per minute (RPM). Rate limits follow a tiered system, with higher tiers offering increased limits.

Model
Requests Per Minute (RPM)
Tokens Per Minute (TPM)

rerank-2.5

4,000

4,000,000

rerank-2.5-lite

4,000

8,000,000

rerank-2

4,000

4,000,000

rerank-2-lite

4,000

8,000,000

1

You can go the MongoDB Search page from the Search & Vector Search option, or the Data Explorer.

  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Search & Vector Search under the Database heading.

  4. If your project has multiple clusters, select the cluster you want to use from the Select cluster dropdown, then click Go to Atlas Search.

    The Search & Vector Search page displays.

  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Data Explorer under the Database heading.

  4. Expand the database and select the collection.

  5. Click the Indexes tab for the collection.

  6. Click the Search and Vector Search link in the banner.

    The Search & Vector Search page displays.

2

MongoDB automatically increases rate limits as your usage increases. If you still need a higher rate limit, contact MongoDB Support.

You can monitor $rerank usage through the following metrics in the Atlas UI:

Metric
Description
$rerank Query Status Rate

The percentage of $rerank queries that complete successfully. Use this metric to identify failures in $rerank queries, such as rate limit errors or connectivity issues with Voyage AI.

$rerank Token Usage Rate

The total number of tokens that $rerank queries consume. Use this metric to monitor token consumption and correlate usage with billing.

To view metrics for $rerank usage:

1
  1. Select the organization that contains your project from the Organizations menu in the navigation bar.

  2. Select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Clusters under the Database heading.

  4. Click the name of the cluster to open the Cluster sidebar.

  5. Click Metrics in the Cluster sidebar.

2

You can view the $rerank Query Status Rate and $rerank Token Usage Rate metrics by clicking the appropriate metric.