Building a Production Ready LLM Application using MongoDB Atlas

megha.arora@mongodb.com


2

Votes

Description:

Building a Production Ready LLM Application using MongoDB Atlas

With the advent of generative AI and rapid advancement of commercial and open-source LLMs, everyone wants to create unique and compelling hyper-personalized customer experiences such as semantic search or user content driven predictions. However, transitioning these applications from prototype to production-ready solutions might be a daunting task and pose a significant challenge for developers! To address these challenges, developers require a flexible data platform capable of adapting to ever-changing unstructured and structured data without rigid schemas. While fine-tuning remains an option, it comes with its limitations. Instead, developers need to present data as context to large models through prompts and empower generative models with long-term memory. In this session, let’s explore how MongoDB Atlas integrates operational, analytical, and vector search data services, streamlining the seamless integration of LLMs (Large Language Models) and transformer models into your applications. This not only simplifies the application architecture but also empowers developers to build gen AI-enriched applications on a high performance, highly scalable operational database

We will broadly cover two use cases:

  • LLM powered 'Retrieval Augment Generation': How to leverage Atlas Vector Search to bring the power of LLMs to your private data, using tools like Langchain
  • Sentiment Analysis: How to set up Atlas Triggers to automatically predict the sentiment of new documents in your MongoDB database and add them as additional fields to your documents.

The hands-on workshop will show

  1. Python Application or a Python notebook integrating LLM Development Framework LangChain, with MongoDB Atlas Vector Search (using langchain vector stores)
  2. how to get started MongoDB Atlas cluster and load some sample data in it.
  3. how to connect to MongoDB Atlas using pymongo (python driver for MongoDB)
  4. how we create a new collection using a sample dataset with the help of Langchain document_loaders and create vector embeddings using OpenAI and store those in MongoDB documents
  5. how to create a vector search index using the MongoDB Atlas GUI
  6. perform MongoDB Atlas Vector search using LangChain vectorstores (KNN search using Approximate Nearest Neighbors algorithm which uses the Hierarchical Navigable Small World (HNSW) graphs)
  7. how to react data updates/insert in real time using Atlas Triggers
  8. Feed the vector search results to ChatGPT using Retrival Plugin using langchain Reference
  9. we also will be comparing textual using pymongo and TEXT search index and fuzzy search with semantic search
  10. and see How retrieval architecture helps

Key takeaways from the session:

  • How to get started building gen-AI and LLM Applications
  • Introduction to the complete developer data platform MongoDB Atlas and Atlas Vector Search (Preview)
  • Understanding the various integrations possible with popular LLMs
  • Introduction to Atlas Triggers and event driven architecture
  • Live demo of LangChain integrations and sentiment prediction using Hugging Face Transformer model

Please note : We will be using Python and Javascript for the workshop

This talk is suitable for developers and architects, and IT Decision Makers who are building or planning to build cloud-native applications and want to learn how MongoDB can help them achieve Gen AI capabilities with scalability, agility, and resilience.

Additional resources

Prerequisites:

  • Python: Beginner to Intermediate
  • Javascript: Good to have; Beginner to Intermediate
  • Cloud technology : Any one, we will use AWS for this demo.

Video URL:

https://drive.google.com/file/d/1OjitS_yFwGC18qRxn0gkjYDAOGMseLJb/view?usp=drive_link

Content URLs:

Plan to make one single resource for the entire workshop

Speaker Info:

I have around 12 years of industry experience in engineering roles across different domains with companies such as Apple, Microsoft, Samsung and Makemytrip India and post which I have forayed into Dev Advocacy with MongoDB and is the first dev rel engineer to be hired for APAC region. When it comes to tech, I like being part of system design discussions and developing from scratch, doing POCs and debugging. Apart from this I focus a lot on learning each day and chasing my passions of giving back to the community. I teach topics such as system design and mentor students in limited capacity.

Also, spoke at pyconf last year :)

Speaker Links:

https://techcommunity.microsoft.com/t5/apps-on-azure-blog/java-spring-boot-mongodb-atlas-app-on-azure-app-service/ba-p/3804121

https://www.youtube.com/watch?v=ghEdf6ZKRYE

Section: Data Science, AI & ML
Type: Talks
Target Audience: Intermediate
Last Updated: