# AI Insight Editor

## Overview

The AI Insight Editor allows you to create queries using natural language. There is no need to handcraft any SQL, the AI editor will take care of it for you. Think of this as submitting a request your analyst.&#x20;

***

### Common Use Cases

* KPI pulse: “Daily active users vs. yesterday” → instant line chart for stand-ups.
* Growth analytics: “MRR by plan for the last six quarters” → stacked bar for board decks.
* Cohort retention: “Week-1 retention for users who signed up in May” → retention curve without manual joins.
* Content performance: “Top 10 landing pages by conversion last month” → sortable table ready for marketing.
* Ad-hoc finance: “Average order value by region in Q1” → pivoted view for exec reviews.

***

## Generating Insights

In the AI Insight Editor you simply write a plain-English question in the large textbox. The editor will then translate the prompt into production ready SQL, executes the query against your warehouse with existing permissions and returns both the data table and an auto generated chart for you to refine or save.

<figure><img src="/files/JFXb55cVdsLMiZswfdcs" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/xsCXLLMmuvhlM6ILptOf" alt=""><figcaption></figcaption></figure>

As you type, the system peeks at your schema and surfaces inline event suggestions (e.g., email\_opened, page\_view) so you can click them for speed or ignore them entirely; the model will still map your words to the right tables and columns.&#x20;

<div align="center"><figure><img src="/files/QTsoaRm20YZ1oqTPplwI" alt=""><figcaption></figcaption></figure></div>

***

## Savings Insights and Queries&#x20;

\
Once you are satisfied with your query you can then save the query. When you save the query the query will then be available for later use across the platform.

<div align="left"><figure><img src="/files/h3BHlKe7XEqJzohUbMhQ" alt=""><figcaption></figcaption></figure></div>

Similarly you can save the charts that have been generated.

<div align="left"><figure><img src="/files/oUIa8HGjl8s9v9X0k4UB" alt=""><figcaption></figcaption></figure></div>

<table><thead><tr><th width="138.2109375">Button</th><th>Outcome</th></tr></thead><tbody><tr><td>Save changes</td><td>Saves the current chart so it is available to view against this query.</td></tr><tr><td>New</td><td>Create a new chart based on this query.</td></tr><tr><td>Add to </td><td>Add this chart to an existing report.</td></tr><tr><td>Folder</td><td>See the existing charts and edit them from this report.</td></tr></tbody></table>

***

## Convert to SQL&#x20;

Once generated you can also convert the AI generated query back into SQL. Simply click on the SQL tab and you will be given the option to switch or to convert the query back into SQL.

<div align="left"><figure><img src="/files/Ham9WKTFCu2d4frg57yx" alt=""><figcaption></figcaption></figure></div>

<figure><img src="/files/Pd1M8vCVIDS3EN4WzzrX" alt=""><figcaption></figcaption></figure>

***

## Advance Settings

In most circumstances the default model will be sufficient for most use cases. However we do offer the ability to choose different models and fine tune their settings.

<table><thead><tr><th width="171.30078125">Control</th><th width="572.078125">What it does</th></tr></thead><tbody><tr><td>Temperature (0 – 2)</td><td>Governs randomness. Lower = more deterministic; higher = more creative.</td></tr><tr><td>Top P (0 – 1)</td><td>Top P trims off the least-likely words before the model chooses, so a lower value (e.g., 0.5) forces it to stick to the safest, most obvious options, while 1.0 lets it pick from the entire vocabulary.</td></tr><tr><td>Maximum Length</td><td>Hard cap on how many tokens the model can return (approx. 4 chars per token).</td></tr></tbody></table>

<br>


---

# 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://userflux.gitbook.io/userflux-docs/feature-guides/analytics/insights/ai-insight-editor.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.
