Explore LangSmith feedback implementation examples
mainThe LangSmith cookbook provides several patterns for harnessing user feedback, AI-assisted feedback, and other signals to improve and monitor applications. You can explore these patterns through the following implementations:
Python / Streamlit Examples
- Minimal Chat App: A Streamlit application that captures user feedback and shares traces. It includes both a
vanilla_chain.py(usingLLMChain) and anexpression_chain.py(using LangChain Expression Language). - Real-time RAG Chat Bot Evaluation: A Streamlit walkthrough demonstrating how to automatically check for hallucinations in RAG responses against retrieved documents.
- LangChain Agents: An implementation showing how to instrument a web-search agent with tracing and human feedback.
TypeScript / Next.js Examples
- Next.js Chat App: A simple TypeScript chat application demonstrating tracing and feedback capture.
Automated & Algorithmic Feedback
- Algorithmic Feedback Pipeline: An automated approach to feedback metrics for monitoring and performance tuning.
- Real-time Automated Feedback: Uses an async callback to automatically generate feedback metrics for every run, allowing for real-time evaluation of production runs.