Use this file to discover all available pages before exploring further.
User Feedback lets you collect positive/negative ratings on LLM responses, enabling data-driven improvements to your AI systems based on actual user satisfaction. Combine explicit ratings with implicit behavioral signals to understand what really works.
// Ask for feedback only if user seems dissatisfiedasync function handleChatMessage(message: string, requestId: string) { const response = await getLLMResponse(message, requestId); // Show response displayMessage(response); // If user immediately asks for help again, they weren't satisfied const nextMessage = await waitForNextMessage(timeout: 60000); if (nextMessage?.content.includes('actually') || nextMessage?.content.includes('that\'s wrong')) { // Implicit negative feedback await submitFeedback(requestId, false); }}
Implicit feedback is often more valuable than explicit ratings because it reflects actual user behavior, not just their stated opinion. Most users don’t click feedback buttons, but their actions reveal satisfaction.
Code Acceptance (like Cursor)
Engagement Patterns
Search/Recommendation Clicks
Task Completion
// Track if user accepts/rejects code suggestionsasync function trackCodeCompletion( requestId: string, suggestion: string) { // Monitor user action on the suggestion const userAction = await waitForUserAction(suggestion); let isPositive = false; if (userAction.accepted) { // User hit Tab/Enter to accept isPositive = true; } else if (userAction.modified) { // User edited suggestion before accepting isPositive = true; // Still valuable } else if (userAction.rejected) { // User hit Escape or kept typing isPositive = false; } await fetch( `https://api.helicone.ai/v1/request/${requestId}/feedback`, { method: "POST", headers: { "Authorization": `Bearer ${HELICONE_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ rating: isPositive }), } );}
// Track user behavior after receiving responseasync function trackChatEngagement( requestId: string, response: string) { // Monitor user behavior for 60 seconds const behavior = await monitorUserBehavior(60000); // Positive signals const positiveSignals = [ behavior.continuedConversation, // Asked follow-up behavior.copiedResponse, // Copied the answer behavior.sharedResponse, // Shared/saved behavior.clickedLinks, // Engaged with links behavior.timeSpent > 30 // Read for >30s ]; // Negative signals const negativeSignals = [ behavior.immediatelyLeft, // Closed chat quickly behavior.askedSameQuestion, // Re-asked same thing behavior.requestedHuman, // Asked for human help behavior.timeSpent < 5 // Dismissed immediately ]; const positiveCount = positiveSignals.filter(Boolean).length; const negativeCount = negativeSignals.filter(Boolean).length; // Submit feedback based on predominant signals if (positiveCount > negativeCount) { await submitFeedback(requestId, true); } else if (negativeCount > positiveCount) { await submitFeedback(requestId, false); }}
// Track if user engages with search results or recommendationsasync function trackSearchResults( requestId: string, results: string[]) { // Monitor user clicks on results for 5 minutes const clicks = await trackClicks(results, timeout: 300000); // Calculate click-through rate const ctr = clicks.length / results.length; // Positive feedback if user clicked any results const isPositive = clicks.length > 0; await fetch( `https://api.helicone.ai/v1/request/${requestId}/feedback`, { method: "POST", headers: { "Authorization": `Bearer ${HELICONE_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ rating: isPositive }), } ); // Also submit CTR as a score await submitScore(requestId, { click_through_rate: Math.round(ctr * 100) });}
Create training datasets from highly-rated responses:
// In Helicone dashboard:// 1. Navigate to Requests page// 2. Filter by: feedback = true AND scores.accuracy > 90// 3. Select all filtered requests// 4. Click "Add to Dataset"// 5. Export as JSONL for fine-tuning
Build training datasets from highly-rated responses
Scores
Combine automated scores with user feedback for comprehensive quality assessment
Custom Properties
Segment feedback by feature, user type, or experiment
User Metrics
Track feedback trends per user or user segment
User feedback provides real-world validation of LLM response quality. Start with simple thumbs up/down, then expand to implicit signals that reflect actual user satisfaction.