Send feedback to Agent Assist

This guide describes how to send feedback to Agent Assist about the quality of a specific suggested answer. This information is used to improve the quality of your suggested answers in the future.

Feedback types

Feedback falls into one of two categories. Information about both feedback types is conveyed by fields in an answerFeedback object:

  1. Implicit feedback: Whether or not an agent clicked on a suggested answer. This information is contained in the boolean clicked field.
  2. Explicit feedback: The level of correctness of the answer and/or other detailed information about the answer, provided by the agent. Level of correctness is conveyed by the correctnessLevel field. Optionally, additional details can be added to the agentAssistDetailFeedback field as an AgentAssistantFeedback object.

Send feedback to Agent Assist

There is an Answers field in every Agent Assist response (for example, faqAnswers, articleAnswers, smartReplyAnswers. To provide feedback about an answer, find the resource name of the answer record. The resource name has the format "projects/project-id/answerRecords/answer-record-id". Use the answer record to call the UpdateAnswerRecord method to send AnswerFeedback about the answer.

Smart Reply

Use the answer record to call the UpdateAnswerRecord method to send AnswerFeedback indicating that a suggestion was clicked by the agent. The suggestion is identified by the answer-record-id returned in the Smart Reply suggestion.

curl -X PATCH \
     -H "Autorization: Bearer $(gcloud auth application-default print-access-token)" \
     -H "Content-Type: application/json" -d
'{
  "name": "projects/project-id/answerRecords/answer-record-id",
  "answerFeedback": {
    "clicked": true
  }
}' https://dialogflow.googleapis.com/v2beta1/projects/project-id/answerRecords/xxxxx?updateMask=answer_feedback

Article Suggestion and FAQ Assist

The following sample demonstrates how to send direct feedback from an agent in response to the agent being asked about suggestion correctness. The correctnessLevel field can be one of FULLY_CORRECT, PARTIALLY_CORRECT, NOT_CORRECT, CORRECTNESS_LEVEL_UNSPECIFIED.

curl -X PATCH \
     -H "Autorization: Bearer $(gcloud auth application-default print-access-token)" \
     -H "Content-Type: application/json" -d
'{
  "name": "projects/project-id/answerRecords/answer-record-id",
  "answerFeedback": {
    "correctnessLevel": "FULLY_CORRECT",
    "agentAssistantDetailFeedback": {},
    "clicked": true
  }
}' https://dialogflow.googleapis.com/v2beta1/projects/project-id/answerRecords/xxxxx?updateMask=answer_feedback

The following sample demonstrates how to send click-only indirect feedback:

curl -X PATCH \
     -H "Autorization: Bearer $(gcloud auth application-default print-access-token)" \
     -H "Content-Type: application/json" -d
'{
  "name": "projects/project-id/answerRecords/answer-record-id",
  "answerFeedback": {
    "clicked": true
  }
}' https://dialogflow.googleapis.com/v2beta1/projects/project-id/answerRecords/xxxxx?updateMask=answer_feedback