avatarLaxfed Paulacy

Summary

Mendable.ai utilizes LangSmith from LangChain to enhance the debugging and optimization of their AI-driven Tools & Actions module.

Abstract

Mendable.ai, a platform that employs AI to assist enterprise teams with technical inquiries, has integrated LangSmith, a debugging tool from LangChain, to refine their AI functionalities. This integration allows for detailed tracing of AI agent behavior, enabling Mendable.ai to debug, evaluate, and manage their large language model (LLM) applications more effectively. The debugging process involves visualizing AI agent runs to identify issues such as slow response times and suboptimal prompts, which are then addressed to improve performance. Additionally, Mendable.ai uses LangSmith to inspect custom tool inputs and outputs, ensuring the accuracy of the AI-generated content. The ability to save specific runs to a dataset facilitates the centralization of data for evaluation and optimization. Overall, LangSmith has provided Mendable.ai with valuable insights into their AI agents' operations, leading to enhanced precision and efficiency in their AI-driven functionalities.

Opinions

  • Mendable.ai considers the visibility into AI agent behavior provided by LangSmith to be crucial for debugging and managing their LLM apps.
  • The detailed visualization of AI agent runs offered by LangSmith is seen as essential for identifying and resolving performance issues.
  • Mendable.ai values the ease of access to tool inputs and outputs for both built-in and custom tools, which is vital for maintaining the quality of their AI-generated product components.
  • The capability to build datasets from specific agent runs is highly regarded by Mendable.ai for streamlining optimization experiments and centralizing data evaluation.
  • LangSmith's tools are deemed instrumental by Mendable.ai in understanding and improving the decision-making processes of their AI agents.

LANGCHAIN — How Mendable Leverages LangSmith to Debug Tools Actions

Programming isn’t about what you know; it’s about what you can figure out. — Chris Pine

Mendable.ai, a platform helping enterprise teams answer technical questions with AI, has been leveraging LangSmith, a debugging tool provided by LangChain, to ensure the precision and efficiency of their AI-driven functionalities, particularly in their Tools & Actions module. In this tutorial, we will explore how Mendable leverages LangSmith to debug Tools & Actions.

LangSmith Integration

Mendable.ai integrates LangSmith into their development process to gain visibility into the behavior of their AI agents. LangSmith allows them to debug, evaluate, and manage LLM apps swiftly and seamlessly. By enabling tracing in LangChain, Mendable.ai captures and visualizes the detailed hierarchy of their AI agent runs, including inputs, outputs, response times, and critical metrics.

// Enable tracing in LangChain
LangChain.enableTracing();

Debugging Process

Once connected to their Tools & Actions module, Mendable.ai quickly spotted issues that were previously invisible. By inspecting the detailed visualization of their AI agent runs, they were able to identify and address problems such as slow response times and prompt optimization.

// Inspect detailed visualization of agent runs
LangSmith.inspectAgentRuns();

Inspecting Tools

Mendable.ai found it crucial to have easy access to traces for inspecting tool inputs, especially for custom tools created by users. They ran experiments and quickly scrolled through LangSmith to ensure the accuracy of tool outputs and schemas, enabling them to improve the AI-generated part of their product.

// Inspect tool inputs and outputs
LangSmith.inspectToolInputsOutputs();

Building Datasets

With the need to save inputs/outputs for further evaluation, Mendable.ai utilized LangSmith to select specific runs and add them to their dataset. This allowed them to centralize their data and evaluate it using LangSmith, streamlining their optimization experiments.

// Add specific runs to the dataset
LangSmith.addToDataset(runs);

Conclusion

LangSmith’s debugging tools have been instrumental for Mendable.ai in gaining insight into how their Tools and Action AI agents think and act, ultimately improving their debugging process. By leveraging LangSmith, Mendable.ai has enhanced the precision and efficiency of their AI-driven functionalities. If you’re interested in accelerating your LLM development process, consider trying out LangSmith, especially if you’re already using LangChain in your pipeline.

In conclusion, with LangSmith’s debugging tools, Mendable.ai has been able to gain a clear understanding of their AI agents’ behavior, addressing issues and optimizing their Tools & Actions module effectively.

Remember, when working with LangSmith, enabling tracing and inspecting agent runs and tool inputs/outputs are crucial steps in gaining visibility and optimizing your AI-driven functionalities.

Langchain
Leverages
Tools
ChatGPT
Mendable
Recommended from ReadMedium