![[Week of 5/13] LangChain Release Notes](https://blog.langchain.dev/content/images/2024/05/Release-Notes5.13.png)
It’s been a garden in bloom here at LangChain. LangChain v0.2 is just around the corner, and LangSmith now has enhanced security & compliance and new features like pairwise evaluation. The "Speak the Lang" section highlights real-life use cases — and we've also added dedicated airtime for our partners and community content contributors. Happy reading!
Product Updates
LangChain
🚀 With the pre-release of LangChain v0.2, we’ve decoupled the langchain
package from langchain-community
to improve the stability and security of langchain
.
With v0.2, you can look forward to:
- Versioned docs with improved discoverability, so you can match information and instructions with your minor version
- LangGraph as the recommended way to build agents, which makes it easy to define cycles and built-in memory — and then customize and modify them
Since our first stable library version, v0.1, we’ve also made improvements to:
- Standard chat model features, including standardized tool calling support and an interface for structuring output
- Async support for many core abstractions
- Streaming support with a new Event Streaming API
- Partner packages for 20+ providers across Python and JavaScript packages
We’d love your feedback on GitHub Discussions. See here for docs on how to migrate to LangChain v0.2.
LangSmith
🌍 LangSmith is now GDPR compliant.
LangSmith — our unified developer platform for building, testing, and monitoring LLM applications — is now GDPR compliant. Security and compliance are important to us and our growing list of enterprise customers. We’re thrilled to be able to serve everyone more effectively.
🔒Role Based Access Control (RBAC) is now available for enterprise customers.
Admins can now assign roles to users in their organization with RBAC in LangSmith. Create/edit custom roles with granular permissions to determine who can access resources.
![[Week of 5/13] LangChain Release Notes](https://blog.langchain.dev/content/images/2024/05/Screenshot-2024-05-07-at-4.56.08-PM-1.png)
We've also introduced revamped API Keys to support access control. These include:
- Personal Access Tokens, which are scoped to a user's permissions
- Service Keys, which are for services accessing the LangSmith API (and not impacted by organization changes like user removal)
This feature is available to users on our Enterprise plan. Please reach out to speak with a LangSmith expert.
🍐 Pairwise Evaluation lets you choose between outputs intelligently when testing text generation or chat.
For LLM use cases like text generation or chat (where there may not be a single "correct" answer), picking a preferred response with pairwise evaluation can be an effective approach.
![[Week of 5/13] LangChain Release Notes](https://blog.langchain.dev/content/images/2024/05/pairwise.gif)
LangSmith’s pairwise evaluation lets you (1) define a custom pairwise LLM-as-judge evaluator with any desired criteria and (2) compare two LLM generations using this evaluator.
Dive into our video tutorial to walk through an example of how to use custom pairwise evaluators in LangSmith, or check out the docs.
Bonus: Need to backtest on your production logs? This video shows how pairwise evaluation can also help you compare different versions of your app runs to the baseline production app.
🛠️ Personal prompts are now easier to access and manage with a new home separate from LangChain Hub.
Your organization's prompts are now separate from the LangChain Hub. Organize and pull existing prompts by their commit versions — so you can track the performance of different versions of the same prompt and debug any issues quickly.
All publicly shared prompts are still there in the bottom sidebar of LangSmith in the public hub. Happy prompting!
Speak the Lang
Multi-agent applications
LangGraph is the name, multi-agent is the game. By employing multiple independent agents in your LLM workflow, you can solve more complex problems. Here’s some usable techniques to solve user challenges with the LangGraph library.
📝 Build an autonomous research assistant with GPT Researcher and LangGraph
Assaf Elovic (Head of R&D at Wix) gives a step-by-step walkthrough on how flow engineering and multi-agent collaboration can help automate in-depth research on any given topic — from architecture to run.
![[Week of 5/13] LangChain Release Notes](https://blog.langchain.dev/content/images/2024/05/1_ABcpKZRWsJRb9MIpkJ0htQ-1.webp)
In his example, an average run generates a customizable 5-6 page research report in multiple formats such as PDF, Docx and Markdown. Try it out yourself here!
🤖 Build a customer support bot in LangGraph
Starting with a zero-shot agent, watch this video to learn how to design and build a customer support bot that helps you research and manage bookings for flights, transportation, hotels, and excursions.
You’ll see how to add both expressiveness and control to your chatbot via: (1) user confirmations before taking actions, (2) grouping actions based on need for confirmation, and (3) factoring out tools into workflows for different user journeys.You can also follow along with the project code and docs.
⏪ Multi-agent RAG, from scratchpad to live app
Hear from the AI Makerspace co-founders in this livestream recording as they show how they coordinate agents, each with their own scratchpads, under a supervisor that manages the final applications. In this example, they set up a Research team and Docs team to create a technical blog in tip-top shape — all using LangGraph.
Evaluations: Using GPT-4o, RAG, and more
⚡Testing the new GPT-4o with LangSmith
With our support for OpenAI’s newest "omni" model, GPT-4o, you can evaluate GPT4o against older OpenAI models to see if it’s safe to upgrade.
In this 8-min video, we test the new GPT-4o with a simple RAG app on a dataset of 20 questions related to LangChain documentation. Spoilers: our regression testing showed GPT-4o had modest improvement (2%) on RAG accuracy and notable improvement (29%) on p50 latency. With reported ~50% cost decrease, we could safely upgrade in this use case.
![[Week of 5/13] LangChain Release Notes](https://blog.langchain.dev/content/images/2024/05/gpt-4o--2.gif)
Play around with the dataset and customize this eval to your own app with RAG eval in LangSmith.
You can use the multimodal capabilities of GPT-4o in any of your LangChain applications today. Check out our Python and JavaScript docs for more.
🤔 Intermediate steps of RAG evaluation
For some pipelines like RAG (Retrieval Augmented Generation), evaluating both the pipeline output (i.e. final answer) and output of intermediate steps may be necessary. But how do you isolate and evaluate the outputs of intermediate steps?
In our latest video in the evaluation video series, learn how to use LangSmith to independently evaluate any step in your RAG pipeline — including intermediate steps, such as document retrieval — and debug better.
Partnerships
Hugging Face partner package: langchain-huggingface
We're excited to announce the launch of langchain-huggingface
, a partner package in LangChain jointly maintained with Hugging Face.
LangChain users can now reliably connect to and access Hugging Face features. These include chat, text completion, and embedding models for both local & hosted instances. Read more in this blog post.
Qdrant partner package: langchain-qdrant
With langchain-qdrant
, LangChain users can connect to the Qdrant vector store. LangChain now supports in memory, API, or hybrid cloud deployments of Qdrant. Check out both the Python and JavaScript packages.
Redis & LangChain Multimodal RAG template
This blog post introduces multimodal RAG, walks through a template setup, and shows a few sample queries and the benefits of allowing models to process and reason across both text and images to build more nuanced LLM apps.
Bonus: LangChain is MongoDB’s AI App Framework Partner of the Year!
From the Community
Videos:
- Building LLM Agents with Tool Use by Jay Alammar at Cohere
- Flow engineering with LangGraph: GPT Newspaper by Eden Marco (with repo built by Rotem Weiss)
Blogs:
- Two underestimated LangChain features to create production-ready configurable chains by Rav on Metadocs
- Using Server-Sent Events (SSE) to stream LLM responses in Next.js by Rishi Jain, founder at LaunchFa.st
- LangChain Chatbot Framework With Retrievers by Cobus Greyling, Chief Evangelist at Kore AI
- Tips for Building a RAG Pipeline with NVIDIA AI LangChain AI Endpoints by Amit Bleiweiss, Sr. Data Scientist at NVIDIA
Courses:
- Prompt engineering LinkedIn course by Harpreet Sahota
GitHub Projects & Notebooks:
- Build a RAG system with Llama 3B-Instruct for your PDFs by Maria Khalusova at Unstructured
- Cohere toolkit for building RAG apps
- WebRTC AI Voice Chat with LangChain
How can you follow along with all the hullabaloo? Check out the LangChain blog and YouTube channel for even more product and content updates.
You can also join the discussion in our Discord or get support by emailing us at [email protected].