Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kaireonai.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

KaireonAI lets you create qualification rules, contact policies, and behavioral metrics by describing them in plain English using the built-in AI chat panel. Instead of manually configuring field names, operators, and values, open the AI assistant and type a sentence like “create a qualification rule for customers over 25 who spent more than $500 in the last 90 days” — the AI builds structured entity definitions and shows you a preview before creating them. Open the AI chat panel with Cmd+I (macOS) or Ctrl+I (Windows/Linux), or click the AI icon in the top navigation bar.

How It Works

1
Describe your rule in the AI chat panel
2
Open the AI assistant and describe what you want. For example:
3
  • “Create a qualification rule for customers aged 18 or older”
  • “Build a rule targeting users who spent more than $200 in the last 30 days”
  • “Set up a rule excluding customers who haven’t converted on credit card offers”
  • “Create a rule for credit score above 650 and income at least 50000”
  • 4
    AI parses into structured entities
    5
    The AI calls POST /api/v1/ai/parse-rule with your text and your tenant’s schema context (field names from all your Data Schemas). The parser produces one or more structured entities, each with a type, name, and payload.
    6
    The parser supports three entity types:
    7
    Entity TypeWhen GeneratedExamplequalification_ruleAge, spend, score, or attribute-based conditions”customers over 25” produces age >= 25contact_policyNegation conditions (haven’t, hasn’t, never, etc.)“haven’t converted on credit card offers” produces an outcome-based policybehavioral_metricTime-windowed aggregations”spent $500 in the last 90 days” produces a sum metric on revenue with a 90-day window
    8
    Preview the proposed entities
    9
    The AI assistant shows a preview card with the structured definitions — field mappings, operators, and values. Review the details to make sure the AI interpreted your description correctly. Warnings are shown if referenced fields are not found in your schemas.
    10
    Approve or cancel
    11
    Click Approve to create the entities, or Cancel to refine your description. Created entities start in draft status and appear in their respective lists.

    Supported Patterns

    The AI rule parser understands a wide range of natural language patterns. It uses LLM-powered parsing with a deterministic regex-based fallback if the LLM is unavailable.

    LLM-Powered Parsing

    When the LLM is available, the parser uses generateObject() with schema context to interpret any natural language description. The LLM receives:
    • Your text description
    • Available schemas and their field names
    • Max conditions per rule (configurable, default: 5)
    • Allowed operators (configurable, default: equals, gt, lt, gte, lte, contains, in)

    Heuristic Fallback Patterns

    If the LLM call fails, the parser falls back to regex-based heuristics that handle these patterns:
    PatternExampleParsed As
    Age comparisons”over 25”, “aged 18 or older”, “above 30”qualification_rule with customer.age >= 25
    Spend thresholds”spent more than 500","revenueabove500", "revenue above 1,000”qualification_rule with customer.total_spend >= 500
    Time-windowed spend”spent $500 in the last 90 days”behavioral_metric (sum of revenue, 90d window) + qualification_rule referencing the metric
    Negation”haven’t converted”, “hasn’t clicked”, “never purchased”contact_policy with outcome-based suppression
    Category detection”credit card offers”, “loan offers”, “insurance”Scope applied to the contact policy entity
    The heuristic parser also warns when referenced fields (income, loyalty, score, tier, segment, status, balance) are not found in available schemas, and flags ambiguous terms like “VIP” if no matching field exists.

    Batch Creation

    You can describe multiple rules in a single message. The AI parses all entities from the description and shows a preview for each one:
    Create rules for:
    - Customers aged 18 or older
    - Credit score above 650
    - Spent more than $1,000 in the last 30 days
    - Haven't converted on the auto loan offer
    
    This produces four entities: two qualification rules, one behavioral metric (with a linked qualification rule), and one contact policy.

    Schema Context

    The rule parser automatically loads your tenant’s Data Schemas and passes the field names to the AI. This means:
    • Field references are validated against your actual data model
    • Warnings are generated for fields that do not exist in any schema
    • The AI can suggest the correct field name if a close match exists

    Configurable Constraints

    Rule building behavior is controlled by the Rule Building parameters in AI Configuration:
    ParameterDefaultEffect
    Max Conditions5Limits how many conditions a single rule can have
    Allowed Operatorsequals, gt, lt, gte, lte, contains, inRestricts which comparison operators the AI can use
    Field Type Constraintsnull (all types)Restricts which field types can appear in rule conditions

    Tips

    • Be specific — Include the field name, comparison, and value. Vague descriptions like “good customers” cannot be parsed into specific conditions.
    • Break complex logic apart — Deeply nested conditions (e.g., “(A AND B) OR (C AND D)”) work better as separate rules combined at the Decision Flow level.
    • Numeric precision — Currency symbols and comma separators are handled automatically. “$1,000” becomes 1000.
    • Time windows create metrics — When you mention “in the last N days”, the parser creates a behavioral metric to track the aggregation, then creates a qualification rule that references that metric.
    The AI chat panel can also be accessed via MCP from external tools like Claude Code and Cursor. See the MCP Server Reference for details.

    Next Steps

    Qualification Rules

    Learn how qualification rules work in Decision Flows.

    AI Assistant

    Learn more about the built-in AI assistant.

    AI Configuration

    Configure rule building parameters.