LangSmith
App · AI Models · 3 actions
Build and manage LangSmith datasets (create datasets, add examples, and find existing datasets) for evaluating your LLM apps.
Actions
| Action | What it does |
|---|---|
| Create dataset | Create a new LangSmith dataset to collect examples in. |
| Create example | Add an input/output example to a LangSmith dataset. |
| Find datasets | Search your LangSmith datasets by name and type. |
Create dataset
Create a new LangSmith dataset to collect examples in.
Inputs
- Name
nametextRequired - A name for the dataset.
- Description
descriptiontext - Optional description of the dataset.
- Data type
data_typetext - The kind of examples this dataset holds.One of:
kv(Key-value (general data)),llm(LLM (prompt / completion text)),chat(Chat (message lists)). Default:kv.
Outputs
created_attext- When it was created (ISO 8601).
data_typetext- The dataset's data type.
descriptiontext- The dataset description.
example_countnumber- Number of examples in the dataset.
idtext- The new dataset's ID.
nametext- The dataset name.
Example output
{
"created_at": "2026-07-31T12:00:00Z",
"data_type": "kv",
"description": "Golden QA pairs",
"example_count": 0,
"id": "3f29a1e2-8c4b-4f7a-9c1a-1b2c3d4e5f60",
"name": "QA regression set"
}Create example
Add an input/output example to a LangSmith dataset.
Inputs
- Dataset
dataset_idtextRequired - The dataset to add the example to.
- Inputs
inputsobjectRequired - The example's inputs, as fields and values (for example, question: 'What is 2+2?').
- Outputs
outputsobject - Optional expected outputs, as fields and values (for example, answer: '4').
- Metadata
metadataobject - Optional extra details to store with the example.
- Split
splittext - Optional split to file the example under (for example, 'train' or 'test'). Defaults to 'base'.
Outputs
created_attext- When it was created (ISO 8601).
dataset_idtext- The dataset the example belongs to.
idtext- The new example's ID.
inputsobject- The example's inputs.
outputsobject- The example's outputs.
Example output
{
"created_at": "2026-07-31T12:05:00Z",
"dataset_id": "3f29a1e2-8c4b-4f7a-9c1a-1b2c3d4e5f60",
"id": "7c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
"inputs": {
"question": "What is the capital of France?"
},
"outputs": {
"answer": "Paris"
}
}Find datasets
Search your LangSmith datasets by name and type.
Inputs
- Name contains
name_containstext - Optional text to match within dataset names. Leave blank to return all datasets.
- Data type
data_typetext - Optional. Only return datasets of this type.One of:
kv(Key-value (general data)),llm(LLM (prompt / completion text)),chat(Chat (message lists)). - Max results
limitnumber - Most datasets to return (1-100). Defaults to 20.From 1 to 100. Default:
20.
Outputs
countnumber- How many datasets were returned.
datasetslist- The matching datasets.
Example output
{
"count": 1,
"datasets": [
{
"created_at": "2026-07-31T12:00:00Z",
"data_type": "kv",
"description": "Golden QA pairs",
"example_count": 12,
"id": "3f29a1e2-8c4b-4f7a-9c1a-1b2c3d4e5f60",
"name": "QA regression set"
}
]
}