Skip to main content

Overview

AI Configuration lets administrators tune the behavior of each AI analyzer and configure the LLM provider across the platform. Settings are saved per tenant (organization), so each organization can customize analysis thresholds, caps, algorithms, and AI provider independently. Navigate to Settings > AI Configuration in the KaireonAI sidebar.

LLM Provider Configuration

The platform supports 6 LLM providers. Configuration is resolved in priority order:
  1. Database — Per-tenant settings stored in Settings > Integrations > AI / LLM Provider
  2. Environment variablesAI_PROVIDER, AI_MODEL, AI_API_KEY, AI_BASE_URL
  3. Defaults — Google Gemini 2.5 Flash
For Bedrock, additional configuration is available: region, auth mode (access_key or iam_role), role ARN, access key ID, secret access key, and inference profile.

Analyzer Settings

Analyzer settings are managed via the GET /api/v1/ai/analyzer-settings and PUT /api/v1/ai/analyzer-settings endpoints. The GET endpoint is accessible to viewers, editors, and admins. The PUT endpoint requires the admin role. Both endpoints now include a ranking section alongside segmentation, policy, content, and ruleBuilder.

Setup

1

Open AI Configuration

In the sidebar, expand Settings and click AI Configuration.
2

Review the five analyzer sections

The page shows collapsible cards for each analyzer: Segmentation, Policy, Content Intelligence, Rule Building, and Ranking. Each card lists the tunable parameters with their current values.
3

Adjust parameters

Change any value by editing the input field. Each parameter shows a plain-language description. Click Technical detail to see the underlying implementation detail.
4

Save or reset

Click Save Configuration to persist your changes. Use Reset Section on an individual card or Reset All to Defaults to restore factory defaults.
Settings are loaded once on page load and edited locally until you save. Multiple admins editing at the same time will overwrite each other — the last save wins.

AI Autonomy

The AI Autonomy card controls how far the Decisioning Autopilot and Decision Sentinel may act on their own. Stored on tenant_settings.aiAutopilot; editable here or via PUT /api/v1/tenant-settings:

Segmentation Parameters

Policy Parameters

Content Intelligence Parameters

Rule Building Parameters

Ranking Flags

The ranking section gates five realtime features that run inside the /recommend hot path. All flags default to false. Change them via the Ranking card in Settings > AI Configuration, or directly via PUT /api/v1/ai/analyzer-settings with a ranking object.
budgetPacingEnabled and goalSeekEnabled are available to enable but their full operator-facing configuration UI is forthcoming. Turning them on without the corresponding state configured results in a safe no-op at runtime — scores are returned untouched and a structured awaitingConfig diagnostic is logged.

Validation

All parameters are validated server-side using Zod schemas. If any value is outside its allowed range, the API returns a 400 Bad Request with details about which parameter failed validation. Each sub-schema (segmentation, policy, content, ruleBuilder) is parsed independently — a bad value in one analyzer does not reset valid overrides in other analyzers.

Per-Run Overrides

Each AI analyzer (Segmentation, Policy Recommender, Content Intelligence, Rule Building) supports per-run parameter overrides in its Advanced Parameters panel. Per-run overrides:
  • Take effect for that run only and do not change the saved tenant configuration
  • Default to the current tenant-level values from AI Configuration
  • Include a Reset to Defaults button to restore tenant-level values
This lets analysts experiment with different settings without affecting the organization-wide defaults.

Large Dataset Warning Flow

When a dataset contains more than 5,000 rows (the ML_ROW_THRESHOLD constant, 5000, in domain/ai.ts; a dataset of exactly 5,000 rows still routes straight to the LLM), the platform displays a confirmation dialog before proceeding with analysis. The dialog provides three pieces of information:
  1. Accuracy — The ML Worker uses K-Means clustering, logistic regression, and TF-IDF, which are more accurate than LLM pattern matching for large datasets.
  2. Cost estimate — Proceeding with the LLM shows the estimated token count and cost. The estimate is calculated as rows x fields x 15 + 500 tokens.
  3. Speed — The ML Worker processes data locally in seconds vs. LLM round-trip latency.
The dialog offers two choices:
  • Use ML Worker — Routes the analysis to the ML Worker for full-dataset processing (only available if the ML Worker is connected and healthy).
  • Proceed with LLM — Continues with LLM-based analysis using sampled data. Useful when the ML Worker is unavailable.
For datasets over 5,000 rows, LLM-based analysis samples the data rather than processing it all. This reduces cost but may miss patterns present in the full dataset. Deploy the ML Worker for the most accurate results on large datasets.
If the ML Worker is not connected, the dialog still appears but explains that the ML Worker is not available and suggests enabling it in Settings > Integrations.

Next Steps

Auto-Segmentation

Configure segmentation analysis.

Policy Recommender

Optimize contact frequency policies.

Content Intelligence

Analyze creative performance.