RAG with MongoDB
Discover how to build Retrieval-Augmented Generation (RAG) applications with MongoDB. Learn to integrate vector search, optimize retrieval workflows, and enhance LLM-powered apps.
|
Upon completion of the RAG with MongoDB skill check, you will earn a Credly Badge that you are able to share with your network. |
Learning Objectives

Identify the Architecture of a RAG Application
Describe the components of a RAG application and understand how they interact with each other to make the most of your application.

Describe Chunking Strategies
Results from your RAG application are only as good as the data you give it, learn how to chunk data and prepare it for use in a RAG system.

Create a RAG Application
Build a RAG application with LangChain and MongoDB that can answer questions based on your own data.
Note: The AI models used this learning content, including LLMs and embedding models, are constantly evolving and may have been updated since its creation.
Parker Faucher| Senior Software Engineer
Parker is a Senior Software Engineer on the Education team at MongoDB. Prior to joining MongoDB, he helped maintain a world class developer bootcamp that was offered in multiple universities. He is a self taught developer who loves being able to give back to the community that has helped him so much.
Emily Pope | Senior Curriculum Designer
Emily Pope is a Senior Curriculum Designer at MongoDB. She loves learning and loves making it easy for others to learn how and when to use deeply technical products. Recently, she's been creating AI and vector search content for MongoDB University. Before that, she's created learning experiences on databases, computer science, full stack development, and even clinical trial design and analysis. Emily holds an Ed.M. in International Education Policy from Harvard Graduate School of Education and began her career as an English teacher in Turkiye with the Fulbright program.
Joel Lord | Lead, Curriculum Eng/Technologist
Joel Lord is a curriculum engineer at MongoDB who is committed to empowering developers through education and active community involvement. With more than twenty years of experience in software development, developer advocacy, and technical education, he combines extensive expertise with a dedication to making complex topics more understandable.
Holding a Bachelor of Science in computational astrophysics from Université Laval, Joel started his career in web development before he focused on assisting others in their learning journeys. At MongoDB, he develops educational materials designed to equip developers with the skills to build improved applications, drawing on his wide-ranging experience as a speaker at global conferences.
When he is not working, Joel enjoys stargazing in remote camping areas, experimenting with inventive brewing methods in his garage, and offering emotional support to his two cats, who often appear as guests during his Zoom meetings.
Harshad Dhavale | Staff Technical Services Engineer
Harshad Dhavale is a Staff Technical Services Engineer, who has been with MongoDB for over six years. He is a subject matter expert in Atlas Search and Atlas Vector Search, and has made significant contributions in these domains over his tenure. In addition to enablement, he has played a key role in numerous pivotal Atlas Search and Atlas Vector Search initiatives and projects, which have been instrumental in defining the product's trajectory. He is a trusted specialist on all things Search, and enjoys diving deep into complex Search topics.
Henry Weller | Product Manager
Henry Weller is the dedicated Product Manager for Atlas Vector Search, focusing on the query features and scalability of the service, as well as developing best practices for users. He helped launch Atlas Vector Search from Public Preview into GA in 2023, and continues to lead delivery of core features for the service. Henry joined MongoDB in 2022, and was previously a data engineer and backend robotics software engineer.
John McCambridge | Curriculum Engineer
John is a Curriculum Engineer on the University team at MongoDB. Before his work as a Curriculum Engineer, he was an instructor and teaching assistant for coding boot camps at UT (Austin), and UCLA. Additionally, he worked as a QA engineer for a startup called Coder and spent five years at Apple Inc. John is a passionate software engineer and educator who enjoys taking complex topics and making them digestible for the community.
Sarah Evans | Senior Curriculum Engineer
Sarah is a Senior Curriculum Engineer on the Curriculum team at MongoDB. Prior to MongoDB, she taught and developed curricula for developer bootcamps. Sarah has a MAT degree from Columbia University Teachers College and studied Software Engineering at Flatiron School in Chicago, IL.
Manuel Fontan Garcia | Senior Technologist, Education
Manuel is a Senior Technologist on the Curriculum team at MongoDB. Previously he was a Senior Technical Services Engineer in the Core team at MongoDB. In between Manuel worked as a database reliability engineer at Slack for a little over 2 years and then for Cognite until he re-joined MongoDB. With over 15 years experience in software development and distributed systems, he is naturally curious and holds a Telecommunications Engineering MSc from Vigo University (Spain) and a Free and Open Source Software MSc from Rey Juan Carlos University (Spain).
Daniel Curran | Senior Software Engineer
Daniel is a Senior Software Engineer at MongoDB. Before joining MongoDB, he worked as an Instructional Designer and Content Developer specialising in technical content for a host of international clients. Daniel's goal is to remove obstacles so learners can feel confident on their journey to become masters of MongoDB.
Katie Redmiles | Instructional Designer
Katie is a Instructional Designer at MongoDB. Before joining the Curriculum team, Katie worked on the University Enablement team developing Learning Bytes and instructional materials for the MongoDB for Academia program. Katie also worked within the Digital Learning Division at the Foreign Service Institute where she honed her skills at developing online learning for a global audience. Katie is passionate about making education accessible and engaging for everyone.
RAG is a well known technique used to contextualize responses that we now expect from chat bots and similar apps. My name is Katie. Henry and I will be your guides through this unit.
If you've been on the Internet in the past decade, you've likely interacted with a chat bot in some capacity.
Whether it's for customer service or one that your friends added to a group chat, chatbots have become ubiquitous.
It seems there's a chatbot for every use case. As artificial intelligence undergoes significant advancements, it's fostering the evolution of more complex and refined chatbots. AI powered chatbots are becoming a popular tool for interacting with customers, enhancing user experience with higher efficiency and personalized responses. Even here at MongoDB, we've begun to leverage these capabilities with the release of our documentation chatbot, which answers questions about how to use MongoDB.
But how does something like the MongoDB Docs chatbot differ from ChatGPT?
Good question. The backbone of the Docs chatbot in similar applications is Retrieval Augmented Generation, or RAG for short. RAG is a natural language processing technique that enables us to provide context to the LLM so it can generate better responses. The responses use our specific data, including our documentation and MongoDB University video scripts, like the one used for this video, so they're grounded in reality. While chatbots are a common implementation of RAG, RAG systems are not only used for chatbots.
RAG is a game changer in any task where providing the right information to an LLM can make the results smarter and more precise.
We use RAG to increase accuracy no matter what the task is. Don't worry if this is new to you. We'll start from scratch and explore what RAG is by building a simple application that answers questions using content from the little book of MongoDB. To do this, we'll first learn what RAG is and how it works.
Next, we'll take a moment to learn about different AI integrations and frameworks available to help us create a RAG application. Then, we'll learn how to prepare our data for the RAG application.
This involves identifying data sources, sanitizing the data, and splitting it into chunks, generating embeddings, and finally ingesting the data into MongoDB. After that, we'll implement the retrieval component of our RAG app, which takes advantage of Atlas Vector Search.
Finally, we'll implement the component that generates answers based on the question and context provided.
By the end of the skill, you'll understand how RAG works and how you can leverage it in your own application.
You'll also have a working RAG example that you can reference when you begin building your own GenAI applications.
You also have plenty of opportunities to practice what you learned by completing labs that present real world scenarios.
This way, you'll build your knowledge and get comfortable with the software at the same time.
When you're finished, you'll be ready to put your new skills to the test. To earn your badge, simply complete all the related content and then take the short skill check at the end. After passing it, you'll receive an official Credly badge via the email you provided.
Be sure to share your badge on LinkedIn to show off your new skills. Let's get started.
