Understanding User Feedback
User feedback is crucial for improving the performance and accuracy of your LLM applications. It provides direct insights into user satisfaction and helps identify areas for improvement.Types of Feedback
- Binary feedback (thumbs up/down)
- Numeric ratings (e.g., 1-5 stars)
- Textual feedback
How to Pass User Feedback
When you are using Langtrace, you can pass both user id and user feedback using theLangtrace.withLangTraceRootSpan
function for typescript or with_langtrace_root_span
decorator in python.
This helps with understanding usage patterns and measure the accuracy of your application from your user’s perspective.
Installation
Install and initialize Langtrace SDK. Refer to the installation guide for more information.Implementing User Feedback
Use theLangtrace.withLangTraceRootSpan
function to trace interaction which provides spanId
and traceId
for the interaction.
Example user score
Collect theuserScore
and userId
from your application and pass it to Langtrace.sendUserFeedback({userScore, userId, traceId, spanId})
function along with traceId
and spanId
.
Best Practices
- Keep feedback collection simple and non-intrusive
- Clearly communicate how feedback will be used
- Act on feedback to improve your application
- Regularly analyze feedback trends