> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# MongoDB Vector Search Use Cases and Design Patterns

You can build AI features and applications by using MongoDB Vector Search. Use the following pages to learn how to implement common use cases and design patterns.

## Semantic Search

MongoDB Vector Search allows you to perform semantic search over your data in a few clicks using [Automated Embedding](https://www.mongodb.com/docs/vector-search/crud-embeddings/automated-embedding.md#std-label-avs-auto-embeddings) which automatically generates vector embeddings during indexing, updates, and queries using the model of your choice.

To get started, see [MongoDB Vector Search Quick Start Tutorial.](https://www.mongodb.com/docs/vector-search/tutorials/quick-start.md#std-label-vector-search-quick-start)

## Retrieval-Augmented Generation (RAG)

RAG allows you to combine language models with your own data by retrieving relevant context before generating responses. This pattern allows you to build AI applications that provide more accurate and domain-specific responses grounded in your custom data.

To learn more and get started, see [Retrieval-Augmented Generation (RAG) with MongoDB.](https://www.mongodb.com/docs/vector-search/tutorials/rag.md#std-label-avs-rag)

You can also implement RAG locally, without the need for API (Application Programming Interface) keys from LLM providers. To learn more, see [Build a Local RAG Implementation with MongoDB Vector Search.](https://www.mongodb.com/docs/vector-search/tutorials/local-rag.md#std-label-local-rag)

## AI Agents

MongoDB provides several features for building AI agents. As both a vector and document database, MongoDB supports various search methods for agentic RAG, as well as storing agent interactions in the same database for short and long-term agent memory.

To learn more and get started, see [Build AI Agents with MongoDB.](https://www.mongodb.com/docs/vector-search/about/ai-agents.md#std-label-ai-agents)

## Prerequisites

To complete the tutorials on these pages, you must have the following:

- One of the following MongoDB cluster types:
  - An [Atlas cluster](https://www.mongodb.com/docs/atlas/tutorial/create-new-cluster.md#std-label-create-new-cluster) running MongoDB version 6.0.11, 7.0.2, or later. Ensure that your IP address (Internet Protocol address) is included in your Atlas project's [access list.](https://www.mongodb.com/docs/atlas/security/ip-access-list.md#std-label-access-list)

  - A local Atlas deployment created using Python and Docker. Install `atlas-local-lib-py` (`pip install atlas-local-lib-py`) to programmatically create and manage local deployments. To learn more, see the [atlas-local-lib-py repository.](https://github.com/mongodb/atlas-local-lib-py)

  - A MongoDB Community or Enterprise cluster with [Search and Vector Search](https://www.mongodb.com/docs/search/self-managed/current/installation/linux.md#std-label-community-search-deploy) installed.

- [`Project Data Access Admin`](https://www.mongodb.com/docs/atlas/reference/user-roles.md#mongodb-authrole-Project-Data-Access-Admin) access to the project to create MongoDB Vector Search indexes.

- The [sample data](https://www.mongodb.com/docs/atlas/import/load-sample-data.md#std-label-sample-data) loaded into your MongoDB cluster.

- [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) or a supported [MongoDB Driver](https://www.mongodb.com/docs/drivers/) to run queries on your cluster.

**Note:**

You can run MongoDB Vector Search queries by using any driver through the [`$vectorSearch`](https://www.mongodb.com/docs/vector-search/query/aggregation-stages/vector-search-stage.md#mongodb-pipeline-pipe.-vectorSearch) aggregation stage. These tutorials include examples for a selection of drivers. Refer to the specific tutorial page for details.
