> ## Documentation Index
> Fetch the complete documentation index at: https://cndoc-langchain.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 数据集预置JSON模式类型

LangSmith 建议您为数据集的输入和输出设置模式，以确保数据一致性，并使您的示例格式适合下游处理（如运行评估）。

为了更好地支持大语言模型工作流，LangSmith 支持几种不同的预定义预置类型。这些模式由 LangSmith API 公开托管，可以使用 [JSON Schema 引用](https://json-schema.org/understanding-json-schema/structuring#dollarref) 在您的数据集模式中定义。可用模式的表格如下所示

| 类型      | JSON Schema 引用链接                                                                                                                 | 用途                                                 |
| ------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| Message | [https://api.smith.langchain.com/public/schemas/v1/message.json](https://api.smith.langchain.com/public/schemas/v1/message.json) | 表示发送给聊天模型的消息，遵循 OpenAI 标准格式。                       |
| Tool    | [https://api.smith.langchain.com/public/schemas/v1/tooldef.json](https://api.smith.langchain.com/public/schemas/v1/tooldef.json) | 聊天模型可用于函数调用的工具定义，采用受 OpenAI JSON Schema 启发的函数格式定义。 |

LangSmith 允许您定义一系列转换，从您的跟踪记录中收集上述预置类型并将其添加到您的数据集中。有关可用转换的更多信息，请参阅我们的[参考文档](/langsmith/dataset-transformations)

***

<div className="source-links">
  <Callout icon="terminal-2">
    [将这些文档](/use-these-docs)通过 MCP 连接到 Claude、VSCode 等，以获取实时答案。
  </Callout>

  <Callout icon="edit">
    [在 GitHub 上编辑此页面](https://github.com/langchain-ai/docs/edit/main/src/langsmith/dataset-json-types.mdx) 或 [提交问题](https://github.com/langchain-ai/docs/issues/new/choose)。
  </Callout>
</div>
