Classify (New)
Classifies text into predefined categories using Amazon Bedrock.
Node Overview
| Property | Details |
|---|---|
| Purpose | Automatically categorize text content using AI analysis |
| Usage | Sort and organize text data into predefined categories |
| Category | Intelligent Assist |
| Type | AI Object |
| Security | Safe text classification with confidence scoring |
Key Capabilities
- Text Classification- Categorize text into predefined groups
- Category Management- Define custom classification categories
- Confidence Scoring- Provide confidence levels for classifications
- AI Processing- Leverage advanced language models
- Reason Explanation- Explain classification reasoning
Node Inputs
Required Parameters
| Parameter | Type | Description |
|---|---|---|
| Text to Classify | textarea |
The text content to be categorized |
| Categories | string[] |
Array of predefined categories for classification |
| Model | modelSettings |
AI model for text analysis and classification |
| Data | object |
Input data context and additional variables |
Optional Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Model Config | object |
- | Additional model configuration options |
Node Output
Response Object
{
classificationResult: {
category: string, // The assigned category
reason: string, // Explanation for the classification
confidence: string // Confidence level of the classification
}
}
Returns classification results with category, reasoning, and confidence
Node Functionality
The Classify node provides intelligent text categorization:
Text Analysis
- Content Understanding- Analyze text content and context
- Category Matching- Match content to predefined categories
- Reasoning Generation- Explain classification decisions
Classification Processing
- Multi-category Support- Handle multiple classification categories
- Confidence Assessment- Provide confidence scores for decisions
- Fallback Handling- Handle ambiguous or unclear content
Key Features
Core Configuration
| Feature | Description |
|---|---|
| Text Input | Process various types of text content |
| Category Definition | Define custom categories for specific use cases |
| Model Selection | Choose appropriate models for different content types |
Advanced Classification
AI-Powered Analysis
- Category Matching- Intelligent matching of content to categories
- Reasoning Engine- Generate explanations for classification decisions
- Confidence Scoring- Assess and report classification confidence
When to Use
Choose the Classify node when you need to:
Content Organization
- Content Categorization- Automatically sort content into categories
- Document Classification- Classify documents by type or topic
- Email Sorting- Route emails to appropriate categories
Enterprise Applications
- Support Ticket Routing- Direct support tickets to appropriate teams
- Content Moderation- Classify content for moderation purposes
- Data Analysis- Categorize data for analysis and reporting
Integration Scenarios
- News Classification- Sort news articles by topic
- Social Media Analysis- Categorize social media posts
- Sentiment Analysis- Classify sentiment or tone
Important Considerations
Configuration Requirements
| Aspect | Requirement | Impact |
|---|---|---|
| Text Quality | Clear, meaningful text content | Affects classification accuracy |
| Category Clarity | Well-defined, distinct categories | Improves classification precision |
| Model Selection | Text-capable models | Required for natural language processing |
Performance Factors
| Factor | Description | Optimization |
|---|---|---|
| Text Length | Amount of text to process | Balance detail with processing efficiency |
| Category Count | Number of categories to choose from | More categories may reduce confidence scores |
| Processing Time | Model inference time | Choose appropriate models for speed vs accuracy |
Security & Safety
| Security Feature | Protection | Benefit |
|---|---|---|
| Input Validation | Validate text inputs | Prevent malicious content processing |
| Output Sanitization | Clean classification outputs | Ensure safe result consumption |
| Confidence Thresholds | Set minimum confidence | Prevent unreliable classifications |
Best Practices
Development Guidelines
- Category Design- Create clear, mutually exclusive categories
- Text Preparation- Pre-process text for optimal classification
- Testing- Test with diverse content samples
- Threshold Setting- Define appropriate confidence thresholds
Optimization Strategies
- Model Selection- Choose models based on content type and speed needs
- Category Optimization- Limit categories to essential ones
- Cost Monitoring- Track usage for budget optimization
- Feedback Loop- Use results to improve category definitions
Example Use Cases
Customer Support Ticket Classification
Purpose: Route support tickets to appropriate teams
Text: Customer inquiry or issue description
Categories: Technical, Billing, Account, General
Result: Category assignment with confidence and reasoning
News Article Categorization
Purpose: Sort news articles by topic
Text: News article content
Categories: Politics, Sports, Technology, Business, Entertainment
Result: Topic classification with explanation
Email Priority Classification
Purpose: Prioritize incoming emails
Text: Email subject and content
Categories: Urgent, Important, Normal, Low Priority
Result: Priority level with confidence score
Social Media Sentiment Analysis
Purpose: Classify social media sentiment
Text: Social media posts or comments
Categories: Positive, Negative, Neutral, Mixed
Result: Sentiment classification with reasoning
