Type/to search
Nodes
Manual Trigger
Schedule Trigger
RSS Feed Trigger
Kline Close Trigger
Discord Trigger
Telegram Trigger
Slack Trigger
AI Agent
Sentiment Analysis
MCP Client
OpenAI Model
Anthropic Chat Model
Code Tool
HTTP Request Tool
MCP Client Tool
Code
HTTP Request
Edit Fields (Set)
Filter
IF
Loop Over Items
Merge
Aggregate
Compare Datasets
Convert to File
Crypto
Database
Extract from File
HTML
Limit
Log
No Operation, do nothing
RSS Read
Read Files from Disk
Remove Duplicates
Rename Keys
S3
Sort
Split Out
Stop And Error
Summarize
Switch
Telegram
Wait
Write Files To Disk
XML
App push
DingTalk Robot
Discord Bot
Email
Feishu Custom Bot
Slack
Account Info
Market Info
Trading Executor
Indicator
Trading Plugin
Credentials


Use the Sentiment Analysis node to analyze the sentiment of incoming text data.

The language model uses the Sentiment Categories specified in the node options to determine the sentiment of each item.

Node Parameters

  • Text to Analyze defines the input text for sentiment analysis. This is an expression that references a field from the input items. For example, this could be {{ $json.chatInput }} if the input comes from a chat or message source. By default, it expects a text field.

Node Options

  • Sentiment Categories: Define the categories for classifying your input.
    • The default categories are Positive, Neutral, Negative. You can customize these categories to fit your specific use case, such as Very Positive, Positive, Neutral, Negative, Very Negative for more granular analysis.
  • Include Detailed Results: When enabled, this option includes sentiment strength and confidence scores in the output. Note that these scores are estimates generated by the language model and serve as rough indicators rather than precise measurements.
  • System Prompt Template: Use this option to modify the system prompt used for sentiment analysis. It uses the {categories} placeholder for the categories.

Usage Notes

Model Temperature Setting

It is strongly recommended to set the temperature of the connected language model to 0 or a value close to 0. This ensures that results are as deterministic as possible, providing more consistent and reliable sentiment analysis across multiple runs.

Language Considerations

The node's performance may vary depending on the language of the input text.

For best results, ensure that your chosen language model supports the input language.

Processing Large Volumes

When analyzing large amounts of text, consider splitting the input into smaller chunks to optimize processing time and resource usage.

Iterative Refinement

For complex sentiment analysis tasks, you may need to iteratively refine the system prompt and categories to achieve the desired results.

Example Usage

Basic Sentiment Analysis
  1. Connect a data source (for example, RSS Feed, HTTP Request) to the Sentiment Analysis node.
  2. Set the "Text to Analyze" field to the relevant item property (for example, {{ $json.content }} for blog post content).
  3. Keep the default sentiment categories.
  4. Connect the node's outputs to separate paths for processing positive, neutral, and negative sentiments differently.
Custom Category Analysis
  1. Change the Sentiment Categories to Excited, Happy, Neutral, Disappointed, Angry.
  2. Adjust your workflow to handle these five output categories.
  3. Use this setup to analyze customer feedback with more nuanced emotional categories.

Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)