Get Started
Pass User Feedback
The Langtrace SDK gives you the ability to pass user feedback from your application as scores for measuring accuracy.
How to pass user feedback
When you are using Langtrace, you can pass both user id and user feedback using the with_additional_attributes
function.
This helps with understanding usage patterns and measure the accuracy of your application from your user’s perspective.
Installation
Step 1: Install and initialize Langtrace SDK. Refer to the installation guide for more information.
Usage
Step 2: See the example below to understand how to pass user feedback and user id. Make sure you use the following attributes:
user.id
: A unique identifier for the user.user.feedback.rating
: A score from -1 to 1, where -1 is negative feedback, 0 is neutral, and 1 is positive feedback.