Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      June 4, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 4, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 4, 2025

      Smashing Animations Part 4: Optimising SVGs

      June 4, 2025

      I test AI tools for a living. Here are 3 image generators I actually use and how

      June 4, 2025

      The world’s smallest 65W USB-C charger is my latest travel essential

      June 4, 2025

      This Spotlight alternative for Mac is my secret weapon for AI-powered search

      June 4, 2025

      Tech prophet Mary Meeker just dropped a massive report on AI trends – here’s your TL;DR

      June 4, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Beyond AEM: How Adobe Sensei Powers the Full Enterprise Experience

      June 4, 2025
      Recent

      Beyond AEM: How Adobe Sensei Powers the Full Enterprise Experience

      June 4, 2025

      Simplify Negative Relation Queries with Laravel’s whereDoesntHaveRelation Methods

      June 4, 2025

      Cast Model Properties to a Uri Instance in 12.17

      June 4, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      My Favorite Obsidian Plugins and Their Hidden Settings

      June 4, 2025
      Recent

      My Favorite Obsidian Plugins and Their Hidden Settings

      June 4, 2025

      Rilasciata /e/OS 3.0: Nuova Vita per Android Senza Google, Più Privacy e Controllo per l’Utente

      June 4, 2025

      Rilasciata Oracle Linux 9.6: Scopri le Novità e i Miglioramenti nella Sicurezza e nelle Prestazioni

      June 4, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Databases»Checkpointers and Native Parent Child Retrievers with LangChain and MongoDB

    Checkpointers and Native Parent Child Retrievers with LangChain and MongoDB

    February 26, 2025

    MongoDB and LangChain, the company known for its eponymous large language model (LLM) application framework, are excited to announce new developments in an already strong partnership. Two additional enhancements have just been added to the LangChain codebase, making it easier than ever to build cutting-edge AI solutions with MongoDB.

    Checkpointer support

    In LangGraph, LangChain’s library for building stateful, multi-actor applications with LLMs, memory is provided through checkpointers. Checkpointers are snapshots of the graph state at a given point in time. They provide a persistence layer, allowing developers to interact and manage the graph’s state. This has a number of advantages for developers—human-in-the-loop, “memory” between interactions, and more.

    Figure adapted from “Launching Long-Term Memory Support in LangGraph”. LangChain Blog. Oct. 8, 2024. https://blog.langchain.dev/launching-long-term-memory-support-in-langgraph/

    MongoDB has developed a custom checkpointer implementation, the “MongoDBSaver” class, that, with just a MongoDB URI (local or Atlas), can easily store LangGraph state in MongoDB. By making checkpointers a first-class feature, developers can have confidence that their stateful AI applications built on MongoDB will be performant.

    That’s not all, since there are actually two new checkpointers as part of this implementation—one synchronous and one asynchronous. This versatility allows the new functionality to be even more versatile, and serving developers with a myriad of use cases.

    Both implementations include helpful utility functions to make using them painless, letting developers easily store instances of StateGraph inside of MongoDB. A performant persistence layer that stores data in an intuitive way will mean a better end-user experience and a more robust system, no matter what a developer is building with LangGraph.

    Native parent child retrievers

    Second, MongoDB has implemented a native parent child retriever inside LangChain. This approach enhances the performance of retrieval methods utilizing the retrieval-augmented Generation (RAG) technique by providing the LLM with a broader context to consider.

    In essence, we divide the original documents into relatively small chunks, embed each one, and store them in MongoDB. Using such small chunks (a sentence or a couple of sentences) helps the embedding models to better reflect their meaning.

    Now developers can use “MongoDBAtlasParentDocumentRetriever” to persist one collection for both vector and document storage. In this implementation, we can store both parent and child documents in a single collection while only having to compute and index embedding vectors for the chunks. This has a number of performance advantages because storing vectors with their associated documents means no need to join tables or worry about painful schema migrations.

    Additionally, as part of this work, MongoDB has also added a “MongoDBDocStore” class which provides many helpful utility functions. It is now easier than ever to use documents as a key-value store and insert, update, and delete them with ease. Taken together, these two new classes allow developers to take full advantage of MongoDB’s abilities.

    MongoDB and LangChain continue to be a strong pair for building agentic AI—combining performance and ease of development to provide a developer-friendly experience. Stay tuned as we build out additional functionality!

    To learn more about these LangChain integrations, here are some resources to get you started:

    • Check out our tutorial.

    • Experiment with checkpointers and native parent child retrievers to see their utility for yourself.

    • Read the previous announcement with LangChain about AI Agents, Hybrid Search, and Indexing.

    Source: Read More

    Hostinger
    Facebook Twitter Reddit Email Copy Link
    Previous ArticleCommerce at Scale: Zepto Reduces Latency by 40% With MongoDB
    Next Article Building Gen AI with MongoDB & AI Partners | November 2024

    Related Posts

    Security

    HPE StoreOnce Faces Critical CVE-2025-37093 Vulnerability — Urges Immediate Patch Upgrade

    June 4, 2025
    Security

    Google fixes Chrome zero-day with in-the-wild exploit (CVE-2025-5419)

    June 4, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Midjourney Prompt for Jewelry: 26 Eye-Catching Ideas

    Development

    Enhance database performance with Amazon RDS dedicated log volumes

    Databases

    Unlocking the Power of Azure Integration Services for the Financial Services Industry

    Development

    Nuxt.js website ready for deployment with Vue.js and Cosmic CMS

    Development
    Hostinger

    Highlights

    Shifting the sands of RansomHub’s EDRKillShifter

    April 10, 2025

    ESET researchers discover new ties between affiliates of RansomHub and of rival gangs Medusa, BianLian,…

    How to Download Karafun Player for Windows PC [2025 Guide]

    May 23, 2025
    Error’d: Sentinel Headline

    Error’d: Sentinel Headline

    April 11, 2025

    Rilasciato Mozilla Firefox 135: Novità, Sicurezza e Ottimizzazioni da Conoscere

    February 3, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.