langsmith-cookbook  by langchain-ai

Cookbook for LangSmith, a tool to debug, evaluate, test, and improve LLM apps

Created 2 years ago
962 stars

Top 38.3% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This repository provides practical recipes and real-world use-cases for LangSmith, a platform for debugging, evaluating, and improving LLM applications. It targets developers and researchers working with LLMs, offering guidance on tracing, testing, feedback integration, and optimization.

How It Works

The cookbook demonstrates how to leverage LangSmith's Python SDK and REST API for comprehensive LLM application monitoring. It covers tracing code independently of LangChain using the @traceable decorator, customizing run names for UI clarity, and including nested tool calls within traces. The examples showcase advanced techniques like prompt versioning, end-to-end RAG pipeline evaluation with metrics like RAGAS, and agent intermediate step analysis.

Quick Start & Requirements

Highlighted Details

  • Comprehensive evaluation recipes for RAG, chatbots, extraction, agents, and multimodal models.
  • Techniques for incorporating user and automated feedback to improve LLM applications.
  • Examples for prompt bootstrapping and iterative optimization using human feedback and LLMs.
  • Recipes for exporting data for LLM fine-tuning, including OpenAI format and Lilac dataset curation.

Maintenance & Community

  • Actively maintained by the LangChain development team.
  • Community contributions are encouraged via GitHub issues.
  • Links to community resources are available in the main LangChain documentation.

Licensing & Compatibility

  • The repository itself is likely under a permissive license (e.g., MIT), but it demonstrates usage of LangSmith, which has its own terms. LangChain components are typically MIT licensed.

Limitations & Caveats

  • Some advanced features and examples may require specific paid tiers of LLM services or LangSmith.
  • JavaScript/TypeScript examples are noted as being under development with fewer initial offerings compared to Python.
Health Check
Last Commit

1 month ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
9 stars in the last 30 days

Explore Similar Projects

Starred by Luis Capelo Luis Capelo(Cofounder of Lightning AI), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
6 more.

opik by comet-ml

1.7%
14k
Open-source LLM evaluation framework for RAG, agents, and more
Created 2 years ago
Updated 14 hours ago
Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), and
20 more.

dify by langgenius

0.5%
114k
Open-source LLM app development platform
Created 2 years ago
Updated 14 hours ago
Feedback? Help us improve.