Classification Workflow
Show a classifier report with class labels and probabilities.
mountForm(container, { transport: createJsonTransport({ endpoint: "/api/classify" }), schema: { fields: [{ id: "text", kind: "text", label: "Text", required: true }], reports: [ { id: "intent", kind: "classifier", label: "Intent", labels: ["support", "sales", "other"], details: true, }, ], },});Response:
{ "reports": { "intent": { "label": "support", "confidence": 0.88, "probabilities": { "support": 0.88, "sales": 0.07, "other": 0.05 } } }}Expected UI behavior: the report renders only after submit and can show details when the payload includes them.
Mistakes to avoid:
| Mistake | Fix |
|---|---|
| Using display labels as backend keys | Use stable report ids. |
| Hiding classifier details in the schema | Set details: true or omit it to use the default. |
Next: Regression Workflow.