avatarLaxfed Paulacy

Summary

LangSmith, a platform for developing, monitoring, and testing Large Language Model (LLM) applications, has been released for general availability with features supporting the entire application lifecycle, from prototyping to production, and is set to introduce further enhancements.

Abstract

LangSmith, a comprehensive platform for LLM application development, has reached general availability (GA) and offers a suite of tools to support developers throughout the application lifecycle. It facilitates prototyping with a playground for experimentation, debugging tools, and initial test set creation. The platform also provides a comparison view for evaluating different models and supports rapid iteration. During beta testing, LangSmith aids in collecting user feedback, annotating traces, and adding runs to datasets to refine application performance. In the production phase, it offers monitoring capabilities, A/B testing, and performance overviews. Future updates aim to include regression testing support, online evaluators for production data, improved filtering, and enhanced conversation support, along with easy deployment options and enterprise-level administrative and security features.

Opinions

  • The platform is designed to address the practical needs of LLM application development, acknowledging the differences between theory and practice.
  • LangSmith's development is influenced by user feedback, indicating a commitment to continuous improvement and user-centric design.
  • The inclusion of monitoring and A/B testing features in production suggests a focus on performance optimization and user satisfaction.
  • The planned enhancements reflect an anticipation of the evolving needs of developers and businesses in the LLM application space.
  • The platform's ability to handle various stages of the LLM application lifecycle implies a holistic approach to application development, emphasizing efficiency and effectiveness from conception to deployment.

LANGCHAIN — What Is the User Langsmith-ga?

A good programmer is someone who always looks both ways before crossing a one-way street. — Doug Linder.

Langsmith-ga is a user of LangChain, a platform for LLM (Large Language Models) application development, monitoring, and testing. LangSmith has been announced as generally available (GA) and has undergone significant improvements based on user feedback.

The platform, LangSmith, supports various stages of the LLM application lifecycle, from prototyping to production. It provides features for debugging, initial test set creation, comparison view, and playground for rapid iteration during the prototyping phase.

During beta testing, LangSmith facilitates collecting feedback, annotating traces, and adding runs to a dataset to refine and improve performance.

In the production phase, LangSmith supports monitoring, A/B testing, and provides a high-level overview of application performance with respect to latency, cost, and feedback scores.

Looking ahead, LangSmith aims to enhance the platform with features such as support for regression testing, online evaluators for production data, better filtering and conversation support, easy deployment of applications with hosted LangServe, and enterprise-level features for administration and security needs.

Developers can sign up for LangSmith to leverage its capabilities for their LLM application development workflows.

The following are code snippets and examples of the features and functionalities provided by LangSmith for various stages of the LLM application development lifecycle.

Prototyping

Debugging

# Enable LangSmith tracing
langsmith.enable_tracing()

# Inspect a trace from an LLM application run
trace_id = "12345"
langsmith.inspect_trace(trace_id)

Initial Test Set

# Create a dataset for test cases
test_set = langsmith.create_dataset("Test Set 1")

# Upload test cases
test_cases = {
    "input1": "output1",
    "input2": "output2"
}
langsmith.upload_test_cases(test_set, test_cases)

# Run custom evaluations
langsmith.run_custom_evaluation(test_set)

Comparison View

# View test runs side by side
test_run1 = langsmith.run_test_case(prompt1, model1)
test_run2 = langsmith.run_test_case(prompt1, model2)
langsmith.compare_test_runs(test_run1, test_run2)

Playground

# Open the playground for rapid iteration and experimentation
prompt = "Generate text based on this prompt"
model = "GPT-3"
langsmith.open_playground(prompt, model)

Beta Testing

Collecting Feedback

# Attach feedback scores to logged traces
trace_id = "12345"
feedback_score = 3.5
langsmith.attach_feedback(trace_id, feedback_score)

# View results in LangSmith
langsmith.filter_traces_by_feedback_score(3.5)
langsmith.inspect_trace(trace_id)

Annotating Traces

# Send runs to annotation queues
interesting_traces = [trace1, trace2, trace3]
langsmith.send_to_annotation_queue(interesting_traces)

Adding Runs to a Dataset

# Add runs as examples to datasets
langsmith.add_runs_to_dataset(test_set, [run1, run2, run3])

Production

Monitoring and A/B Testing

# View monitoring charts and group by LLM type
langsmith.view_monitoring_charts()
langsmith.group_by_identifier("Version1")
langsmith.group_by_identifier("Version2")

This tutorial provides a brief overview of how LangSmith can be used for different stages of LLM application development, along with corresponding code snippets for integrating LangSmith functionalities into the development workflow.

ChatGPT
User
Langchain
Recommended from ReadMedium