# Usage in Athenic AI

#### AI Analyst (Chat)

Athenic AI can answer questions in two modes: **Metrics** (recommended) or **SQL**. Users can choose the mode from the dropdown next to the chat input.

<div data-with-frame="true"><figure><img src="/files/oYTf7ju3JRaktQPXQCN1" alt=""><figcaption></figcaption></figure></div>

The mode selection is on a per chat basis. A chat is locked to the mode you used for the first question:

* After you send your first question, the **SQL / Metrics dropdown is disabled** for that chat.
* To switch modes, start a **new chat** and choose the other option.

### **Metrics (default)**

Metrics mode uses the Governed Metrics configured by your team admin so results are computed using your defined semantic models, metrics, and dimensions.

When you ask a question, Athenic shows an **AI Interpretation** of the request as structured query parts, including:

* **Metrics**
* **Filters**
* **Group By**
* **Time Grain**
* **Date Range**
* **Order By** and **Limit** (when relevant)

<div data-with-frame="true"><figure><img src="/files/LaXO3SSftsGV68IvgcS4" alt=""><figcaption><p>The image shows a proposed metric generated by Athenic based on the user's question.</p></figcaption></figure></div>

You can then:

* Click **Edit** to adjust the proposed metrics, filters, grouping, or time settings
* Click **Confirm** to run the query and **View Results**

This mode is best when you want consistent, governed definitions (e.g., revenue, units, active users) and reusable analysis patterns. For non-technical users, this is how they can ask questions and be confident they are getting what they asked for.

**AI Generated Metric / Advanced Dimension**

If Athenic AI can’t find an existing metric or dimension that matches your question, you can ask it to create a new one directly from the **Edit** panel.

**How it works**

1. Open **Edit** on the AI Interpretation.
2. Click on the AI Icon next to the Cancel button.
3. Toggle between **Metric** or **Dimension** depending on what you are trying to add.
4. Describe what you want in plain language (e.g., a metric for “Gross margin % = (revenue - cost) / revenue” or a dimension for “Customer region = US".
5. Athenic generates a **draft** metric or advanced dimension and will show you the description and generated logic.&#x20;
6. Once you save the draft, you can add it to your query via the editor.

<div data-with-frame="true"><figure><img src="/files/erbQtpd773olGrh11twf" alt=""><figcaption><p>Athenic will scan your semantic models to generate metrics or advanced dimensions based on user input. </p></figcaption></figure></div>

**Quarantined (Draft) Items**

* AI-generated metrics/dimensions appear **in orange** and are labeled **Quarantined**.
* Quarantined items require **admin approval** before they become part of your shared semantic layer.

<div data-with-frame="true"><figure><img src="/files/KzMZjfpZtZBunRTHKRiO" alt=""><figcaption></figcaption></figure></div>

**After Approval**&#x20;

Once an admin approves the draft, it becomes a normal governed metric/dimension and will appear and behave like any other metric or dimension throughout Athenic.

### **SQL**

SQL mode generates SQL using your knowledge graph setup. It does not include the structured interpretation blocks (metrics/filters/group by) and you work directly in SQL.

Use SQL mode when you need full control over the query or exploratory custom logic that are not covered by Governed Metrics.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.athenic.com/governed-metrics/usage-in-athenic-ai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
