ExperimentalThe parameters for creating the dataset
A promise that resolves to the created dataset ID
// Create a dataset with span links
const { datasetId } = await createDataset({
name: "qa-dataset",
description: "Q&A examples from traces",
examples: [
{
input: { question: "What is AI?" },
output: { answer: "Artificial Intelligence is..." },
spanId: "abc123def456" // Links to the source span
},
{
input: { question: "Explain ML" },
output: { answer: "Machine Learning is..." },
spanId: "789ghi012jkl"
}
]
});
Create a new dataset with examples.
this interface may change in the future