This web service allows users with the GENERATIVE_AI_USER role to rate a Chatbot conversation.
Use the Search Chatbot traces or the Get a Chatbot trace details web service to see user and ADMIN ratings. Ratings are also available in the Chatbot traces menu (for up to the last 100 conversations). It is also possible to see the full list of chatbot.rate events with the Retrieve events web service.
- This web service relies on the use of a Chatbot AI profile. See Create an AI profile.
- The Chatbot component calls the Retrieval-augmented generation (RAG) web service.
- It is not possible to rate a conversation using an API key (bearer token authentication). Use a login and password (basic authentication) to rate a conversation with this web service.
- It is necessary to provide an
Ft-Calling-Appvalue when using Fluid Topics web services. See Fluid Topics calling app.
| Method | Endpoint |
|---|---|
POST |
|
ADMIN and PORTAL_ADMIN users can also use the following endpoint to rate a conversation:
/api/admin/ai/rag/chat/conversations/{conversationId}/rate
| Path parameter | type | Required? | Description |
|---|---|---|---|
conversationId |
String | Yes | The ID of the chatbot conversation to rate. Get an ID using the Search Chatbot traces web service, or in the Chatbot traces administration menu. |
Request example
The following examples shows a JSON request body without tags:
{
"profileId": "chatbot",
"value": "1",
"comment": "Great response!"
}
The following examples shows a JSON request body with tags:
{
"profileId": "chatbot",
"value": "0",
"comment": "The chatbot answer didn't find the right information, and was a bit slow.",
"tags": [
"INACCURATE",
"SLOW"
]
}
| Field | Type | Required? | Description |
|---|---|---|---|
profileId |
String | Yes | A profileId of type CHATBOT. |
value |
String | Yes | The rating value. 0 is negative, and 1 is positive. |
comment |
String | Yes | A comment associated with the rating. Comments are limited to 5000 characters. |
tags |
Array | No | A list of issues associated with negative feedback. It is only possible to add a tag if the value field is 0. Possible values for regular users are:
ADMIN and PORTAL_ADMIN users can also use:
|
| Return code | Description |
|---|---|
200 OK |
The chatbot rating has been successfully sent. |
400 BAD REQUEST |
Invalid JSON request body, or the requested action is impossible. |
For a comprehensive list of all possible return codes, see Return codes.