> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xdr-5.x/detect-investigate-and-respond-to-threats/agentic-assistant-chat/use-natural-language-to-query-and-visualize-your-data.md).

# Use natural language to query and visualize your data

Use natural language prompts to request visual insights by instructing the Agentic Assistant to display its findings as charts or graphs. This makes it easy to visualize data for threat hunting, business intelligence, or investigations without writing XQL queries or manually creating data visualization.

When you request a visualization, the agent generates an XQL query, executes it, and then presents the results in a graph. Agentic Assistant supports all graph types supported by the Cortex Platform.

This feature is provided as a built-in system hidden action and does not appear in the Agentic Assistant Hub. It is an enhancement of the built-in TextToXQL and Cortex - Run XQL Query actions. For more information, see [Create and run XQL queries with Agentic Assistant chat](/cortex-xdr-5.x/detect-investigate-and-respond-to-threats/agentic-assistant-chat/create-and-run-xql-queries-with-agentic-assistant-chat.md).

**Best practices for prompting**

We recommend using clear specific language to request that the agent create these visualizations. Use terminology such as:

* Create a pie chart showing the distribution of alert severities over the last 7 days.
* Visualize the top 10 targeted assets by malware in a bar chart.
* Generate a line chart tracking the number of failed login attempts per day for the past month.

**Visualization capabilities**

To help you get the most out of your generated grpahs and charts, the Agentic Assistant supports the following capabilities:

* **Visualization creation or editing**: You can use natural language to instruct the agent to build a new query from scratch or to modify an existing one.
* **Data filtering**: You can ask the agent to alter the visual representation of your data. The system supports filtering without risking any changes to or breaking the existing underlying XQL query.
* **Dashboard integration**: Once the graph or chart is created, you can click ![three-dots-dark.png](/files/6wJ78z2xab46v0s7Qz2H) to save it to the **Widget Library** and then apply it to your dashboard from the **Widget Library**.

  <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><h3>Note</h3><p>Once the graph or chart is saved the <strong>Widget Library</strong>, the link to the chat artifact is severed, and the agent does not track subsequent changes made to the widget or the dashboard.</p></div>


---

# 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 dynamically by asking a question.

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

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xdr-5.x/detect-investigate-and-respond-to-threats/agentic-assistant-chat/use-natural-language-to-query-and-visualize-your-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
