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

# Understanding Results

> How to interpret responses, charts, and SQL from the AI Analyst

When the AI Analyst answers your question, it returns a structured response with multiple components. This page explains what each part means and how to use it.

***

## Response Components

A typical response includes:

| Component      | Description                                                                         |
| -------------- | ----------------------------------------------------------------------------------- |
| **Answer**     | Natural language summary of the results, or a short confirmation for raw data pulls |
| **Chart**      | Visual representation of the data (when applicable)                                 |
| **Data Table** | The underlying numbers in tabular format                                            |
| **SQL Query**  | The exact query used to retrieve the data                                           |
| **Files**      | CSV, SQL, and chart attachments when applicable                                     |

***

## The Answer

The AI Analyst summarizes findings in plain language. This is designed to give you the key insight without needing to parse raw data.

**Example:**

> Your total revenue last week was $142,350, down 8% from the previous week. The top channel was Paid Social at $52,100 (37% of total).

The answer prioritizes:

* The specific number you asked for
* Relevant context (comparisons, breakdowns)
* Highlighting notable patterns

For raw data pulls, the answer is intentionally shorter. It confirms what was pulled, the time range covered, and the fields included without adding trends or recommendations you did not ask for.

***

## Charts

When your question lends itself to visualization, the AI Analyst generates a chart. Common chart types:

| Chart Type     | Used For                                                      |
| -------------- | ------------------------------------------------------------- |
| **Bar chart**  | Comparisons across categories (channels, products, campaigns) |
| **Line chart** | Trends over time (daily revenue, weekly orders)               |
| **Table**      | Detailed breakdowns with multiple metrics                     |

Charts are generated as images and posted directly in the Slack thread.

<Note>
  If a chart doesn't appear, the AI Analyst determined the data was better presented as text, a table, or a CSV. Raw data pulls skip charts by default.
</Note>

***

## Data Tables

For questions that return multiple rows, you'll see a data table showing the raw results. This is the actual output from BigQuery, limited to a reasonable preview size.

**Example:**

| channel        | revenue | orders |
| -------------- | ------- | ------ |
| Paid Social    | 52,100  | 412    |
| Email          | 38,200  | 298    |
| Organic Search | 28,750  | 215    |

You can download the full dataset as a CSV file attached to the response.

### Raw Data Pull Tables

When you ask to pull or export data, the table preview shows a sample of the returned rows. The full result is attached as `results.csv`.

<Tip>
  Raw pulls work best when you name the exact fields you need. For example: "Pull order ID, order date, customer email, UTM source, UTM medium, UTM campaign, and net revenue for last week."
</Tip>

***

## The SQL Query

Every data response includes the SQL query used. This is useful for:

* **Verification** — Confirm the AI understood your question correctly
* **Learning** — See how to write similar queries yourself using SourceMedium table schemas
* **Iteration** — Copy and modify the query in BigQuery for deeper follow-up analysis

<Tip>
  **Use the AI as a SQL tutor.** If you're learning BigQuery, comparing the generated SQL against our [Table Schemas](/data-activation/data-tables/sm_transformed_v2/index) is the fastest way to master your data structure. You can copy any query directly into the [BigQuery console](/onboarding/analytics-tools/bigquery-essentials) to test your own modifications.
</Tip>

**Example:**

```sql theme={null}
SELECT
  sm_channel AS channel,
  SUM(order_net_revenue) AS revenue,
  COUNT(DISTINCT sm_order_key) AS orders
FROM `your_project.sm_transformed_v2.obt_orders`
WHERE is_order_sm_valid = TRUE
  AND DATE(order_processed_at_local_datetime) BETWEEN '2024-01-08' AND '2024-01-14'
GROUP BY 1
ORDER BY 2 DESC
```

<Tip>
  If the results don't match your expectations, check the SQL to see how the AI Analyst interpreted your question. Date ranges and filters are common sources of misunderstanding.
</Tip>

***

## File Downloads

Responses may include downloadable files:

| File          | Contents                         |
| ------------- | -------------------------------- |
| `query.sql`   | The SQL query used               |
| `results.csv` | Full data export (not truncated) |
| `chart.png`   | The visualization as an image    |

These files are attached to the Slack message and can be downloaded directly.

<Info>
  For raw data pulls, `results.csv` is attached automatically even if you did not explicitly ask for a CSV.
</Info>

***

## Follow-Up Responses

In the same Slack thread, you can ask the AI Analyst to summarize, reframe, or give an opinion based on prior analysis:

```
Summarize this for leadership
What should we do next?
Break that down by channel
Explain the takeaway in plain English
```

Summary and opinion responses use retained thread context. They do not run fresh SQL unless your follow-up asks for a new computation or breakdown.

<Note>
  In Slack channels, mention the bot when replying in a thread. In direct messages, you can continue the thread normally.
</Note>

***

## When Things Look Wrong

If results don't match your expectations:

<Steps>
  <Step title="Check the date range">
    Review the SQL query to confirm the time period matches your intent.
  </Step>

  <Step title="Verify the metric">
    Make sure the AI Analyst used the metric you expected (e.g., gross revenue vs. net revenue).
  </Step>

  <Step title="Check data freshness">
    Ask "How is my data health?" to confirm the underlying tables are up to date.
  </Step>

  <Step title="Rephrase and retry">
    If the AI misunderstood, rephrase with more specificity and try again.
  </Step>
</Steps>

<CardGroup cols={2}>
  <Card title="Troubleshooting" icon="wrench" href="/ai-analyst/troubleshooting">
    Common issues and how to resolve them.
  </Card>

  <Card title="Data Health Check" icon="stethoscope" href="/ai-analyst/diagnostics/data-health">
    Verify your data is fresh before querying.
  </Card>
</CardGroup>

***

## Going Deeper

Once you have results, you can explore further:

<CardGroup cols={2}>
  <Card title="BigQuery Essentials" icon="database" href="/onboarding/analytics-tools/bigquery-essentials">
    Learn to run and modify queries directly in BigQuery.
  </Card>

  <Card title="Looker Studio Guide" icon="chart-pie" href="/onboarding/analytics-tools/looker-studio-guide">
    Build custom visualizations from your data.
  </Card>
</CardGroup>
