Owlbert
MongoDB-RAG: The Easiest Way to Build RAG Applications with MongoDB

A lightweight NPM package that simplifies vector search, document ingestion, and retrieval-augmented generation (RAG) workflows using MongoDB Atlas.
Install NowTry the Live DemoAbout MongoDB-RAG
Chat with OwlbertChat with Owlbert

🚀 Why Use MongoDB-RAG?

Vector Search

Perform efficient similarity searches with MongoDB Atlas Vector Search.

Dynamic Databases & Collections

Store embeddings dynamically across multiple databases and collections.

Batch Processing

Ingest documents in bulk with automatic retries.

Index Management

Ensure vector indexes are created and optimized automatically.

Hybrid Search

Combine vector and metadata filtering for precise results.

CLI & API

Use a simple CLI tool to set up and interact with MongoDB-RAG.

📦 Get Started in Minutes

Install MongoDB-RAG and set up your environment with just a few commands.

1️⃣ Install the package:

npm install mongodb-rag dotenv

2️⃣ Initialize the configuration:

npx mongodb-rag init

3️⃣ Create a vector index:

npx mongodb-rag create-index

4️⃣ Start using the library:


import { MongoRAG } from 'mongodb-rag';

const rag = new MongoRAG({ mongoUrl: process.env.MONGODB_URI });

⚡ CLI & API Usage

Test MongoDB Connection
npx mongodb-rag test-connection
Ingest Documents
npx mongodb-rag ingest
Search with Vector Index
npx mongodb-rag search "What is vector search?"

📚 Learn More

📖 Documentation
v

MongoDB-RAG © 2025. All rights reserved.