Skip to main content
Before diving into this content, it might be helpful to read the following:
Feedback is LangSmith’s way of storing the criteria and scores from evaluation on a particular trace or intermediate run (span). Feedback can be produced from a variety of ways, such as:
  1. Sent up along with a trace from the LLM application
  2. Generated by a user in the app inline or in an annotation queue
  3. Generated by an automatic evaluator during offline evaluation
  4. Generated by an online evaluator
Feedback is stored in a simple format with the following fields:
字段名称 (Field Name)类型 (Type)描述 (Description)
idUUID记录本身的唯一标识符
created_atdatetime记录创建时的时间戳
modified_atdatetime记录最后修改时的时间戳
session_idUUID运行所属的实验或追踪项目的唯一标识符
run_idUUID会话中特定运行的唯一标识符
keystring描述反馈标准的键,例如 'correctness'
scorenumber与反馈键关联的数值评分
valuestring保留用于存储与评分关联的值。适用于分类反馈。
commentstring与记录关联的任何评论或注释。这可以是所给评分的理由。
correctionobject保留用于存储更正详情(如有)
feedback_sourceobject包含反馈来源信息的对象
feedback_source.typestring反馈来源的类型,例如 'api''app''evaluator'
feedback_source.metadataobject保留用于额外元数据,当前
feedback_source.user_idUUID提供反馈的用户的唯一标识符
Here is an example JSON representation of a feedback record in the above format:
{
  "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": "I gave this score because the answer was correct.",
  "correction": null,
  "id": "62104630-c7f5-41dc-8ee2-0acee5c14224",
  "feedback_source": {
    "type": "app",
    "metadata": null,
    "user_id": "ad52b092-1346-42f4-a934-6e5521562fab"
  }
}