To help track agent performance, Dialogflow provides tools for collecting and analyzing end-user feedback on agent answers during a conversation.
Enable feedback
Before collecting answer feedback, you must enable the following settings in the general agent settings:
- Enable interaction logging
- Enable Answer Feedback
Collect feedback with Dialogflow CX Messenger
If you use
Dialogflow CX Messenger,
you can enable answer feedback collection for the chat dialog by setting the following
HTML attribute:
allow-feedback="all"
.
This will add thumbs up
and thumbs down buttons to the user interface. During the conversation, an end-user can click these buttons to provide feedback on the agent responses. If the user selects thumbs down, they can optionally provide a reason for the negative feedback.Collect feedback with custom user interfaces
If you have developed a custom user interface,
you can add feedback collection to your interface
and call the Sessions.submitAnswerFeedback
method.
Select a protocol and version for the Session reference:
Protocol | V3 | V3beta1 |
---|---|---|
REST | Session resource | Session resource |
RPC | Session interface | Session interface |
C++ | SessionsClient | Not available |
C# | SessionsClient | Not available |
Go | SessionsClient | Not available |
Java | SessionsClient | SessionsClient |
Node.js | SessionsClient | SessionsClient |
PHP | Not available | Not available |
Python | SessionsClient | SessionsClient |
Ruby | Not available | Not available |
Custom feedback data structure
You can have feedback data stored in your custom data structure filling the answerFeedback.customRating
field in the
Sessions.submitAnswerFeedback
method.
If you use Dialogflow CX Messenger, you can set up custom feedback collection by defining your custom feedback component.
Browse feedback using the Dialogflow CX console
You can access and filter feedbacks using the Conversation history tool.
Read feedback with BigQuery interaction logging
You can analyze the feedback data with BigQuery interaction logging.
If you have already created your BigQuery table,
you can alter your existing table with the following SQL command if it doesn't have the required bot_answer_feedback
column:
ALTER TABLE <your_dataset_name>.<your_table_name>
ADD COLUMN bot_answer_feedback JSON;
Read feedback with the API
The conversation history resource contains
answerFeedback
fields that contain feedback data.
See the GetConversation
method in the RPC documentation.