[Week of 5/27] LangChain Release Notes

[Week of 5/27] LangChain Release Notes

LangChain v0.2 has versioned docs; LangSmith adds off-the-shelf evaluator prompts, plus dataset splits & repetitions. Also, check out our NVIDIA contest and NYC/SF meetups!

7 min read

Docs are refreshing, datasets are splitting, meetup spots are filling… and LangChain keeps a-going 🐎. In this edition, check out our versioned docs, plus dataset improvements and new off-the-shelf evaluators in LangSmith.

We also feature real use cases in “Speak the Lang” and partner activities - including a new contest with NVIDIA. And at the end, our community members lead with educational material (videos, blogs, and GitHub projects) that you can reference, whether you’re new to LangChain or an AI whiz. Happy reading!


Product Updates

💡
Highlighting the latest product updates and news for LangChain, LangSmith, and LangGraph

LangChain

📝 The LangChain v0.2 release has versioned docs, with clearer structure and content.

We’ve updated our docs for LangChain v0.2 to be separated into:

  • Tutorials: step-by-step guides on how to build specific applications (e.g. a chatbot, RAG app, or agent) from start to finish
  • How-to-guides: detailed instruction guides on how to do particular tasks (more in-depth, advanced)
  • Conceptual guides: glossary of terminology and techniques for new concepts or LangChain knowledge
  • API docs: detailed technical reference documentation

LangChain v0.2 docs walkthrough

Check out the new docs in Python and JavaScript, then give your feedback here. And to migrate your existing codebase, just follow our Python migration script or JavaScript/TypeScript migration script. 

📞 Multi-modal function calling in JavaScript lets you pass images, video, and audio and get back structured output

In our @langchain/google-genai or @langchain/google-vertexai packages, we’ve added function calling with structured output, which allows you to build more dependable applications with multimodal support — including images, audio, and video. Read more in the docs.

LangSmith

✂️ Dataset splits for evaluation and filtering/editing dataset examples

With dataset splits, it's easier to run evaluations on a subset of your data in LangSmith. You can tag examples with different split names, edit and add to splits, and filter on desired criteria.

Splits are useful when you have a dataset with multiple categories to evaluate separately. This allows you to test new use cases by adding examples to a separate split to test, while preserving your evaluation workflow.

In addition to splits, you can speed up finding relevant information with the following actions for your dataset examples:

Walk through an example of how to use dataset splits in this video.

🔁 Repetitions to build confidence in your experiment results

You can now run multiple repetitions of your experiment in LangSmith. This helps smooth out noise from variability introduced by your application or from your LLM-as-a-judge evaluator, so you can build more confidence in the results of your experiment.

In this video, learn how to evaluate on a dataset with repetitions. You can check the mean score across N repetitions, and also compare the outputs for variability across repetitions.

🔧 Off-the-shelf online evaluator prompts to catch bad retrieval and hallucinations for RAG

LangSmith’s online evaluator (LLM-as-judge) automatically runs on production traces with a customizable prompt and automation rules. Our new off-the-shelf evaluators give you a custom prompt that can:

  • Flag whether retrieved documents are relevant to the user input question (Document Relevance)
  • Check for hallucinations in the RAG response (Hallucination)
  • Check whether a RAG answer is helpful to address the question, with no ground truth answer required (Answer Helpfulness)
  • Flag upon specific criteria, such as for toxicity (Tagging)

Bonus: Watch this video or check out the docs to see how to establish guardrails using LangSmith to detect user inputs with PII or toxic queries.

💬 Manage private prompts without a handle

We’ve improved our SDK and LangSmith Prompts UI to make navigating prompts simpler. Now, only public prompts require a handle on creation. New accounts won’t need to create a LangChain Hub handle until a public prompt is made.

When pulling or pushing your own prompts via the SDK, you no longer need to specify your handle. For example, you can use hub.pull('prompt_name') instead of hub.pull('handle/prompt_name').


Upcoming Events

🎫
Meet up with LangChain enthusiasts, employees, and eager AI app builders at IRL events this coming month

🐻 June 18 (San Francisco): Berkeley LLM meetup. Calling all Berkeley PhD students, faculty, and alumni! Come learn about LangGraph, cool OSS projects built at UC Berkeley, and connect with likeminded peers working in LLMs. Sign up here.

🏙️ June 26 (NYC): LangChain and Elastic NYC meetup. Hear lightning talks, meeting some of the LangChain team, followed by networking, pizza, and refreshments. Sign up here.


Speak the Lang

🦜
Real-life use cases and examples of how folks have used LangChain, LangSmith, or LangGraph to build LLM apps with high-quality and accuracy — even in production

Auto-correction for agents

Reflective loops prompt your LLM to reflect on and critique its past actions, which can improve the quality and success rate of agents. Here’s how we’ve seen agents leverage self-correction to yield better results.

🌀 Self-correcting code assistants with LangGraph and Codestral

With the release of Codestral-22B (a code generation model trained on 80+ programming languages) from Mistral, we tested out building a self-corrective code assistant using Codestral with LangGraph.

Using ideas borrowed from an AlphaCodium paper, we show in this video how to use Codestral with structured output / tool use, unit testing in-the-loop, and error feedback to self-correct from mistakes. You can also follow along in our cookbook here.

🌐 Multi Agent Flow agent with reviewer auto-correction for Text-to-SQL

FlowiseAI’s new Multi Agent Flow features a team of agents collaborating on tasks. For text-to-SQL queries, the processing is as follows — a SQL Expert agent generates the query, an Executor agent runs it, and finally, a Reviewer agent auto-corrects it.

This system, along with function calling, multi-modality, API, and prompt input variables, uses a reflective loop to enhance output quality from long-running tasks.

0:00
/0:23

Financial analysis with agents

Reimagining the field of traditional financial analysis - from investments to expense tracking - is made possible with agents. Here’s a few great examples:

📈 Can a GPT4-powered AI agent be a good enough performance attribution analyst?

In his paper, Bruno Veras De Melo from New York Life Investments explores using LangChain agents to better assess the drivers of an investment portfolio’s success.

Using LangChain as a standard agent framework and prompt engineering techniques like Chain-of-Thought (CoT) and Plan of Solve (PS), he achieves 93% accuracy rates in analyzing performance drivers and 84% accuracy in QA exercises simulating official examination standards.

Bruno's chart shows 93% keyword reasoning accuracy from testing few-shot prompts

💸 LangGraph expense tracker

This project from Jan Willem Altink (Product Manager @ Esdec) shows how you can use LangGraph to manage your expenses. You can send pictures of invoices (via extraction) — the project then lets you structure and categorize expenses and put them in a database.


Collaboration & Integrations

🤝
We 💚 helping users leverage partner features in the ecosystem by using our integrations

Generative AI Agents Developer Contest by NVIDIA and LangChain

Create a text-based or multimodal agent using one or more of NVIDIA’s LLM stack and the LangChain or LangGraph framework. Then, share a <90 second video to social media and submit an entry form. Enter the contest now until June 17th. GPU prizes are at stake!

Code interpreter with Azure Container App Dynamic Sessions

The new LangChain integration with Dynamic Sessions lets you safely and reliably give your agents the ability to execute Python code. Read our blog post or watch our tutorial on building a data analyst with LangGraph and dynamic sessions.

Forced tool calls with Claude 3

Forced tool calling from Anthropic enables reliable tool calling for bind_tools and with_structured_output features in LangChain. Upgrade your langchain-anthropic package to try out these improvements in Python or in JavaScript.

Nomic Embed local support for Python

LangChain users can access an officially-supported local version of Nomic Embed. Dynamically switch between local and remote inference based on input size and complexity. Read more on how you can embed text while optimizing performance and cost.

☁️ 🦸 And a big thank you to Eden Marco for championing LangGraph at Google Cloud Summit last week!


From the Community

🗣️
See how our 1M+ developers and builders are using LangChain in their day-to-day. Thank you for always helping us build better!

Thinking about getting started with LangChain, but don’t know where to begin? Our community members have you covered. 😊

In the 14-min video below, David (Founder @ Decoder.sh) walks through how to build your first chain starting from the fundamentals — using templates, models, and runnables.

Speaking of videos… check out the tutorial below from Santiago Valdarrama (Co-founder @ Tideily) on how to build a RAG app from scratch. The RAG app is built using LangChain, Pinecone, and OpenAI and lets you ask questions about any YouTube video.

On your RAG journey, you may want to split/chunk documents to preserve content while asking questions — just look to Sudarshan Korala’s (Data Science Basics) tutorial.

If you’re exploring more advanced RAG concepts, you might be more interested in:

And if you’re hungry for more content, we have even more resources to keep you nourished.

More Videos:

More Blogs:

And, GitHub Projects:


How can you follow along with all the Lang Latest? 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 support@langchain.dev.