Feedback REST API¶
Use this API to give collect for the performance of Cortex Agents.
Send feedback for Cortex Agent response¶
POST /api/v2/databases/{database}/schemas/{schema}/agents/{name}:feedback
Creates a feedback event for a Cortex Agent response.
Request¶
Path parameters¶
Parameter |
Description |
---|---|
|
(Required) Identifier for the database to which the resource belongs. You can use the /api/v2/databases GET request to get a list of available databases. |
|
(Required) Identifier for the schema to which the resource belongs. You can use the /api/v2/databases/{database}/schemas GET request to get a list of available schemas for the specified database. |
|
(Required) Identifier for the agent. |
Request headers¶
Header |
Description |
---|---|
|
(Required) Authorization token. For more information, see Authentication. |
|
(Required) application/json |
Request body¶
The request body contains the feedback details for the agent response.
Field |
Type |
Description |
---|---|---|
|
string |
Request ID associated with the feedback. |
|
boolean |
Whether the response was good ( |
|
string |
The text for the detailed feedback message. |
|
array of strings |
List of categories for the feedback. Each category is a string that represents a specific category of feedback. |
|
integer |
The id of the thread. |
Example request body¶
{
"message_id": "msg_001",
"rating": "positive",
"comment": "The answer was helpful and accurate."
}
Response¶
A successful response returns a confirmation message.
Response headers¶
Header |
Description |
---|---|
|
Unique ID of the API request. |
Response body¶
{
"status": "Feedback submitted successfully"
}