Skip to content

Feedback

User feedback shows how well agents work and where they need improvement. The feedback API stores ratings and comments for individual answers. If you build your own chat interface, offer the same kind of rating buttons as the built-in chat.

How feedback is used is described in the service description.

POST ${RUNTIME_BASE_URL}/v1/evaluations/feedback
Authorization: Bearer ${RUNTIME_TOKEN}
X-Tenant-ID: ${TENANT_ID}
Content-Type: application/json
{
"type": "rating",
"data": {
"rating": 1,
"reason": "Accurate information",
"comment": "Solved my problem.",
"tags": ["maintenance"]
},
"meta": {
"chat_id": "conv-abc-123",
"message_id": "msg-004"
}
}
FieldDescription
typeKind of feedback, for example rating
data.ratingThe rating, as number or text. Use one scale consistently, for example 1 and -1 for thumbs up and down.
data.reasonOptional short reason
data.commentOptional free text
data.tagsOptional labels
meta.message_idThe answer being rated: the metadata.message_id of the chat request
meta.chat_idOptional. The conversation.

Always send meta.message_id. It links the feedback to the answer, so that the agent’s behavior for that answer can be analyzed later.

The response contains the stored entry with its id. Keep the id if users can change their rating later.

Users can see, change and delete their own feedback:

OperationRequest
Get one entryGET /v1/evaluations/feedback/{id}
Change an entryPUT /v1/evaluations/feedback/{id} with the same body as above
Delete an entryDELETE /v1/evaluations/feedback/{id}
List own entriesGET /v1/evaluations/feedbacks/user
Delete all own entriesDELETE /v1/evaluations/feedbacks

Users with the service-feedback role can read, change and delete the feedback of all users, not only their own. They can also list feedback per agent:

OperationRequest
List the instance IDs that have feedbackGET /v1/evaluations/feedbacks/models
List all feedback for one instanceGET /v1/evaluations/feedbacks/model/{instance_id}

See Roles and permissions.