Skip to content

Maira Feedback

Maira allows you to send feedback to conversations. There are two endpoints for providing feedback

  1. PUT /v1/gpt/conversations: To submit feedback in bulk for GPT conversations.
  2. PUT /v1/gpt/conversations/{conversation_id}: To submit feedback for a single conversation.

Here is an example request body for PUT /v1/gpt/conversations

{
  "updates": [
    {
      "message": "Tell us your experience of the GPT response",
      "type": "positive",
      "rating": 5,
      "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }
  ]
}

Here updates holds a list of conversations to be updated with feedback. Looking closely at the parameters:

message: Optional[str] - Feedback message describing the user's experience of the GPT response type: Optional[str] - Type of feedback. Can only take positive or negative. rating: Optional[int] - Rating of feedback, represented as an integer. Lower bound is 0. To set set the upper limit, use max_feedback_rating in GPT setting (refer to Maira "Settings" section of "Maira Settings and Conversation Summary" tutorial) conversation_id: str - ID of the conversation to provide feedback for

Similarly, PUT /v1/gpt/conversations/{conversation_id} can be used to send feedback to a particular conversation, by specifying the conversation_id parameter. The request body is similar, with lesser parameters.

{
  "message": "Tell us your experience of the GPT response",
  "type": "positive",
  "rating": 5
}