Software Development

Implementing user feedback loops and 'thumbs up' buttons using Langfuse?

KE Asked by Kevin Bacon · 15-09-2025
0 upvotes 5,196 views 0 comments
The question

We want our users to rate LLM responses in our app. How do I link a 'thumbs up' click in my React frontend to a specific generation in Langfuse? I want to create a dataset of "good" vs "bad" responses to eventually use for fine-tuning our next model version.

3 answers

0
ME
Answered on 16-09-2025

The process is straightforward: when your LLM generates a response, the SDK returns a generationId. You should store this ID in your frontend state. When the user clicks the feedback button, you call the langfuse.score() method, passing that ID along with a value (like 1 for positive, 0 for negative) and a name like "user-satisfaction." This links the score directly to the trace. Later, you can go into the dashboard and filter for all generations with a score of 1. You can then export these high-quality pairs as a JSONL file, which is the perfect format for fine-tuning models on platforms like OpenAI or Anyscale.

0
TO
Answered on 17-09-2025

Can we add text comments to the feedback, or is it strictly numerical scores? Our users often want to explain why a response was helpful.

KE 18-09-2025

You can definitely add a comment! The score method accepts an optional comment field. We use it to capture "correction" text from our internal expert reviewers. It’s been vital for our R&D team to understand the nuances of why the model failed on certain legal queries. The ability to see the comment right next to the trace in the UI provides great context.

0
DI
Answered on 19-09-2025

I suggest setting up an automated "Evaluation" in the dashboard that alerts you if the average user score drops below a certain threshold after a deployment.

ME 20-09-2025

Diane's advice saved us from a bad prompt release last week. We saw the satisfaction dip instantly and rolled back within ten minutes.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

World globe icon Country: Canada

Book Free Session