Send feedback to Agent Assist

Stay organized with collections Save and categorize content based on your preferences.

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 to indicate two feedback events:

  1. displayed: a suggestion (identified by answer-record-id returned in the Smart Reply suggestions) was displayed in the agent UI.
  2. clicked: a suggestion (identified by answer-record-id returned in the Smart Reply suggestions) was clicked by the agent.

The suggestion was displayed to the agent.

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": { "displayed": true } }' https://dialogflow.googleapis.com/v2/projects/project-id/answerRecords/xxxxx?updateMask=answer_feedback

The suggestion was clicked by the agent.

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/v2/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/v2/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/v2/projects/project-id/answerRecords/xxxxx?updateMask=answer_feedback

Summarization

Summarization uses feedback to calculate the duration spent on reviewing/editing a summary and edit rate.

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": {
    "agentAssistantDetailFeedback": {
      "summarizationFeedback": {
        "startTimestamp": "2022-10-15T02:10:11.414Z",
        "submitTimestamp": "2022-10-15T02:12:41.000012345Z",
        "summaryText": "submitted summary"
      }
    }
  }
}'
https://dialogflow.googleapis.com/v2beta1/projects/project-id/answerRecords/xxxxx?updateMask=answer_feedback.agent_assistant_detail_feedback.summarization_feedback