Skip to main content
This guide shows you how to attach end-user feedback (thumbs up/down, ratings, comments) to your traces. You can log feedback in two ways:
  • 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

Use enrich_session() to add feedback to the entire trace, or enrich_span() to add feedback to a specific operation.
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.
Keep in mind:
  • 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 feedback keys 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:
  1. Explicit Feedback: User-provided ratings in your app - thumbs up/down, star ratings (1-5), written comments
  2. 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

The feedback object accepts any structure. Common patterns:

Data Types

Nested Data

You can drill down into nested fields when charting:
Access as 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