Skip to main content

MongoDB Chatbot Framework

👷‍♂️ Work In Progress 👷‍♂️

The MongoDB Chatbot Framework is under active development and may undergo breaking changes.

We aim to keep the documentation up to date with the latest version.

Build full-stack intelligent chatbot applications using MongoDB and Atlas Vector Search.

The MongoDB Chatbot Framework is a set of libraries that you can use to build a production-ready chatbot application. The framework provides first-class support for retrieval augmented generation (RAG), and is extensible to support other patterns for building intelligent chatbots.

The framework can take your chatbot application from prototype to production.

You can quickly get an AI chatbot enhanced with your data up and running using the framework's built-in data ingest process, chatbot server, and web UI. As you refine your application and scale to more users, you can modify the chatbot's behavior to meet your needs.

The framework is flexible and customizable. It supports multiple AI models and complex prompting strategies. It also includes tools for programmatic evaluation of your chatbot's AI components.

How It Works

The MongoDB Chatbot Framework has the following core components:

  • MongoDB Atlas: Database for the application that stores content and conversation. Indexes content using Atlas Vector Search.
  • Ingest CLI: Configurable CLI application that you can use to ingest content into a MongoDB collection for use with Atlas Vector Search.
  • Chatbot Server: Express.js server routes that you can use to build a chatbot application.
  • Chatbot UI: React.js UI components that you can use to build a chatbot application.
  • Evaluation CLI: CLI application that you can use to evaluate the performance of your chatbot and its components.

Quick Start

To get started using the MongoDB Chatbot Framework, refer to the Quick Start guide.

Design Principles

The MongoDB Chatbot Framework is designed around the following principles:

  • Composability: You can use components of the chatbot framework independently of each other. For example, we have some users who are using only our ingestion CLI to ingest content into MongoDB Atlas, but use other tools to build their chatbot and UI.
  • Pluggability: You can plug in your own implementations of components. For example, you can plug in your own implementations of the DataSource interface to ingest content from different data sources.
  • Inversion of Control: The framework makes decisions about boilerplate aspects of intelligent chatbot systems so that you can focus on building logic unique to your application.

MongoDB Docs Chatbot

This framework is used to build the MongoDB Docs Chatbot, a RAG chatbot that answers questions about the MongoDB documentation. You can try it out on

Here's a reference architecture for how the MongoDB Chatbot Framework system works for the MongoDB Docs Chatbot.

Data ingestion:

Data Ingestion Architecture

Chat Server:

Chat Server Architecture

How We Built It