User Feedback
Learn how to track user feedback on your traces
Introduction
User feedback is a crucial part of understanding user experience and intent. It helps you identify areas for improvement and make informed decisions to enhance your application’s performance and user satisfaction.
Prerequisites
You have already set tracing for your code as described in our quickstart guide.
Setting
You can set on both the trace level or the span level. If the applies to the entire trace, then set it on the trace level. If the applies to a specific span, then set it on the span level. For more details, refer to the enrich traces documentation.
Concepts
What is User Feedback?
Any feedback that the end-user provides about their experience is considered user feedback
. This can be of two types:
- Explicit Feedback: Any feedback provided by the user explicitly in your app. Examples include 👍/👎, ratings (1-n), etc.
- Implicit Feedback: Any actions within your app’s UI by your user that may indicate user experience and intent. Examples include clicking
Copy
,Regenerate
, etc.
metrics
field.Return Types
We accept all primary return types as user feedback. This includes:
Return Type | Available Measurements | Notes |
---|---|---|
Boolean | True/False | |
Number | Percentage, Sum, Avg, Median, Min, Max, P95, P98, P99 | |
String | Any string value | Used for filters and group by |
For complex data types, we allow you to drill down to the nested fields or specific positions in the array.
So, for example, if you pass feedback like:
{
"rating": 5,
"comment": "Great experience",
"step1": {
"retry": true
},
"edits": [
{
"value": "New York"
}
]
}
You can chart feedback.step1.retry
as a boolean field or feedback.edits.0.value
as a string field.
Reserved Fields
The following fields are reserved for user feedback:
ground_truth
- The ground truth value for the output of a trace or span. This is used to compare the actual output with the expected output. It is rendered differently in the UI.
Learn More
SDK Reference
Read more about the enrich_session
function in the Python SDK reference.