# Deep Insight

**Agent Mode** (activated by **Deep Insights**) turns Kaiya into an always-on AI Analyst that plans, executes, validates, and explains multi-step analysis from a single question. It combines the flexibility of agents with the consistency of workflows so you get 20× deeper insights and recommended next steps.

<figure><img src="https://1424959359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs16h5onryWtbaHwBa10b%2Fuploads%2FQPVwfau3LUIxrC3X1ruz%2Fimage.png?alt=media&#x26;token=95bec17e-536f-4654-a466-8016c6821bff" alt=""><figcaption></figcaption></figure>

1. Go to Kaiya Conversational AI.
2. Click the **Deep Insights** button (left of the query bar).
3. Select your Business View from the dropdown. If you’re unsure about the required Business View, feel free to leave it at **“All Business Views”**.
4. Type your question and press Enter (or click on **Submit**).

{% hint style="success" %}
**Deep Insights** can be toggled per question; you can run standard chat for simple asks and switch on **Deep Insights** for multi-step deep dives.
{% endhint %}

### Who is it for?

* Business users who want answers that go beyond chat (timing, magnitude, why, and what to do next).
* Analysts who need repeatable deep dives without manual orchestration.
* Data teams that require governed, audited execution across SQL and Python.

### How Agent Mode works (at a glance)

A simple loop, **Ask → Plan → Execute → Validate → Explain → Save,** turns complex questions into governed, multi-step analysis. A multi-agent planner picks **SQL** or **Python** per step, applies transparent checks (samples, joins, fiscal calendar), then returns a clear narrative with next steps.

#### Plan

* A multi-agent planner breaks the question into steps.
* Chooses the right tools: SQL, Python, and visualization.
* Applies sensible defaults and only asks brief clarifications when necessary.

#### Execute

* SQL: Runs warehouse-native work—joins, subqueries, dynamic formulas, nested aggregations.
* Python: Handles methods SQL can’t. Changepoints, contribution/variance with volume weighting, sample-size checks, cohorts/retention, correlation/association, causal probes, forecasting with intervals, segmentation/clustering.

#### Validate & Reflect

* Checks whether each group has a big enough sample so results aren’t noisy.
* Prevents bad joins that duplicate rows (fan-out/chasm traps).
* Keeps the join at the correct grain so numbers add up.
* Uses your fiscal calendar so results respect your business timeline.

#### Explain

* Delivers timing and magnitude, ranked drivers, and relevant charts/tables.
* Includes concise recommended next steps.

### Example walk-through

Consider this question:\
“**How did cancellation rate change week-over-week in Q3, and which regions/products/channels contributed most to the WoW delta?**”

<figure><img src="https://1424959359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs16h5onryWtbaHwBa10b%2Fuploads%2FXPiN2Sn44cSUSAQMIrYh%2Flast%20minute%20video.gif?alt=media&#x26;token=f628a85e-59ad-4dbe-98ca-7183a56f34d9" alt=""><figcaption></figcaption></figure>

**Step 0: Ask**\
You ask the question in plain English. If a detail is missing (e.g., fiscal vs. calendar weeks), Kaiya asks clarification once, then proceeds.

**Step 1: Build the baseline**\
Kaiya pulls governed data at weekly grain for Q3, honoring row-level policies and your fiscal calendar. It computes the conversion rate series and applies obvious filters (e.g., exclude tests). Outputs are **audited** and preview-able so you can confirm scope.

**Step 2: Create analysis slices**\
Kaiya enriches the baseline with **Region / Product / Channel** via governed joins. It generates only the slices relevant to the question to avoid fan-out and noise.\
Sample sufficiency and grain consistency checks ensure stability.

**Step 3: Apply the best method**\
Based on intent (“why + drivers”), Kaiya runs variance/contribution analysis and changepoint detection; routes heavy work to SQL and advanced methods to Python. Guardrails enforce sensible defaults and minimum samples; confidence cues are added where possible. You get a ranked, interpretable driver table aligned to the question.

**Step 4: Validate & reflect**\
Kaiya verifies enough data, correct join grain, no double counting, and correct week mapping. All defaults used are disclosed; if something looks off, it adjusts filters/grain/method and reruns the affected step.

**Step 5: Explain & package**\
You receive a plain-English narrative with timing & magnitude of the drop, ranked drivers by region/product/channel, clear visuals, and recommended next steps (e.g., staffing fix, promo tweak). All assumptions, steps, and artifacts are disclosed for auditability; you can save this run as a reusable workflow.

{% hint style="danger" %}
Supported data sources for **Agent Mode** and **Text-to-SQL**: Snowflake, Redshift, ClickHouse. Spark is not yet supported. Please migrate critical datasets to a supported warehouse for these features.
{% endhint %}
