# LangSmith

> Production-grade observability and evaluation platform for LLM applications from LangChain, providing tracing, debugging, prompt evaluation, and performance monitoring for reliable LLM workflows in development and production.

- **URL:** https://www.langchain.com/langsmith
- **Category:** LLM Tools
- **Tags:** observability, debugging, Langchain
- **Updated:** 2026-03-14 12:39
- **Canonical page:** https://vectordb.ever.works/th/items/langsmith

## Details

## Overview

LangSmith is a product created by the LangChain team designed specifically for observability of LLM-powered applications. LangSmith brings powerful observability to LangChain apps with tracing, prompt evaluation, and performance monitoring, helping developers debug faster, improve output quality, and ensure reliable LLM workflows in production.

## Key Features

### Tracing

Traces allow you to review the chain of prompts, model outputs, tool calls, etc., worth its weight in gold when debugging complicated chains.

**Benefits**:
- Structured timeline of steps
- See exactly what happened, in what order, and why
- Track inputs, outputs, and intermediate states
- Monitor token usage and costs

### Evaluation

**Development**: Run evaluations on curated datasets during development to compare versions, benchmark performance, and catch regressions.

**Production**: Monitor real user interactions in real-time to detect issues and measure quality on live traffic.

### Debugging

Provides visibility into each step of LLM chain execution:
- Input validation
- Prompt processing
- Output generation
- Error pinpointing

**Identifies Issues**:
- Validation logic failures
- LLM execution problems
- Output parsing errors
- Prompt failures

## Framework Compatibility

**Framework-agnostic**: Use with LangChain, LangGraph, or custom code.

You don't need to build your agent on LangChain to take advantage of LangSmith's tracing and evaluation features.

## Setup

### Environment Variables

```bash
export LANGCHAIN_TRACING_V2="true"
export LANGCHAIN_API_KEY="your-api-key"
export LANGCHAIN_PROJECT="your-project-name"
```

### Python Integration

```python
import os
os.environ["LANGCHAIN_TRACING_V2"] = "true"
os.environ["LANGCHAIN_API_KEY"] = "lsv2_..."

# Use @traceable decorator
from langsmith import traceable

@traceable
def my_function(input_text):
    # Your LLM logic
    return result
```

## Key Capabilities

### Dataset Management

- Create evaluation datasets
- Version control for test cases
- Ground truth labeling
- Automated dataset generation

### Performance Monitoring

- Latency tracking
- Token usage analytics
- Cost monitoring
- Error rate tracking

### A/B Testing

- Compare prompt versions
- Evaluate model variants
- Measure improvements
- Statistical significance

### Feedback Collection

- User feedback integration
- Automated evaluation scores
- Custom feedback functions
- Quality metrics

## Use Cases

- **Development**: Debug complex chains, optimize prompts
- **Testing**: Evaluate on datasets, regression testing
- **Production**: Monitor live traffic, detect issues
- **Optimization**: Compare versions, improve quality

## Dashboard Features

- **Trace Viewer**: Visualize execution flows
- **Comparison View**: Side-by-side evaluation
- **Analytics**: Performance metrics and trends
- **Annotations**: Add notes and feedback
- **Sharing**: Collaborate with team members

## Integration

- **Native**: LangChain, LangGraph
- **API**: REST API for custom integrations
- **SDKs**: Python, JavaScript/TypeScript
- **CI/CD**: GitHub Actions, GitLab CI

## Advantages

- **Production-Ready**: Built for scale
- **Comprehensive**: Covers full development lifecycle
- **Easy Setup**: Simple environment variable configuration
- **Flexible**: Works with any framework
- **Collaborative**: Team features and sharing

## Resources

- **Platform**: https://www.langchain.com/langsmith
- **Documentation**: https://docs.langchain.com/langsmith
- **Tutorials**: Multiple guides and examples
- **Community**: Active support forums

## Pricing

- **Free Tier**: Available for development and small projects
- **Pro**: Enhanced features and higher limits
- **Enterprise**: Custom pricing for large-scale deployments

---

_This Markdown mirror is generated by Ever Works for AI agents. The canonical HTML page is at https://vectordb.ever.works/th/items/langsmith._
