messageAiAnalysis Documentation
Overview
The messageAiAnalysis node is a powerful component used in the Vantage analytics platform to analyze messaging data using AI. It integrates with the user's preferred AI service to perform various forms of analysis on text messages. The node supports multiple analysis types, including sentiment analysis, intent classification, topic extraction, urgency rating, and custom prompts, allowing users to gain insights from their messaging data effectively.
Purpose
The primary purpose of messageAiAnalysis is to automate the process of extracting meaningful insights from unstructured message data. It can be used in customer support, social media analysis, market research, and various other domains where understanding user sentiment, intent, or urgency is crucial.
Settings
The messageAiAnalysis node is highly configurable, with several settings that determine its behavior and output. Below are detailed explanations of each setting:
1. messageColumn
- Input Type: String
- Description: This setting specifies the name of the column in the input data that contains the messages to be analyzed. Users can customize this to point to different message fields.
- Default Value:
"body" - Impact: Changing this setting alters which messages the analysis targets. If set incorrectly, the node may not find the data it needs to perform analysis.
2. analysisType
- Input Type: Dropdown (Options: "sentiment", "intent", "topics", "urgency", "custom")
- Description: This setting defines the type of analysis to be performed on the messages. Users can select from various pre-defined analysis types or specify a custom type with their own prompt.
- Default Value:
"sentiment" - Impact: The analysis type selected determines the behavior of the AI processing and the format of the output. For instance, choosing
"sentiment"will yield a sentiment label, whereas"topics"will provide a list of topics.
3. outputColumn
- Input Type: String
- Description: This setting designates the name of the column in the output data where the results of the AI analysis will be stored.
- Default Value:
"ai_analysis" - Impact: Adjusting this setting changes the destination for the analysis results. If set incorrectly, users may have trouble locating the output data.
4. customPrompt
- Input Type: String
- Description: Users can provide a custom prompt for analysis when the
analysisTypeis set to"custom". This allows for tailored analysis based on specific needs. - Default Value:
""(empty string) - Impact: If provided, this prompt overrides the default prompt templates for custom analysis. It is critical for specialized use cases where standard prompts may not fit.
5. batchSize
- Input Type: Numeric
- Description: This setting specifies the number of messages that should be processed in each batch during the analysis operation.
- Default Value:
25 - Impact: Adjusting this value influences performance and efficiency. A larger batch size may yield better throughput but could also lead to timeouts or failures if the integration has limits. Conversely, smaller batch sizes can help avoid issues but may prolong overall processing time.
How it Works
-
Input Data Handling: The node starts by retrieving input data, ensuring it’s in an appropriate format (array of messages). If necessary, it tries to grab data from specified output columns if the main input data is not structured as expected.
-
Configuration Parameter Setup: The node captures configuration settings from the user’s inputs, including the specific columns for messages and results, the type of analysis to conduct, and more.
-
AI Integration Retrieval: The node obtains the preferred AI integration, which will be used to send requests for analysis. Any issues in retrieving the integration are handled gracefully, with error messages returned for problematic rows.
-
Batch Processing: Messages are processed in defined batches, with prompts generated based on the specified analysis type. The node communicates with the AI integration, sending the prepared messages and receiving the processed outputs.
-
Results Compilation: After processing the messages, the results are compiled. Rows that were skipped or encountered errors have their outputs handled to maintain schema consistency.
-
Final Output: The node returns the analyzed data along with any errors encountered during processing as an output.
Use Cases & Examples
Use Case 1: Customer Support Sentiment Analysis
Scenario: A company wants to analyze customer support interactions to evaluate customer satisfaction over time.
Use Case 2: Market Research Intent Classification
Scenario: A marketing team is interested in understanding the primary intents behind user queries on their website, such as feedback, inquiries about new products, or complaints.
Use Case 3: Urgency Rating in Crisis Management Communications
Scenario: In a disaster response environment, it is crucial to gauge the urgency of messages from the public to prioritize response efforts.
Example Configuration
Use Case: Analyze customer support messages to determine sentiment.
{
"messageColumn": "body",
"analysisType": "sentiment",
"outputColumn": "ai_analysis",
"customPrompt": "",
"batchSize": 20
}In this example configuration, the messageColumn is set to "body", indicating that the messaging data is stored in a column named "body". The analysisType is set to "sentiment", meaning the AI will provide sentiments such as "positive", "negative", or "neutral". The output will be stored in the "ai_analysis" column, and messages will be processed in batches of 20 for efficiency. This configuration effectively enables the team to analyze a large volume of customer support messages for sentiment at scale.
AI Integrations
The messageAiAnalysis node utilizes integrations with popular AI services for executing analysis tasks. It retrieves data from the configured AI service to perform sentiment analysis, intent classification, topic extraction, and urgency rating based on the context provided within the messages. These integrations ensure the analysis is powered by state-of-the-art techniques, enhancing accuracy and reliability.
Billing Impacts
Using the messageAiAnalysis component may influence billing depending on the number of messages processed and the specific AI integration's pricing model. Users should be aware that higher batch sizes and frequent use of AI resources could lead to increased costs. Monitoring usage and understanding integration pricing is advisable to manage expenses effectively.