Skip to main content

Dataset prebuilt JSON schema types

LangSmith recommends that you set a schema on the inputs and outputs of your dataset schemas to ensure data consistency and that your examples are in the right format for downstream processing, like running evals.

In order to better support LLM workflows, LangSmith has support for a few different predefined prebuilt types. These schemas are hosted publicly by the LangSmith API, and can be defined in your dataset schemas using JSON Schema references. The table of available schemas can be seen below

TypeJSON Schema Reference LinkUsage
Messagehttps://api.smith.langchain.com/public/schemas/v1/message.jsonRepresents messages sent to a chat model, following the OpenAI standard format.
Toolhttps://api.smith.langchain.com/public/schemas/v1/tooldef.jsonTool definitions available to chat models for function calling, defined in OpenAI's JSON Schema inspired function format.

LangSmith lets you define a series of transformations that collect the above prebuilt types from your traces and add them to your dataset. For more info on available transformations, see our reference


Was this page helpful?


You can leave detailed feedback on GitHub.