- During the request: the trace is still active, so you enrich it directly.
- Later: you save the trace’s IDs, then attach feedback when the user rates the result.
User feedback is evaluation data. This page covers the how - capturing feedback via trace enrichment. To understand what to do with this data (building datasets, comparing against automated evals, running experiments), see Experiments.
Log feedback during the request
Useenrich_session() to add feedback to the entire trace, or enrich_span() to add feedback to a specific operation.
- On the session
- On a span
Add feedback that applies to the entire user interaction:
Log feedback later
Use this when the user rates a result after the trace has finished, for example output from a background job. Save the trace’s IDs when it runs, then attach feedback by ID.1
Save the IDs when the trace runs
The session ID is all you need for feedback on the whole trace. For feedback on one span, also give that span your own event ID, because HoneyHive assigns span IDs at ingestion.
2
Attach feedback by ID
When the user submits feedback, load the saved IDs and pass them in. This works from any process or service.
- Tracer
- API client
- REST API
- The trace must be ingested first. Updates for an unknown ID fail. The tracer logs the error instead of raising, and the API client raises an
HTTPException. - Updates merge. Each update sets the
feedbackkeys you send and keeps the rest, so you can send a rating now and a comment later.
Concepts
What is User Feedback?
Any feedback that the end-user provides about their experience. Two types:- Explicit Feedback: User-provided ratings in your app - thumbs up/down, star ratings (1-5), written comments
- Implicit Feedback: User actions that signal intent - clicking “Copy”, “Regenerate”, editing the response
User Feedback vs Human Evaluator: The
feedback field tracks feedback from end-users. Feedback from domain experts or internal team members should use the metrics field instead.Feedback Schema
Thefeedback object accepts any structure. Common patterns:
Data Types
Nested Data
You can drill down into nested fields when charting:feedback.step1.retry (boolean) or feedback.edits.0.value (string).
Nesting limits: Max 5 levels of nested objects, max 2 levels of nested arrays.
Reserved Fields
Learn More
Analyzing feedback
Chart and analyze user feedback in dashboards
Enriching Traces
Full guide to trace enrichment
Tutorial: enrich your traces
Walk through session and span enrichment end to end
SDK Reference
- Python SDK Reference -
enrich_session(),enrich_span(),create_session()