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-03-05 UTC."],[[["Sentiment analysis evaluates user input to discern the dominant subjective opinion, categorizing it as positive, negative, or neutral."],["Sentiment analysis can be requested with each `detectIntent` or `streamingDetectIntent` call through the API by setting `analyzeQueryTextSentiment` to true, resulting in a `sentimentAnalysisResult` in the response."],["Sentiment 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 `QueryResult.diagnostic_info` field."],["Sentiment analysis results can be used in conditions via request-scoped parameters, and can also be enabled for use in the simulator."]]],[]]