Skip to main content

Overview

The Session Feedback endpoint allows you to capture user ratings for sessions. This is useful for tracking session quality, user satisfaction, and identifying areas for improvement in your AI applications.

Path Parameters

string
required
The unique identifier of the session to add feedback to

Request Body

boolean
required
The feedback rating for the session
  • true: Positive feedback (thumbs up)
  • false: Negative feedback (thumbs down)

Response

null
Returns null on success
string | null
Error message if the request failed, null otherwise

Example Request

Example Response (Success)

Example Response (Error)

How It Works

When you submit feedback:
  1. The system finds the first request in the session (by creation time)
  2. Adds a Helicone-Session-Feedback property to that request
  3. The value is stored as “1” for positive feedback or “0” for negative feedback
This allows you to query and filter sessions based on user feedback in your analytics.

Use Cases

Collect User Satisfaction

Add thumbs up/down buttons in your application to capture user sentiment:

Track Session Quality

Combine feedback with session metrics to understand quality:

A/B Testing

Track feedback across different model versions or prompts:

Error Handling

Common error scenarios:
  • “No request found”: The session ID doesn’t exist or belongs to a different organization
  • 500 status: Database error or invalid session ID format

Best Practices

  1. Immediate feedback: Collect feedback as soon as a session completes while the experience is fresh
  2. Optional feedback: Don’t require users to provide feedback - make it optional
  3. Context: Consider adding additional context beyond binary ratings using custom properties
  4. Analytics: Regularly analyze feedback trends to improve your application
  5. Follow-up: For negative feedback, consider prompting users for additional details