LangSmith 同时支持分类指标和数值指标,在编写自定义评估器时,您可以返回任意一种类型。 若要将评估器结果记录为数值指标,必须返回以下形式之一:Documentation Index
Fetch the complete documentation index at: https://langchain-zh.cn/llms.txt
Use this file to discover all available pages before exploring further.
- (仅限 Python)
int、float或bool类型 - 形式为
{"key": "metric_name", "score": int | float | bool}的字典
- (仅限 Python)
str类型 - 形式为
{"key": "metric_name", "value": str | int | float | bool}的字典
- Python:需要
langsmith>=0.2.0 - TypeScript:
langsmith@0.1.32及以上版本支持多分数返回
相关链接
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

