Collecting user feedback in PhariaAI applications
PhariaAssistant provides a comprehensive feedback system to help you collect and manage user feedback for your custom applications.
For detailed API specifications, see PhariaAssistant’s API documentation at https://pharia-assistant.<your.pharia-ai.domain.com>/api/docs.
For example code, see the Tutorial: Collecting user feedback.
The Feedback API endpoints
The system includes four REST API endpoints for creating, updating, retrieving, and deleting feedback entries:
-
POST
/feedbackcreates a new feedback entry. -
GET
/feedbackretrieves feedback entries based on filter criteria. -
DELETE
/feedback/{feedback_id}removes a feedback entry. -
PATCH
/feedback/{feedback_id}updates an existing feedback entry.
Note that the GET and DELETE endpoints require PhariaAssistant administrator permissions.
How it works
The feedback system is designed to support multiple feedback entries for the same trace ID. This allows you to supply multiple types of feedback for the same result:
-
Rating feedback: Implement a thumbs up/down rating system where:
-
Initial ratings are created using the
POSTendpoint. -
Rating changes can be updated using the
PATCHendpoint.
-
-
Content feedback: Capture both original and edited versions of generated content:
-
Store the original result and any user edits as separate feedback entries.
-
Use this data for scenarios such as Reinforcement Learning from Human Feedback (RLHF).
-
By creating separate feedback entries for different types of feedback, you can maintain clear distinctions between various feedback categories while preserving the relationship with the original result.