You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lightdash AI agents transform the way you interact with your data by allowing you to ask questions in natural language and get meaningful insights back. Currently, you can interact with AI agents in Slack or the Lightdash app, with more options coming soon.
13
+
## Introduction
8
14
15
+
Lightdash AI agents transform the way you interact with your data by allowing you to ask questions in natural language and get answers back. Whether you're exploring data in Lightdash or collaborating with your team in Slack, AI agents make data analysis as simple as having a conversation.
* Automatically select the most relevant data model and metrics to answer your question
15
-
* Build and execute queries with appropriate dimensions, filters, and limits
16
-
* Present results in the most insightful format, whether that's a visualization, table, or natural language summary
17
-
* Ask clarifying questions when needed to ensure you get exactly what you're looking for
21
+
AI agents automatically select the most relevant data models and metrics to answer your questions, build and execute queries with appropriate dimensions, metrics, and filters, and present results in the most insightful format.
18
22
19
23
<Info>
20
-
AI Agents in the Lightdash app will follow row-level, column-level, and table-level data access based on [user attributes](/references/user-attributes).
24
+
AI Agents in the Lightdash app will follow row-level, column-level, and table-level data access based on [user attributes](/references/user-attributes).
25
+
26
+
In Slack, the AI will have the user attributes of the user who set up the agent. We plan to respect user attributes based on Slack user email in the future, reach out if you need that feature!
21
27
22
-
In Slack, the AI will have the user attributes of the user who set up the agent. We plan to respect user attributes based on Slack user email in the future, reach out if you need that feature!
23
28
</Info>
24
29
30
+
## Get started
25
31
26
-
## Preparing your data for AI
32
+
Getting started with AI agents is simple - you can begin using them right away on any project in your Lightdash instance.
27
33
28
-
To get the most accurate answers, it's important to properly prepare your dimensions and metrics. The quality of the results depend on the quality of your metadata and documentation.
-**Ask questions in natural language** - Simply type what you want to know about your data, like "What's our total revenue by region?" or "Show me user growth over the last 6 months"
61
+
-**Get instant visualizations** - Receive bar charts, time series, and tables automatically generated based on your questions
62
+
-**Explore interactively** - Follow up with additional questions, drill down into specific data points, or request different chart types
63
+
-**Maintain conversation context** - AI agents remember your conversation history, so you can build on previous questions and refine your analysis
64
+
-**Provide text-only responses** - Get answers in natural language when visualizations aren't needed
65
+
-**Guide you to the right data** - Direct you to the most relevant explores or tables for your questions
66
+
67
+
### Using AI agents in Slack
36
68
37
-
### Documenting your data
69
+
Connect your AI agents to Slack for collaborative data analysis and team-wide insights sharing, here's how:
38
70
39
-
Good documentation is crucial for AI to understand your data models and provide meaningful insights. Here are some key tips:
71
+
1. Select or create an AI agent in your Lightdash instance
72
+
2. Add the Slack integration in your organization settings
73
+
3. Under 'Integrations', add the channel you want to use
4. Tag your **Slack App** in the channel you want to use
79
+
5. Start asking questions like "What kind of data can you access?" or "Show me total order amount over time"
80
+
6. Get instant results directly in Slack
40
81
41
-
* Write clear, descriptive names for metrics and dimensions that avoid acronyms or technical jargon
42
-
* Add detailed descriptions to all metrics and dimensions explaining what they represent.
43
-
* Descriptions can even include example questions that AI could answer with the metric (e.g. "Useful for answering questions like 'What is the total revenue for the USA?'").
44
-
* Use business terminology that would make sense to any user, not just technical teams
45
-
* Include units of measurement where applicable (e.g. "Revenue in USD" rather than just "Revenue")
46
-
* Document any important caveats or limitations about the data
82
+
You can also summon the bot on a thread to continue the conversation. In order for the bot to be able to respond, you need enable this context sharing in your Lightdash Integrations settings.
To get the most accurate and useful answers from your AI agents, follow these best practices for preparing your data and configuring your agents.
91
+
92
+
### Think specialized, not general
93
+
94
+
Think of AI agents as your specialized analysts - each one can be configured to focus on specific areas of your business. For example, you might create a "Marketing Assistant" that only has access to marketing data like campaign performance, lead generation, and customer acquisition metrics. This focused approach ensures more accurate, relevant responses and prevents sensitive data from being accessible to the wrong teams. To find out more about how to configure specific access, see [Curating fields with tags](#curating-fields-with-tags).
95
+
96
+
### Document your data thoroughly
97
+
98
+
Good documentation is crucial for AI to understand your data models and provide meaningful insights. The quality of the results depend on the quality of your metadata and documentation.
99
+
100
+
-**Write clear, descriptive names** for metrics and dimensions
101
+
-**Add detailed descriptions** to all metrics and dimensions explaining what they represent
102
+
-**Include example questions** in descriptions that AI could answer with the metric
47
103
48
104
Remember: If your colleague wouldn't understand your documentation, neither will the AI agent. The more context you provide, the better the AI can interpret and analyze your data.
49
105
106
+
## Set up multiple agents
50
107
51
-
### Curating the fields used by AI agents
108
+
You can create multiple AI agents, each configured for different tasks, tones, languages, or teams. Each agent can have access to different datasets to focus results and give more accurate answers.
52
109
53
-
You can use tags to categorize your metrics and dimensions in your YAML file to control which fields the AI uses. This helps focus the AI on the most relevant data for analysis.
For each AI agent, you can configure which fields are used to answer questions using the tags you've defined in your YAML files. You can add one or many tags - fields with **any** of the tags in the list will be considered by the AI agent.
125
+
Use tags to control which metrics and dimensions each AI agent can access. This helps focus the AI on the most relevant data for analysis and ensures agents only work with appropriate datasets. You can add tags at the model level to give access to entire explores, or at the individual metric and dimension level for more granular control.
57
126
58
-
To configure which fields are used by your AI agent, you need to add `tags` to your metrics & dimensions in your YAML files. You can then use these tags when you create a new AI agent to filter the metrics & dimensions available for each AI agent.
127
+
#### Adding tags at the model level
128
+
129
+
Tag entire models to give your AI agent access to all metrics and dimensions within that explore:
130
+
131
+
```bash
132
+
models:
133
+
- name: marketing_campaigns
134
+
meta:
135
+
tags: ['marketing', 'ai'] # <--------- tagging the entire model
136
+
columns:
137
+
- name: campaign_name
138
+
meta:
139
+
dimension:
140
+
type: string
141
+
- name: impressions
142
+
meta:
143
+
metrics:
144
+
total_impressions:
145
+
type: sum
146
+
```
147
+
148
+
#### Adding tags to individual metrics & dimensions
149
+
150
+
For more granular control, tag specific metrics and dimensions:
59
151
60
152
```bash
61
153
- name: orders
62
154
columns:
63
155
- name: status
64
156
meta:
65
157
dimension:
66
-
tags: ai# <--------- tagging the dimension
158
+
tags: ['ai', 'sales']# <--------- tagging the dimension
67
159
- name: location
68
160
meta:
69
161
dimension:
@@ -76,41 +168,21 @@ To configure which fields are used by your AI agent, you need to add `tags` to y
76
168
type: sum
77
169
format: usd
78
170
round: 2
79
-
tags: ai# <--------- tagging the metric
171
+
tags: ['ai', 'finance']# <--------- tagging the metric
80
172
```
81
173
82
-
##### Configuring tags used by each agent
83
-
84
-
For each AI agent, you can configure which fields are used to answer questions using the tags you've defined in your YAML files.
85
-
86
-
You can add one or many tags to this list. Fields with **any** of the tags in the list will be considered by the AI agent in that Slack channel.
87
-
88
-

89
-
90
-
91
-
### Providing custom instructions
92
-
93
-
You can provide custom instructions to each AI agent on its settings page. Watch the video to learn more.
Here's a sneak peak at an alpha feature, multiple AI agents! You can set up a different agent for different tasks, different tones, languages, etc. and each one can have access to different datasets to focus results and give more accurate answers.
0 commit comments