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

# 反馈数据格式

<Check>
  在深入阅读本内容之前，建议先了解以下内容：

  * [关于追踪与反馈的概念指南](/langsmith/observability-concepts)
</Check>

**反馈**是 LangSmith 用于存储针对特定追踪或中间运行（span）的评估标准和得分的方式。反馈可以通过多种方式生成，例如：

1. 从 LLM 应用程序中[随追踪一起上传](/langsmith/attach-user-feedback)
2. 用户在应用中[内联生成](/langsmith/annotate-traces-inline)或在[标注队列中生成](/langsmith/annotation-queues)
3. 在[离线评估](/langsmith/evaluate-llm-application)期间由自动评估器生成
4. 由[在线评估器](/langsmith/online-evaluations-llm-as-judge)生成

反馈以简单的格式存储，包含以下字段：

| 字段名称                       | 类型       | 描述                                         |
| -------------------------- | -------- | ------------------------------------------ |
| `id`                       | UUID     | 记录本身的唯一标识符                                 |
| `created_at`               | datetime | 记录创建的时间戳                                   |
| `modified_at`              | datetime | 记录最后修改的时间戳                                 |
| `session_id`               | UUID     | 运行所属的实验或追踪项目的唯一标识符                         |
| `run_id`                   | UUID     | 会话内特定运行的唯一标识符                              |
| `key`                      | string   | 描述反馈标准的键，例如 `'correctness'`                |
| `score`                    | number   | 与反馈键关联的数值分数                                |
| `value`                    | string   | 保留用于存储与分数关联的值。适用于分类反馈。                     |
| `comment`                  | string   | 与记录相关的任何注释或注解。这可以是给定分数的理由。                 |
| `correction`               | object   | 保留用于存储更正详情，如果有的话                           |
| `feedback_source`          | object   | 包含有关反馈源信息的对象                               |
| `feedback_source.type`     | string   | 反馈来源的类型，例如 `'api'`, `'app'`, `'evaluator'` |
| `feedback_source.metadata` | object   | 保留用于附加元数据，目前                               |
| `feedback_source.user_id`  | UUID     | 提供反馈的用户的唯一标识符                              |

以下是上述格式中反馈记录的 JSON 示例：

```json theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
{
  "created_at": "2024-05-05T23:23:11.077838",
  "modified_at": "2024-05-05T23:23:11.232962",
  "session_id": "c919298b-0af2-4517-97a2-0f98ed4a48f8",
  "run_id": "e26174e5-2190-4566-b970-7c3d9a621baa",
  "key": "correctness",
  "score": 1.0,
  "value": null,
  "comment": "我给出这个分数是因为答案是正确的。",
  "correction": null,
  "id": "62104630-c7f5-41dc-8ee2-0acee5c14224",
  "feedback_source": {
    "type": "app",
    "metadata": null,
    "user_id": "ad52b092-1346-42f4-a934-6e5521562fab"
  }
}
```

***

<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\feedback-data-format.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>
