Skip to content
Sign in
ObservabilityTraces to datasetMenu

Traces to datasetPro

Select traces and add them to an eval dataset with field mapping.

ProMap the reviewer correction to the expected output and add cases.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/traces-to-dataset

Usage

tsx
import { TracesToDataset } from "@/components/ui/chatcn/pro/traces-to-dataset"

<TracesToDataset traces={traces} datasets={["Support answers"]} onAdd={addCases} />

Map a reviewer's correction to the expected output, check the first case, then add. Traces missing a mapped field are counted and skipped, never added empty.

Examples

States

ProAdding fails, and no traces match.

Props

PropTypeNotes
traces{ id, fields, meta? }[]Fields the mapping reads
datasetsstring[]Targets
onAdd(request) => Promise<void>Reject with a message to show it
defaultMapping{ input?, expected? }Starting fields

Accessibility

  • Checkboxes support the mixed state for select all; results are a polite live region.