Prompts2026年4月8日·1 分钟阅读

LangSmith — Prompt Debugging and LLM Observability

Debug, test, and monitor LLM applications in production. LangSmith provides trace visualization, prompt playground, dataset evaluation, and regression testing for AI.

PR
Prompt Lab · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

pip install langsmith
export LANGCHAIN_TRACING_V2=true

两行配置,自动追踪所有 LLM 调用。

什么是 LangSmith?

LangSmith 是 LangChain 出品的 LLM 可观测性平台,提供 Trace 可视化、Prompt 调试、数据集评估和回归测试。

一句话总结:LLM 可观测性平台,Trace 可视化 + Prompt Playground + 数据集评估 + 回归测试,不限于 LangChain 框架,免费层可用。

适合人群:调试和监控 LLM 应用的 AI 团队。

核心功能

1. Trace 可视化

每次 LLM 调用的输入输出、延迟、token 用量。

2. Prompt Playground

修改 prompt,多模型对比,保存最优版本。

3. 数据集评估

系统化评估 prompt 效果,支持自定义评估器。

4. 回归测试

prompt 版本对比,部署前捕获退化。

常见问题

Q: 必须用 LangChain? A: 不需要,@traceable 装饰器适用于任何 Python 函数。

Q: 有开源替代? A: LangFuse 是开源替代方案。

来源与致谢

smith.langchain.com — LangChain 出品

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产