Feedback
Record a user's reaction to a run — thumbs, rating, or a comment — and feed it into satisfaction analysis.
Feedback records what a user thought of a run: a thumbs up or down, a numeric rating, a free-text comment. It attaches to a run by its run ID and feeds the satisfaction signals used across Trodo.
Record feedback
Call feedback / feedback with the run ID once you have the user's reaction. At least one of satisfaction, rating, or comment must be set.
const { runId } = await trodo.wrapAgent('support-bot', fn);
// ...later, after the user clicks thumbs-up:
await trodo.feedback(runId, { satisfaction: 'positive', rating: 5, comment: 'looks right' });with trodo.wrap_agent('support-bot') as run:
...
# ...later, after the user clicks thumbs-up:
trodo.feedback(run.run_id, satisfaction='positive', rating=5, comment='looks right')Fields
| Field | Type | Purpose |
|---|---|---|
satisfaction | 'positive' or 'negative' | Thumbs up / down; feeds the satisfaction rollup |
rating | number | Any numeric scale (1 to 5, NPS, an eval score) |
comment | string | Free-text note, searchable in the dashboard |
metadata | object | Free-form JSON, e.g. { source: 'thumbs_widget' } |
Each call appends a row, so sending the same thumbs twice creates two rows. De-dupe on the client if that matters.
Next
- TraceID for getting the run ID to attach feedback to
- Capabilities to see satisfaction rolled up by use case