> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcemedium.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Analysis Workflows

> How the AI Analyst handles different types of questions with specialized workflows

The AI Analyst uses different workflows depending on what you're asking. Each workflow is optimized for its type of question — from quick knowledge lookups to comprehensive multi-perspective analyses.

***

## How Questions Are Routed

When you send a message, the AI Analyst classifies it by intent:

| Question Type                 | Workflow                                                 |
| ----------------------------- | -------------------------------------------------------- |
| **Specific metric questions** | [Standard Analysis](/ai-analyst/workflows/standard)      |
| **Raw rows or fields**        | [Raw Data Pull](/ai-analyst/workflows/data-pull)         |
| **Open-ended / strategic**    | [Deep Analysis](/ai-analyst/workflows/deep-analysis)     |
| **Definitions & concepts**    | [Knowledge Retrieval](/ai-analyst/workflows/knowledge)   |
| **Summaries and opinions**    | [Summaries & Opinions](/ai-analyst/workflows/follow-ups) |

The classification happens automatically based on the question's structure and intent.

***

## Thread continuity behavior

The AI keeps follow-up context in the **same thread**.

* In **DM**, you can ask follow-ups naturally.
* In **channels**, mention the bot with `@SourceMedium` for follow-ups.
* To reset context, start a new thread.

<Card title="Thread continuity and follow-ups" icon="message-lines" href="/ai-analyst/thread-continuity-follow-ups">
  Learn what carries forward in the same thread, what does not, and how to reset cleanly.
</Card>

***

## Workflow Overview

<CardGroup cols={2}>
  <Card title="Standard Analysis" icon="bolt" href="/ai-analyst/workflows/standard">
    Single-path SQL analysis for specific metrics and bounded time ranges.
  </Card>

  <Card title="Raw Data Pull" icon="file-csv" href="/ai-analyst/workflows/data-pull">
    Single-path SQL retrieval for rows, fields, and exports. Returns a CSV automatically.
  </Card>

  <Card title="Deep Analysis" icon="brain" href="/ai-analyst/workflows/deep-analysis">
    Multi-perspective analysis for strategic questions. Runs multiple Standard Analyses in parallel and synthesizes insights.
  </Card>

  <Card title="Knowledge Retrieval" icon="book" href="/ai-analyst/workflows/knowledge">
    Instant answers about metrics, tables, and concepts. Draws from SourceMedium documentation and metadata.
  </Card>

  <Card title="Follow-Up Summary & Opinion" icon="messages" href="/ai-analyst/workflows/follow-ups">
    Thread-aware summaries, rewrites, recommendations, and follow-up analysis.
  </Card>
</CardGroup>

***

## Choosing the Right Approach

### For Data Answers

Ask specific, bounded questions:

```
What was our revenue last week?
Top 10 products by units sold this month
What's our ROAS by channel for the past 30 days?
```

These trigger **[Standard Analysis](/ai-analyst/workflows/standard)** for quick results.

### For Raw Data Pulls

Ask for rows, fields, or exports:

```
Pull order ID, date, UTM source, and revenue for last week
Export customers acquired in March with email and first order date
Show line items for SKU ABC-123 from the past 30 days
```

These trigger **[Raw Data Pull](/ai-analyst/workflows/data-pull)** — single-path retrieval that skips Deep Analysis and attaches a CSV.

### For Strategic Insights

Ask open-ended, exploratory questions:

```
How can we improve our marketing performance?
What trends should we be watching?
Why are our metrics declining?
```

These trigger **[Deep Analysis](/ai-analyst/workflows/deep-analysis)** for comprehensive multi-perspective analysis.

### For Definitions & Concepts

Ask about metrics, tables, or how things work:

```
What is LTV?
How is ROAS calculated?
Which table has order data?
```

These trigger **[Knowledge Retrieval](/ai-analyst/workflows/knowledge)** for instant documentation-backed answers.

### For Follow-Ups

Reply in the same thread after an answer:

```
Summarize this for leadership
What is your recommendation?
Break that down by channel
```

These trigger **[Summaries & Opinions](/ai-analyst/workflows/follow-ups)** — no SQL, uses retained thread context. It runs fresh SQL when your follow-up asks for a new computation.

***

## Workflow Comparison

| Feature                | Standard         | Data Pull       | Deep Analysis       | Knowledge         | Follow-Up Summary/Opinion             |
| ---------------------- | ---------------- | --------------- | ------------------- | ----------------- | ------------------------------------- |
| **Data Source**        | BigQuery         | BigQuery        | BigQuery            | Docs + Metadata   | Thread context                        |
| **SQL Queries**        | 1                | 1               | 2–4                 | 0 (usually)       | 0 unless new computation is requested |
| **Parallel Execution** | No               | No              | Yes                 | No                | No                                    |
| **Charts**             | Yes, when useful | No              | Yes                 | No                | No                                    |
| **Best For**           | Specific metrics | Rows and fields | Strategic questions | Learning concepts | Reframing prior results               |

***

## How Classification Works

The AI uses contextual signals to determine the right workflow:

**Standard Analysis triggers:**

* Specific time ranges ("last week", "in January")
* Named metrics with data requests ("revenue", "orders", "ROAS")
* Rankings and comparisons ("top 10", "vs last month")
* Computed results ("by channel", "trend over time")

**Data Pull triggers:**

* Pull/export language ("pull data", "export rows", "give me raw orders")
* Specific requested fields ("order ID, customer email, UTM source")
* Specific entity lookups ("show me line items for order 123")

**Deep Thinking triggers:**

* "How can we improve..." questions
* "What should we focus on..." questions
* Trend analysis without specific bounds
* Strategy and optimization requests

**Knowledge Retrieval triggers:**

* "What is..." or "What does...mean"
* "How is X calculated?"
* "Which table has..." or "What columns..."
* Data health and attribution health questions

**Summary and opinion triggers:**

* "Summarize this"
* "What should we do next?"
* "What is your recommendation?"
* "Rewrite that for leadership"

<Tip>
  If you want to override the classification, be explicit. "Just give me the revenue numbers" will use Standard Analysis even if your phrasing might otherwise trigger Deep Thinking.
</Tip>

***

## Related

<CardGroup cols={2}>
  <Card title="Understanding Results" icon="chart-simple" href="/ai-analyst/understanding-results">
    How to read responses, charts, and SQL output.
  </Card>

  <Card title="Example Questions" icon="lightbulb" href="/ai-analyst/what-you-can-ask">
    See examples across all domains and workflows.
  </Card>
</CardGroup>
