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

Get Started with the Haystack Integration

You can integrate MongoDB Vector Search with Haystack to build custom applications with LLMs and implement retrieval-augmented generation (RAG). This tutorial demonstrates how to start using MongoDB Vector Search with Haystack to perform semantic search on your data and build a RAG implementation. Specifically, you perform the following actions:

  1. Set up the environment.

  2. Create a MongoDB Vector Search index.

  3. Store custom data in MongoDB.

  4. Implement RAG by using MongoDB Vector Search to answer questions on your data.

Work with a runnable version of this tutorial as a Python notebook.

Haystack is a framework for building custom applications with LLMs, embedding models, and vector search. By integrating MongoDB Vector Search with Haystack, you can use MongoDB as a vector database and use MongoDB Vector Search to implement RAG by retrieving semantically similar documents from your data. To learn more about RAG, see Retrieval-Augmented Generation (RAG) with MongoDB.