5 min readUpdated Mar 2, 2026

aiTrigger

Overview

The aiTrigger logic is a component within Vantage that leverages AI integrations to evaluate data and determine if certain conditions are met to trigger actions. It uses a user-defined prompt combined with input data to generate a response from an AI model, effectively providing an automated decision-making capability based on specified criteria. The component can operate in two modes—per-row evaluation and aggregate evaluation—and it has the ability to return results with trigger metadata.

Purpose

The primary purpose of aiTrigger is to make real-time decisions based on input dataset conditions by integrating AI capabilities. This enhances operational workflows by automating responses to specific criteria, allowing for proactive measures without direct human intervention.

How It Works

  1. Input Preparation: The component takes user-defined inputs and interpolates any placeholders in the prompt and context template with actual row data.
  2. AI Integration: It retrieves the preferred AI integration for evaluating the prompt and context against the input data.
  3. Evaluation:
    • If in per-row mode, the aiTrigger sends each row of data to the AI model for evaluation individually.
    • If in aggregate mode, it consolidates the data and sends it as a batch for evaluation.
  4. Response Parsing: The AI response is parsed to determine if the conditions for triggering are met, along with associated confidence levels and reasoning.
  5. Output Generation: Depending on the evaluation, the logic returns the original data with appended metadata or an indication that no trigger has occurred.

Settings

  1. prompt

    • Input Type: String
    • Description: This is the question or statement sent to the AI for evaluation. It should be carefully crafted to elicit a binary decision from the AI.
    • Effects: Changing this alters the directive given to the AI, potentially influencing the accuracy and relevance of its responses.
    • Default Value: "Should this data trigger an action? Respond with YES or NO, followed by your confidence as a percentage and a brief reason."
  2. contextTemplate

    • Input Type: String
    • Description: This template is used to format additional context for the AI, with placeholders for data columns that will be replaced during execution.
    • Effects: Modifying this affects what additional data insights the AI considers when making decisions. If left blank, the raw data will be used.
    • Default Value: "" (empty string)
  3. threshold

    • Input Type: Numeric (integer)
    • Description: This setting defines the minimum confidence percentage an AI response must meet in order to trigger an action.
    • Effects: Lowering this value means that fewer confident responses will trigger actions, while raising it requires stronger confidence from the AI.
    • Default Value: 70
  4. evaluationMode

    • Input Type: Dropdown (string options: "per_row" or "aggregate")
    • Description: This setting determines whether the evaluation occurs on an individual row basis or as an aggregation of all data.
    • Effects: Switching to "per_row" allows for granular evaluations but may lead to more API calls. In contrast, "aggregate" could enhance performance but might overlook nuanced insights.
    • Default Value: "aggregate"
  5. maxRowsToEvaluate

    • Input Type: Numeric (integer)
    • Description: This specifies the maximum number of rows that the component will evaluate in the defined mode.
    • Effects: Lowering this value limits the data processed and can improve performance, but it may also restrict the context the AI considers.
    • Default Value: 50

Data Expectations

The aiTrigger expects the following data input:

Use Cases & Examples

Use Case 1: Real-time Alerting for Anomalies

A financial analytics platform can use aiTrigger to monitor transaction data in real time. If suspicious activity is detected (e.g., transactions over a certain threshold), an alert can be automatically triggered to notify the security team.

Use Case 2: Lead Scoring for Sales Automation

A sales team could configure aiTrigger to evaluate leads based on multiple criteria, such as engagement level and demographic data, allowing them to prioritize high-value leads for follow-up actions.

Use Case 3: Operational Efficiency Optimization

An e-commerce retailer could use aiTrigger to evaluate inventory levels and customer demand data, triggering restocking alerts only when certain thresholds are reached.

Example Configuration

Use Case: Real-time Alert for Suspicious Transactions

Sample Configuration Data

json
{
  "prompt": "Is this transaction suspicious? Respond with YES or NO, and provide your confidence percentage along with reasoning.",
  "contextTemplate": "Transaction details: Amount: {{amount}}, User ID: {{user_id}}, Timestamp: {{timestamp}}",
  "threshold": 80,
  "evaluationMode": "per_row",
  "maxRowsToEvaluate": 100
}

This configuration will process up to 100 transaction records, and the alert will be triggered only if the AI's confidence in a transaction being suspicious is at least 80%.