Feedback Endpoint
Centralized API for collecting, storing, and analyzing user and system feedback on RAG and chat responses. Feedback is used to monitor quality, guide improvements, and support A/B testing and analytics.
Business & Functional Overview
The feedback system enables: - User satisfaction tracking: Collects ratings and comments on answers, surfacing issues and strengths. - A/B testing support: Associates feedback with experiments/variants for model evaluation. - Quality improvement: Provides a feedback loop for model and system tuning. - Analytics: Enables reporting on thumbs up/down rates, completion, and user trends.
Feedback is stored in Azure Table Storage or Blob Storage (with local fallback), deduplicated by response, and can be retrieved for analytics or audit.
Routes
POST /feedbackGET /feedback/{id}GET /feedback?user_id=...GET /feedback/summary— summary stats (thumbs up/down, sample)GET /feedback/recent— recent feedback listGET /feedback/ui— modern feedback dashboard UI
Description
Allows users and systems to submit feedback (ratings, comments, corrections) and retrieve feedback history. Feedback can be submitted programmatically or via the UI. Each feedback record is associated with a user, session, response, and (optionally) experiment/variant.
Request Body (POST)
See FeedbackRequest schema for canonical details. Example:
{
"user_id": "user-123",
"session_id": "sess-456",
"experiment_name": "abtest1",
"variant_name": "A",
"response_id": "resp-789",
"rating": 1,
"feedback_text": "Great answer!",
"response_time": 1.23,
"task_completed": true,
"response_payload": {"question": "...", "answer": "..."}
}
Response Example
See FeedbackResponse schema for canonical details. Example:
{
"status": "success",
"message": "Feedback recorded"
}
Parameters
user_id(string): User identifiersession_id(string): Session identifierexperiment_name(string, optional): A/B test experiment namevariant_name(string, optional): A/B test variant nameresponse_id(string): ID of the response being ratedrating(int): -1 (down), 0 (neutral/autosave), 1 (up)feedback_text(string, optional): Free textresponse_time(float, optional): Time taken to respondtask_completed(bool, optional): Whether the user completed the taskresponse_payload(object, optional): Context for training/analytics
Authentication
Requires valid API key or Azure AD token.
Errors
400 Bad Request: Invalid input401 Unauthorized: Missing/invalid credentials404 Not Found: Feedback not found500 Internal Server Error: Unexpected failure
UI & Analytics
- Dashboard:
/api/v2/feedback/uiprovides a modern, filterable dashboard for browsing, searching, and analyzing feedback records. Features include:- Filter by user, rating, text, time
- View question, answer, sources, and metadata
- Copy/collapse details, show raw JSON
- Summary stats (total, thumbs up/down, up-rate)
- Summary:
/api/v2/feedback/summaryreturns aggregate stats and a sample of recent feedback for analytics. - Recent:
/api/v2/feedback/recentreturns a list of recent feedback records (with all metadata).
Usage Tips
- Use feedback to improve model quality and monitor user satisfaction.
- Retrieve feedback by user, session, or response for analytics.
- Use the UI for quick triage and exploration; use the API for programmatic analysis.
- Feedback is deduplicated by response and can be associated with A/B test variants.
See Also
Usage Tips
- Use feedback to improve model quality and monitor user satisfaction.
- Retrieve feedback by user or feedback ID for analytics.