5 min readUpdated Mar 2, 2026

aiConditional Documentation

Overview

The aiConditional is a flow control logic component within the Vantage analytics and data platform that enables routing of data rows into different output branches based on AI classification. It leverages a language model (LLM) to classify rows in batches, making it suitable for processing large datasets efficiently. Each output branch is defined by the user, allowing for custom classification based on data attributes.

Purpose

The purpose of the aiConditional component is to facilitate advanced data processing by harnessing AI for conditional logic. This component is particularly useful for applications such as sentiment analysis, categorization of customer feedback, and any scenario where data classification is required based on user-defined criteria.

Settings

The configuration for the aiConditional component consists of multiple settings that define its operation. Below is an exhaustive explanation of each setting:

1. branches

2. promptTemplate

3. batchSize

4. classifyColumn

How it Works

The aiConditional component processes incoming data as follows:

  1. Data Retrieval: It unwraps the input data, ensuring it is in the expected format, typically an array of objects.
  2. Branch Setup: It initializes output buckets based on the defined branches, providing a structured way to categorically store processed data.
  3. AI Integration: It connects to the preferred AI integration to facilitate classification.
  4. Batch Processing: It classifies incoming data in batches, utilizing the LLM to maintain performance on large datasets.
  5. Data Routing: After classification, it routes each row of data to the appropriate output bucket based on AI-derived classifications.
  6. Error Handling: If classification fails, or if data cannot be classified, the component directs affected rows to a default else bucket.

Expected Data

The aiConditional component expects the following data type:

AI Integrations

The aiConditional component is designed to integrate with external AI models through the Vantage platform. It utilizes chat-based completions from an AI service, which allows for natural language processing capabilities. The efficiency of the AI model may vary based on the chosen integration and configuration settings.

Billing Impacts

Using the aiConditional component may incur additional costs based on the volume of data processed and the number of AI requests made. Since the component leverages batching for efficiency, a higher batchSize may impact the billable API requests. Users should monitor usage and optimize configuration to manage costs effectively.

Use Cases & Examples

Use Case 1: Sentiment Analysis of Customer Feedback

Businesses can use aiConditional to classify customer feedback into sentiment categories (e.g., Positive, Negative). This classification helps in understanding customer satisfaction and improving service quality.

Use Case 2: Categorization of Support Tickets

Support teams can automatically route support tickets based on their content (e.g., Billing Issues, Technical Support). This ensures that the right team addresses user inquiries swiftly.

Use Case 3: Classification of Marketing Emails

Marketing departments can classify emails or messages based on intent (e.g., Promotion, Info Request, Complaint). This aids in targeted campaigns and responses.

Example Configuration

Scenario: A customer service department wants to classify support tickets based on their content.

Sample Configuration:

json
{
  "branches": [
    { "label": "Technical Support", "description": "Issues related to software or hardware malfunctions." },
    { "label": "Billing Issues", "description": "Queries related to billing and payment." },
    { "label": "General Inquiry", "description": "General questions from users." }
  ],
  "promptTemplate": "Classify each row according to the branch labels provided.",
  "batchSize": 20,
  "classifyColumn": "ticket_content"
}

In this configuration: