diff --git a/guides/ai-agents.mdx b/guides/ai-agents.mdx index 4ccd4d30..a3746087 100644 --- a/guides/ai-agents.mdx +++ b/guides/ai-agents.mdx @@ -54,6 +54,7 @@ This guide covers everything you need to know about AI agents in Lightdash: ## Key features - **Natural language queries** - Ask questions in plain English and get instant answers +- **Ask from a chart or dashboard** - Launch a conversation with the chart or dashboard you're viewing already pinned as context - **Automatic visualizations** - Get charts, tables, and dashboards generated based on your questions - **Slack integration** - Collaborate with your team directly in Slack channels - **Memory and learning** - Agents remember corrections and improve over time diff --git a/guides/ai-agents/using-ai-agents.mdx b/guides/ai-agents/using-ai-agents.mdx index 2ca3d1d7..525ad7a5 100644 --- a/guides/ai-agents/using-ai-agents.mdx +++ b/guides/ai-agents/using-ai-agents.mdx @@ -20,6 +20,35 @@ As mentioned earlier, Lightdash agents use the **semantic layer** defined in you This ensures that the AI generates accurate queries and visualizations based on your specific data context. So, *when an Agent generates an answer, the output is a semantic query, **not SQL!*** This means that you can easily swap between the conversational AI interface and the standard Lightdash exploration experience. +## Asking about a chart or dashboard + +You can launch an AI conversation with a chart or dashboard pre-loaded as context. From the resource's `⋯` menu, click **Ask AI Agent**. + +This opens a new tab on the new-thread page for your default agent. The chart or dashboard appears as a **pinned context card** above the input, and the agent treats it as the subject of the conversation. + + + Ask AI Agent menu item on a saved chart + + +### Pinned context + +- The pinned card stays visible above your message in the thread, so anyone reading later can tell what was being discussed. +- Click the pinned card to open the chart or dashboard in a new tab. +- The pinned context persists across follow-up messages — *"now break it down by region"* still refers to the originally pinned chart. + +### What you can ask + +When you pin a saved chart, the agent can read its actual data (subject to your [data access setting](/guides/ai-agents/data-access)). It honors the chart's saved filters, sorts, and custom metrics, so you can ask: + +- *"Why is this trending up?"* +- *"Are there outliers in this chart?"* +- *"Compare this chart's last 30 days to the previous period."* + +If your agent has data access disabled, pinning still works — the agent sees the chart's structure (name, dimensions, metrics) but no row values are sent to the underlying LLM. + ## Example use cases ### Advanced visualizations with window functions diff --git a/images/guides/ai-agents/ask-ai-agent-from-chart.png b/images/guides/ai-agents/ask-ai-agent-from-chart.png new file mode 100644 index 00000000..cd0fd499 Binary files /dev/null and b/images/guides/ai-agents/ask-ai-agent-from-chart.png differ