> ## 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.

# Core Concepts

> Understand the mental model behind KaireonAI — the key building blocks and how they fit together.

## The Decision Lifecycle

Every decision KaireonAI makes follows the same lifecycle. Whether you are personalizing a website in real time or generating a batch of campaign recommendations, the steps are identical — only the trigger changes.

Think of it as an assembly line: a customer event enters one end, passes through a series of stages, and a personalized recommendation comes out the other side. After delivery, the customer's response feeds back in so the system gets smarter over time.

```mermaid theme={null}
graph LR
    A["Customer Event"] --> B["Decision Flow"]
    B --> C["Eligible Offers"]
    C --> D["Scoring"]
    D --> E["Ranking"]
    E --> F["Delivery"]
    F --> G["Outcome"]
    G -->|"Learning Loop"| B

    style A fill:#065f46,stroke:#10b981,color:#d1fae5
    style B fill:#1e1b4b,stroke:#6366f1,color:#e0e7ff
    style C fill:#1e1b4b,stroke:#6366f1,color:#e0e7ff
    style D fill:#1e1b4b,stroke:#6366f1,color:#e0e7ff
    style E fill:#1e1b4b,stroke:#6366f1,color:#e0e7ff
    style F fill:#312e81,stroke:#818cf8,color:#c7d2fe
    style G fill:#312e81,stroke:#818cf8,color:#c7d2fe
```

***

## Building Blocks

KaireonAI has **13 core building blocks** organized in four layers.

### Data Foundation

<AccordionGroup>
  <Accordion title="Connectors">
    Connect KaireonAI to your external data — databases, cloud storage, streaming
    platforms, CRMs, and APIs. 80 connector types are registered, of which
    **four are usable in a pipeline today** — Amazon S3, Google Cloud Storage,
    Azure Blob Storage and SFTP. The rest appear as **Coming soon** and cannot
    be selected. You configure a usable connector once (credentials, endpoint,
    format) and then reuse it across as many pipelines as you need.
  </Accordion>

  <Accordion title="Pipelines">
    Visual ETL workflows built with a drag-and-drop editor. Each pipeline is a
    graph of **source → transform → target** nodes. There are 19 built-in
    transforms including rename, filter, cast, deduplicate, join, and PII masking.
    Pipelines move data from your external systems into KaireonAI schemas.
  </Accordion>

  <Accordion title="Schemas">
    Entity definitions for things like customers, accounts, and transactions.
    When you create a schema, KaireonAI creates a real PostgreSQL table behind the
    scenes. You load data **in** through pipelines, and Decision Flows read data **out** at
    decision time through the enrichment stage.
  </Accordion>
</AccordionGroup>

### Decisioning Logic

<AccordionGroup>
  <Accordion title="Categories & Sub-Categories">
    A two-level business hierarchy that organizes your offers. For example,
    "Credit Cards" might be a category with sub-categories "Travel Rewards" and
    "Cash Back". Categories also define custom fields — including **computed
    fields** with formulas that calculate personalized values at decision time.
  </Accordion>

  <Accordion title="Offers">
    The core unit of KaireonAI. An offer is anything you want to recommend to a
    customer: a product, a promotion, a message, an action. Each offer has a
    priority, an optional budget, and scheduling rules. Every offer belongs to a
    category.
  </Accordion>

  <Accordion title="Decisioning Gates">
    Rules that determine who is eligible for an offer. **Hard rules** are
    pass/fail gates (for example, `age >= 18`). **Soft rules** act as score
    multipliers — a loyalty-member rule might apply a 1.2x boost instead of
    disqualifying non-members outright.
  </Accordion>

  <Accordion title="Contact Policies & Frequency Caps">
    Safeguards that prevent over-contacting customers and over-committing inventory.
    **Contact Policies** operate per-customer with cooldown periods,
    budget limits, and mutual-exclusion rules. **Frequency Caps** operate
    system-wide, capping total recommendations per offer, category, or channel
    within daily, weekly, or monthly periods. Together they provide both
    customer-level and business-level protection.
  </Accordion>

  <Accordion title="Decision Flows">
    The heart of KaireonAI. A Decision Flow is a visual pipeline with five stages:

    1. **Enrich** — Load customer data from schema tables
    2. **Compute** — Evaluate formulas to produce personalized values
    3. **Filter** — Apply decisioning gates and contact policies
    4. **Score** — Run machine-learning models or scorecards
    5. **Rank** — Arbitrate across competing offers using multi-objective scoring

    You build Decision Flows in a drag-and-drop editor, and the platform executes
    them either in real time (via the Recommend API) or in batch (via the Batch
    Recommend endpoint for outbound campaigns). An **always-on control group**
    (configurable 0–10%, default 2%) randomizes scores for a subset of requests,
    enabling continuous lift measurement without separate A/B test infrastructure.
  </Accordion>
</AccordionGroup>

### Ranking

<AccordionGroup>
  <Accordion title="PRIE Formula">
    The **PRIE formula** (`Priority = P × R × I × E`) is KaireonAI's multiplicative
    scoring model for next-best-action ranking. It combines four dimensions —
    **Propensity** (AI-predicted response likelihood), **Relevance** (contextual fit),
    **Impact** (business value), and **Emphasis** (manual priority lever, 0–2) — into
    a single score. Because it is multiplicative, a zero in any dimension eliminates
    the candidate entirely. An alternative weighted-sum formula is also available for
    blended scoring. See [PRIE Ranking Formula](/decisioning/decision-flows#prie-ranking-formula).
  </Accordion>
</AccordionGroup>

### Delivery & Feedback

<AccordionGroup>
  <Accordion title="Channels">
    Where offers get delivered. KaireonAI supports email, push notifications, SMS,
    in-app messages, web banners, webhooks, WhatsApp, and direct mail. Each
    channel has a delivery mode — API-driven, file-based, or manual.
  </Accordion>

  <Accordion title="Creatives">
    Content variants for an offer on a specific channel. A single offer might have
    a short-copy email creative, a rich-HTML email creative, and a push
    notification creative. Creatives support personalization variables and A/B
    test variants.
  </Accordion>

  <Accordion title="Outcome Types">
    The vocabulary of customer responses. Common outcomes include impressions,
    clicks, conversions, and dismissals. You record outcomes through the
    **Respond API**, and KaireonAI uses them to measure performance and close the
    learning loop.
  </Accordion>

  <Accordion title="Behavioral Metrics">
    Aggregated interaction signals that KaireonAI calculates over time — conversion rate over the
    last 30 days, revenue per customer, click-through rate by channel. Behavioral
    metrics feed back into decisioning gates and scoring models so that
    decisions improve automatically.
  </Accordion>
</AccordionGroup>

***

## How They Fit Together

The three layers connect through data flow and feedback:

```mermaid theme={null}
graph TD
    subgraph data["Data Foundation"]
        CONN["Connectors"] --> PIPE["Pipelines"]
        PIPE --> SCH["Schemas"]
    end

    subgraph logic["Decisioning Logic"]
        CAT["Categories"] --> OFF["Offers"]
        QR["Decisioning Gates"] --> DF["Decision Flows"]
        CP["Contact Policies"] --> DF
        OFF --> DF
        DF --> SCORE["Scoring & Ranking"]
    end

    subgraph delivery["Delivery & Feedback"]
        CH["Channels"] --> CR["Creatives"]
        CR --> DEL["Delivery"]
        DEL --> OT["Outcome Types"]
        OT --> BM["Behavioral Metrics"]
    end

    SCH -->|"enrichment at<br/>decision time"| DF
    SCORE --> CH
    BM -->|"feedback loop"| QR
    BM -->|"feedback loop"| SCORE

    style data fill:#0c4a6e,stroke:#38bdf8,color:#e0f2fe
    style logic fill:#1e1b4b,stroke:#6366f1,color:#e0e7ff
    style delivery fill:#065f46,stroke:#10b981,color:#d1fae5
```

**Reading the diagram:**

* **Left to center:** Pipelines load external data into schemas. At decision time, the Enrich stage in a Decision Flow reads from those same schemas to hydrate customer context.
* **Center:** Offers, decisioning gates, and contact policies feed into a Decision Flow. The flow scores and ranks candidates to produce a recommendation.
* **Center to right:** Winning offers are delivered through channels as creatives. Customer responses are recorded as outcome types.
* **Right back to center:** Behavioral metrics — built from recorded outcomes — feed back into rules and scoring models, closing the learning loop.

***

## The Governed AI Layer

On top of the building blocks, KaireonAI runs a set of AI capabilities that help
operate the platform — all under governance, so nothing reaches production
without a human approving it:

* **Governed assistant** — a chat assistant that can read your setup and draft
  changes. Any action that modifies data (create, update, delete, train, publish)
  returns a preview card and executes only after you click Approve.
* **Decisioning Autopilot** — a background loop that watches performance and
  proposes improvements (weight tweaks, challenger promotions, and similar).
  Proposals land in the approval queue as recommendations; they are never applied
  automatically.
* **Decision Sentinel** — a continuous watcher over decision-stream health. If a
  tenant opts in, it can auto-pause an active flow that starts misbehaving.

Together they let the platform assist and self-monitor while keeping the four-eyes
approval model intact.

***

## Three Ways to Use KaireonAI

<CardGroup cols={3}>
  <Card title="Real-Time API" icon="bolt">
    Call the **Recommend** endpoint and get ranked, personalized offers back in
    milliseconds. Record customer responses with **Respond**. Best for web
    personalization, in-app recommendations, and call-center prompts.
  </Card>

  <Card title="Batch Runs" icon="layer-group">
    Execute a Decision Flow against an entire customer segment in one go.
    Produces a per-customer recommendation list you can export or push to a
    downstream system. Best for email campaigns, daily offer refreshes, and
    regulatory reporting.
  </Card>

  <Card title="Journeys" icon="route">
    Multi-step orchestrated workflows that combine decisions with wait steps,
    branches, and sends. A journey might trigger a recommendation, wait two days,
    check for a response, and branch accordingly. Best for onboarding sequences,
    lifecycle campaigns, and retention programs.
  </Card>
</CardGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Get KaireonAI running locally in under 5 minutes.
  </Card>

  <Card title="Platform Walkthrough" icon="play" href="/get-started/walkthrough">
    Build a complete decisioning setup from scratch, step by step.
  </Card>

  <Card title="Glossary" icon="book" href="/reference/glossary">
    Precise definitions and naming conventions for every KaireonAI term.
  </Card>

  <Card title="Decision Flows" icon="diagram-project" href="/decisioning/decision-flows">
    Deep dive into the Composable Pipeline architecture.
  </Card>
</CardGroup>
