Traces to datasetPro
Select traces and add them to an eval dataset with field mapping.
On this page
ProMap the reviewer correction to the expected output and add cases.
Installation
Usage
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
| Prop | Type | Notes |
|---|---|---|
traces | { id, fields, meta? }[] | Fields the mapping reads |
datasets | string[] | 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.