> ## 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）

目前仅 Python SDK 支持对现有实验进行评估。

运行实验后，您可能希望**在不重新运行应用程序的情况下添加新的评估指标**。这在您添加了新评估器或希望对现有结果应用不同评分标准时非常有用。您无需在所有示例上重新执行目标函数，而是可以直接评估现有实验的追踪记录。

要向现有实验添加评估器，请将实验名称或 ID 传递给 `evaluate()` / `aevaluate()`，而不是目标函数。评估器将在原始实验的缓存追踪记录上运行，访问已记录的输入、输出以及任何中间步骤。

## 示例

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langsmith import evaluate

def always_half(inputs: dict, outputs: dict) -> float:
    return 0.5

experiment_name = "my-experiment:abc"  # 替换为实际的实验名称或 ID

evaluate(experiment_name, evaluators=[always_half])
```

## 相关主题

* [在实验中重试失败的示例](/langsmith/evaluate-with-retry)
* [运行评估](/langsmith/evaluate-llm-application)
* [异步运行评估](/langsmith/evaluation-async)

***

<div className="source-links">
  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/i18n\zh-CN\langsmith\evaluate-existing-experiment.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>

  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>
</div>
