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

      Sunshine And March Vibes (2025 Wallpapers Edition)

      June 2, 2025

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

      June 2, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 2, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 2, 2025

      The Alters: Release date, mechanics, and everything else you need to know

      June 2, 2025

      I’ve fallen hard for Starsand Island, a promising anime-style life sim bringing Ghibli vibes to Xbox and PC later this year

      June 2, 2025

      This new official Xbox 4TB storage card costs almost as much as the Xbox SeriesXitself

      June 2, 2025

      I may have found the ultimate monitor for conferencing and productivity, but it has a few weaknesses

      June 2, 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

      May report 2025

      June 2, 2025
      Recent

      May report 2025

      June 2, 2025

      Write more reliable JavaScript with optional chaining

      June 2, 2025

      Deploying a Scalable Next.js App on Vercel – A Step-by-Step Guide

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

      The Alters: Release date, mechanics, and everything else you need to know

      June 2, 2025
      Recent

      The Alters: Release date, mechanics, and everything else you need to know

      June 2, 2025

      I’ve fallen hard for Starsand Island, a promising anime-style life sim bringing Ghibli vibes to Xbox and PC later this year

      June 2, 2025

      This new official Xbox 4TB storage card costs almost as much as the Xbox SeriesXitself

      June 2, 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

    ⚡ Weekly Recap: APT Intrusions, AI Malware, Zero-Click Exploits, Browser Hijacks and More

    June 2, 2025
    Security

    Exploitation Risk Grows for Critical Cisco Bug

    June 2, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Xojo 2025r1: Big Updates for Developers with Linux ARM Support, Web Drag and Drop, and Direct App Store Publishing

    Learning Resources

    Flask vs FastAPI: Which Python Web Framework Fits Your Project Best?

    Development

    Cognita: An Open Source Framework for Building Modular RAG Applications

    Development

    Katharine Hayhoe: The most important climate equation | Starmus highlights

    Development

    Highlights

    CVE-2025-2774: Webmin Vulnerability Allows Root-Level Privilege Escalation

    May 3, 2025

    CVE-2025-2774: Webmin Vulnerability Allows Root-Level Privilege Escalation

    Webmin, a popular web-based system administration tool used to manage Unix-like servers and various services with approximately 1,000,000 yearly installations worldwide, has been found to contain a cr …
    Read more

    Published Date:
    May 04, 2025 (1 hour, 1 minute ago)

    Vulnerabilities has been mentioned in this article.

    Can one combine FlaUI and Selenium?

    May 2, 2025

    Meet QAnything: A Local Knowledge-Based Question-Answering AI System Designed to Support a Wide Range of File Formats and Databases, Allowing for Offline Installation and Use

    April 13, 2024

    CodeSOD: Objectifying Yourself

    April 28, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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