Sentiment analysis

Sentiment analysis inspects end-user input and identifies the prevailing subjective opinion, especially to determine an end-user's attitude as positive, negative, or neutral. When making a detect intent request, you can specify that sentiment analysis be performed, and the response will contain sentiment analysis values.

The Natural Language API is used by Dialogflow to perform this analysis. For more information on that API and documentation on interpreting Dialogflow sentiment analysis results:

Detect intent

Using the API, you can request sentiment analysis for each detectIntent or streamingDetectIntent call by setting the analyzeQueryTextSentiment field to true. The response contains a sentimentAnalysisResult field with score and magnitude values.