Integrate LangSmith

1. What is LangSmith

LangSmith is a platform for building production-grade LLM applications. It is used for developing, collaborating, testing, deploying, and monitoring LLM applications.

Introduction to LangSmith: https://www.langchain.com/langsmith


2. How to Configure LangSmith

  1. Register and log in to LangSmith on the official website

  2. Create a project in LangSmith. After logging in, click New Project on the homepage to create your own project. The project will be used to associate with applications in Dify for data monitoring.

Once created, you can view all created projects in the Projects section.

  1. Create project credentials. Find the project settings Settings in the left sidebar.

Click Create API Key to create project credentials.

Select Personal Access Token for subsequent API authentication.

Copy and save the created API key.

  1. Configure LangSmith in the Dify application. Open the application you need to monitor, open Monitoring in the side menu, and select Configure on the page.

After clicking configure, paste the API Key and project name created in LangSmith into the configuration and save.

The configured project name needs to match the project set in LangSmith. If the project names do not match, LangSmith will automatically create a new project during data synchronization.

Once successfully saved, you can view the monitoring status on the current page.

3. Viewing Monitoring Data in LangSmith

After configuration, debugging or production data of the application in Dify can be viewed in LangSmith.

Last updated