> For the complete documentation index, see [llms.txt](https://docs.datasentinel.io/manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasentinel.io/manual/ai-connector/use-the-assistant/generate-reports.md).

# Generate and share reports

Turn an analysis into a document you can share: a PDF built by the platform, or an HTML or Markdown report built by the assistant.

Findings that stay in a chat window are easy to lose. Ask the assistant for a report and you get a document to attach to a ticket, hand to a colleague, or file with a post-mortem.

Two kinds of reports are available, and they come from different places:

|                              | Platform PDF report                                          | Assistant-built report                                                       |
| ---------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------------- |
| **Built by**                 | The Datasentinel platform, server-side                       | The assistant, from the analysis on screen                                   |
| **Content**                  | The raw monitoring data for one instance and one time window | The exact findings, charts, and recommendations of the analysis you just ran |
| **Format**                   | PDF, delivered as a single-use download link                 | Interactive HTML file, or Markdown to paste anywhere                         |
| **Scope**                    | One instance                                                 | One instance or many (a fleet ranking, a cohort, a comparison)               |
| **Needs a fresh data fetch** | Yes, the platform builds it from scratch                     | No, it reuses the data already retrieved in the session                      |

## Platform PDF reports

The PDF is produced by Datasentinel itself, with the same content as the [Reporting](https://app.gitbook.com/o/DaDQkGCM7r2TghFSBFLQ/s/yE16Xb3IemPxJWydtPOj/features/key-features/reporting) feature of the web interface. The assistant only relays your request to the platform and hands back the download link.

Four report types exist:

| Type            | Content                                                                      |
| --------------- | ---------------------------------------------------------------------------- |
| **Full**        | Instances, queries, server, and workload in one document                     |
| **Workload**    | Session history overview (average active sessions)                           |
| **Top queries** | Top SQL statements ranked by a metric of your choice (total time by default) |
| **Query**       | Deep-dive on a single query, including its captured execution plan           |

Every PDF needs three things: an authenticated session, the name of one instance, and a time window of 24 hours at most. If your request leaves one of them out, the assistant asks for it before calling the platform.

{% @arcade/embed url="<https://app.arcade.software/share/NmwIPZykGzvujt2wcXIK>" flowId="NmwIPZykGzvujt2wcXIK" %}

*This walkthrough was recorded using GitHub Copilot in Visual Studio Code.*

{% hint style="warning" %}
**The download link is single-use.** Open it in your browser as soon as the assistant returns it: it expires after the first access. The assistant never downloads, opens, or summarizes the PDF for you.
{% endhint %}

**Example prompts:**

* "Generate a full PDF report for prod-eu-1 for this morning 08:00-10:00."
* "Generate a top-queries PDF report for prod-eu-1 ranked by WAL volume."
* "Generate a query report for the slowest query on prod-eu-1, including its plan."
* "Generate a workload PDF report for prod-eu-1 for last night 22:00-23:00."

## Assistant-built reports

Once an analysis is on screen, the assistant can turn it into a self-contained report without calling the platform again.

The report mirrors what you just read: the same findings, numbered in the same order as in the chat, the same recommendations with their rationale and expected gain, and the same vocabulary as your communication style (TECHNICAL or PLAIN).

The same report exists in two formats:

{% tabs %}
{% tab title="Interactive HTML" icon="browser" %}
The default when your assistant can write and hand over a file. A single `.html` file that opens in any browser, with no external dependency.

* An **Overview** tab first: KPI cards, the workload charts, and a one-paragraph summary.
* One tab per section that has data worth its own page: top queries, waits, blocking, tables, and so on.
* A **Recommendations** tab last, ranked biggest win first.
* Light and dark themes, and the verbatim SQL statement and execution plan for a query-focused report.
  {% endtab %}

{% tab title="Markdown" icon="file-code" %}
The portable twin: same sections, same findings, tables instead of charts. Ask for it when the report has to travel somewhere that is not a browser: a ticket, a wiki page, a pull request description, or a chat message.

It is also what the assistant produces when it runs in a host that cannot hand over a file. In that case the report is emitted directly in the response, ready to copy.
{% endtab %}
{% endtabs %}

You do not have to remember to ask. After every analysis, the assistant closes with a short next-step menu, and that menu always carries the assistant-built report as an option.

For a single-instance analysis it also offers the platform PDF; for a multi-instance analysis (a fleet ranking or a cohort comparison) only the assistant-built report applies, because a PDF covers one instance.

**Example prompts:**

* "Give me an interactive HTML report of that last analysis."
* "Give me an HTML report for that period."
* "Give me that as Markdown."

{% hint style="success" %}
**Which one should I pick?**

Take the platform PDF when you want the complete raw picture of one instance, formatted the same way as in the web interface.

Take the assistant-built report when you want the analysis you just read, with its findings and recommendations, in a file you can share.
{% endhint %}

Reports pair well with automation: a scheduled analysis can end with an HTML or Markdown report every time it runs. See [Run recurring analyses](/manual/ai-connector/analyze-and-tune-workloads/recurring-analyses.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.datasentinel.io/manual/ai-connector/use-the-assistant/generate-reports.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
