Skip to main content

Overview

Add feedback ratings to requests to track user satisfaction and quality of LLM responses. Feedback can be used to identify problematic requests, improve prompts, and train evaluation models.

Endpoint

string
required
POST
string
required
/v1/request//feedback

Authentication

Requires API key authentication via the Authorization header:

Path Parameters

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

Request Body

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

Response

Returns a success or error response.
null
Always null on success
string
Error message if the request failed, otherwise null

Examples

Positive Feedback

Add a positive (thumbs up) rating:

Negative Feedback

Add a negative (thumbs down) rating:

Using in Code

Response Examples

Success Response

Error Response

Integration Examples

React Component

Implement feedback buttons in your UI:

CLI Tool

Add feedback from the command line:

Use Cases

User Feedback Collection

Collect end-user feedback on AI responses:

A/B Testing

Compare different prompts or models:

Quality Monitoring

Automatically flag low-quality responses:

Training Data Generation

Use feedback to create training datasets:

Query Requests by Feedback

You can filter requests by feedback using the query endpoint:

Notes

  • Feedback can be updated by sending another request with a different rating
  • Only one feedback rating per request is stored (most recent wins)
  • Feedback is immediately reflected in query results and analytics
  • Use feedback in combination with custom properties for more detailed tracking
  • Feedback data is available in exports and webhooks
  • Consider implementing a feedback collection UI thatโ€™s easy for users to access

Best Practices

  1. Make feedback easy: Place feedback buttons prominently in your UI
  2. Explain context: Tell users what the feedback is for and how it helps
  3. Donโ€™t overdo it: Only ask for feedback on important interactions
  4. Act on feedback: Regularly review negative feedback and improve prompts
  5. Track trends: Monitor feedback rates over time to measure improvements
  6. Combine signals: Use feedback alongside evaluation scores for better insights