Text Classifier
This component allows you to classify text into specific categories using an AI model. It acts as a bridge between your data and the classification logic, taking raw text and returning a specific label that describes the content. For example, you can use it to determine if an email is “Spam” or “Not Spam,” or to categorize customer support tickets by topic.
How it Works
Internally, this component connects to a predefined text classification model. When you provide text to this node, the system sends the text to the model for analysis. The model looks for patterns and keywords within the text to decide which category best fits. It then returns the most likely label along with a “confidence score,” which tells you how sure the model is about its decision. You do not need to configure complex algorithms; you simply need to ensure the correct model is selected.
Connection & Credentials
Note: This specific wrapper component does not directly manage credentials. However, the underlying model it connects to may require valid credentials to be configured in your Nappai panel. If you encounter errors related to authentication, please ensure the model’s credentials are set up correctly in the system settings.
Inputs
The following fields are available to configure this component.
- Text Input: The actual text you want to analyze and classify.
- Visible in: All operations
- Model Identifier: The unique ID of the specific AI model you want to use for the classification.
- Visible in: All operations
Outputs
- Predicted Label: The category assigned to your text (e.g., “Positive,” “Negative,” “Spam”). This is the main result you will likely use in subsequent steps of your workflow.
- Confidence Score: A numerical value between 0 and 1 indicating how confident the model is in its prediction. A higher score means the classification is more reliable.
Output Data Example (JSON)json
{ “label”: “Customer Support”, “confidence”: 0.95 }
Connectivity
This component is typically used as an Intermediate or Decision node in a workflow.
- Incoming Connections: It should receive text data from other components such as Text Extractors, Email Readers, or CRM Data Fetchers.
- Outgoing Connections: The output
labelis often used by Router or Filter components to direct workflows based on the category. For instance, you might route “Spam” emails to a trash folder and “Urgent” support tickets to a human agent queue.
Usage Example
Imagine you are building an automation for a helpdesk system.
- You have a New Email component that retrieves incoming messages.
- You connect the Body of the email to the Text Input of this Text Classifier component.
- You set the Model Identifier to a model trained on support topics (e.g., “Billing,” “Technical Issue,” “General Inquiry”).
- The output
labelis sent to a Switch/Router component, which directs the email to the appropriate department based on the label.
Tips and Best Practices
- Check Confidence Scores: If a workflow relies on accurate classification, check the
confidenceoutput. If the score is low, you might want to route those items to a human for review. - Model Selection: Ensure you are using the correct
Model Identifierfor the type of text you are processing. A model trained on customer reviews may not work well for technical code snippets. - Text Length: While the component handles standard text, extremely long documents might be processed faster or more accurately if you truncate or summarize them first.
Security Considerations
- Data Privacy: Ensure that the text you are sending to the classifier does not contain sensitive personal information (PII) if your model is hosted on an external service. Check your data privacy policies regarding text analysis.
- Model Trust: Only use models from trusted sources within your Nappai environment to avoid unexpected or biased classifications.