How it works
User feedback is captured as attributes on traces or spans. When a user provides feedback in your application, you update the corresponding trace or span with the feedback data. This feedback then appears in the Monitor pillar alongside the trace details, and can be used to filter logs and build datasets from cases with low satisfaction.Capture feedback via SDK
After a user provides feedback, use the trace or span’supdate method to attach it:
- TypeScript
- Python
Capture feedback via API
If you are using the REST API directly, update the trace with a PATCH request:Capture feedback via Proxy
When using the Proxy, you can attach feedback attributes on subsequent requests within the same trace:Feedback data patterns
Design your feedback attributes to be consistent and filterable:| Attribute | Type | Example values | Purpose |
|---|---|---|---|
user_feedback | String | "positive", "negative" | Binary satisfaction signal. |
user_feedback_rating | Number | 1 - 5 | Numeric rating scale. |
user_feedback_comment | String | "Response was helpful" | Free-text feedback from the user. |
user_feedback_category | String | "incorrect", "incomplete", "off-topic" | Categorized issue type. |
user_feedback_timestamp | String | ISO 8601 timestamp | When the feedback was provided. |
feedback_reason with a controlled taxonomy (e.g., "wrong_policy", "hallucination", "missing_context") and an annotation_status ("empty" / "filled") to track which cases still need human review.
Use feedback for improvement
Once feedback is captured, it becomes part of your improvement workflow:- Filter in Monitor — Filter traces by feedback attributes to find cases where users were dissatisfied.
- Build datasets — Add negative feedback cases to evaluation datasets so you can test fixes against real user complaints. In Monitor, open a trace, click Add to Dataset, and map feedback attributes into dataset columns.
- Annotation queues — Use an
annotation_statuscolumn in your dataset to track which rows need human review. Reviewers fill in corrective annotations, then mark rows asfilled. This gives you a structured backlog with clear ownership. - Run evaluations — Attach evaluators to the dataset to verify that prompt fixes actually resolve the failure class. Run on annotated rows first, then the full dataset. Previously failed rows stay in the dataset permanently as regression guardrails.
- Track trends — Use charts with custom attributes to monitor satisfaction trends over time.
- Correlate with eval scores — Compare user feedback against continuous evaluation scores to validate your evaluators.
Best practices
- Capture immediately — Send feedback as soon as the user provides it, even if the trace has already ended.
- Use tags for quick filtering — Tags like
"thumbs-up"and"thumbs-down"make it easy to filter in the Monitor without complex attribute queries. - Include context — When possible, capture the reason for negative feedback (comment or category) to make it actionable.
- Link to the right trace — Store the trace ID in your application when you display a response, so you can attach feedback to the correct trace later.
Next steps
Build Datasets from Logs
Turn feedback-tagged logs into evaluation datasets.
Log Attachments
Attach additional data to traces and spans.