Some products and features are in the process of being renamed. Generative playbook and flow features are also being migrated to a single consolidated console. See the details.
Stay organized with collections
Save and categorize content based on your preferences.
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.
Supported languages
For a list of supported languages, see the sentiment column on the
language reference.
If you request sentiment analysis for an unsupported language,
your detect intent request does not fail,
but the QueryResult.diagnostic_info field contains error information.
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.
Using sentiment in conditions
You can use sentiment analysis results via the request-scoped parameters when defining a condition.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eSentiment analysis evaluates user input to discern the dominant subjective opinion, categorizing it as positive, negative, or neutral.\u003c/p\u003e\n"],["\u003cp\u003eSentiment analysis can be requested with each \u003ccode\u003edetectIntent\u003c/code\u003e or \u003ccode\u003estreamingDetectIntent\u003c/code\u003e call through the API by setting \u003ccode\u003eanalyzeQueryTextSentiment\u003c/code\u003e to true, resulting in a \u003ccode\u003esentimentAnalysisResult\u003c/code\u003e in the response.\u003c/p\u003e\n"],["\u003cp\u003eSentiment analysis is not supported in all languages, though a request will not fail if an unsupported language is used, error details will be added to the \u003ccode\u003eQueryResult.diagnostic_info\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eSentiment analysis results can be used in conditions via request-scoped parameters, and can also be enabled for use in the simulator.\u003c/p\u003e\n"]]],[],null,["# Sentiment analysis inspects end-user input\nand identifies the prevailing subjective opinion,\nespecially to determine an end-user's attitude as\npositive, negative, or neutral.\nWhen making a detect intent request,\nyou can specify that sentiment analysis be performed,\nand the response will contain sentiment analysis values.\n\nSupported languages\n-------------------\n\nFor a list of supported languages, see the **sentiment** column on the\n[language reference](/dialogflow/cx/docs/reference/language).\nIf you request sentiment analysis for an unsupported language,\nyour detect intent request does not fail,\nbut the `QueryResult.diagnostic_info` field contains error information.\n\nDetect intent\n-------------\n\nUsing the API, you can request sentiment analysis for each\n`detectIntent` or `streamingDetectIntent` call\nby setting the `analyzeQueryTextSentiment` field to true.\nThe response contains a `sentimentAnalysisResult` field\nwith `score` and `magnitude` values.\n\nUsing sentiment in conditions\n-----------------------------\n\nYou can use sentiment analysis results via the request-scoped parameters when defining a condition.\n\nFor more information, see the [sentiment analysis parameters descriptions](/dialogflow/cx/docs/concept/parameter#request-scoped-sentiment), and\n[Conditions reference](/dialogflow/cx/docs/reference/condition#request-scoped) for how the parameters can be used in conditions.\n\nUsing sentiment in the simulator\n--------------------------------\n\nYou can enable sentiment analysis when using the\n[simulator](/dialogflow/cx/docs/concept/console#simulator-settings)."]]