@@ -8,25 +8,34 @@ keywords:
8
8
- getting started
9
9
- guide
10
10
sidebar_class_name : quickstart-icon
11
+ toc_max_heading_level : 4
11
12
---
12
13
13
14
import Thumbnail from " @site/src/components/Thumbnail" ;
14
15
15
16
# Quickstart with PromptQL
16
17
18
+ ## Introduction
19
+
17
20
This guide is designed to give you a high-level overview of PromptQL and how you can use it to make better decisions
18
- about your business and automate tasks— all without any coding knowledge required.
21
+ about your business and automate tasks; all without any coding knowledge required.
19
22
20
23
:::info Prerequisites
21
24
22
25
Before continuing, you'll need a [ Hasura Cloud account] ( https://cloud.hasura.io/signup/new_user ) .
23
26
24
27
If you have your own project, you can apply the information below to it. Otherwise, we have a
25
- [ collection of sandboxes] ( /index.mdx#demos ) which allow you to try PromptQL and get a feel for the experience.
28
+ [ collection of sandboxes] ( /index.mdx#demos ) which allow you to try PromptQL and get a feel for the experience. Below,
29
+ we'll use the ` sandbox-gtm ` example.
30
+
31
+ If you're looking to build a new project from scratch, check out
32
+ [ these guides] ( /how-to-build-with-promptql/overview.mdx ) .
26
33
27
34
:::
28
35
29
- ## Open your project
36
+ ## Guide
37
+
38
+ ### Open your project
30
39
31
40
Each PromptQL project can be accessed via a unique URL. You can access all your projects
32
41
[ from the PromptQL Console] ( https://promptql.console.hasura.io/ ) .
@@ -42,58 +51,29 @@ ask questions about your data and create automations.
42
51
43
52
<Thumbnail src = " /img/get-started/pql-playground.png" alt = " The PromptQL Playground." width = " 1000px" />
44
53
45
- ## Talk to your data
54
+ ### Talk to your data
46
55
47
56
Primarily, you'll interact with PromptQL in one of two ways: either by asking questions, or creating automations.
48
57
49
- ### Ask a complex question
50
-
51
- Using [ the ` sandbox-gtm ` project] ( https://promptql.console.hasura.io/public/sandbox-gtm/playground ) , we're going to ask
52
- the following question:
53
-
54
- ``` plaintext
55
- Which enterprise deals are at risk of slipping this quarter based on engagement patterns?
56
- ```
57
-
58
- If you're using your own project, ask a question. Otherwise, [ click here] ( # ) to be dropped into the playground directly
59
- with the question pre-loaded!
60
-
61
- <details >
62
- <summary >
63
- Why is this complex?
64
- </summary >
65
-
66
- This is complex because it requires:
67
-
68
- 1 . Defining "enterprise deals" - Could be based on:
69
-
70
- - Account tier/type
71
- - Deal size
72
- - Number of users/usage metrics
73
- - Industry/vertical
74
-
75
- 2 . Determining "risk of slipping" by analyzing:
58
+ #### Ask a complex question
76
59
77
- - Sales engagement (calls, tasks, events)
78
- - Buyer engagement signals (6sense scores, successful touches)
79
- - Deal velocity compared to similar won deals
80
- - Current stage vs time left in quarter
81
- - Historical patterns of similar deals that slipped
60
+ Using the ` sandbox-gtm ` project, we're going to ask the following question:
82
61
83
- 3 . Understanding " engagement patterns" through:
62
+ > _ Which enterprise deals are at risk of slipping this quarter based on engagement patterns? _
84
63
85
- - Call transcripts and topics discussed
86
- - Email sequence responses
87
- - Product usage metrics
88
- - Multiple stakeholder involvement
89
- - Comparison to successful deal patterns
64
+ While this question seems simple, it's complex because it requires defining what qualifies as an enterprise deal,
65
+ identifying signals that indicate a deal is at risk—such as low engagement or delayed progress—and analyzing various
66
+ engagement patterns, including sales activities, buyer signals, and product usage, all in comparison to historical and
67
+ successful deal benchmarks.
90
68
91
- </details >
69
+ If you're using your own project, start by asking a similarly strategic question relevant to your data. Otherwise,
70
+ [ click here] ( https://promptql.console.hasura.io/share/05437507-6b31-4037-a302-0dbcec5de2ae ) to be dropped into a thread
71
+ replay.
92
72
93
- #### Query plan
73
+ ##### Query plan
94
74
95
- PromptQL will respond with a ** query plan** . This is a step-by-step breakdown in plain language of how it will process
96
- your request, including any data retrieval, filtering, or AI operations it will perform.
75
+ When you ask a question, PromptQL will respond with a ** query plan** . This is a step-by-step breakdown in plain language
76
+ of how it will process your request, including any data retrieval, filtering, or AI operations it will perform.
97
77
98
78
<Thumbnail
99
79
src = " /img/get-started/pql-query-plan.png"
@@ -104,6 +84,9 @@ your request, including any data retrieval, filtering, or AI operations it will
104
84
It helps make PromptQL's approach transparent by explaining what it's going to do before it does it, including any
105
85
assumptions it's making about the data or process.
106
86
87
+ Take a look at the query plan generated for your question and see how PromptQL takes a complex question and breaks it
88
+ down into a series of steps, just like a human would.
89
+
107
90
:::tip Query plans are modifiable
108
91
109
92
You can edit a query plan by clicking the pencil next to a query plan.
@@ -113,16 +96,19 @@ and self-corrects for future threads!
113
96
114
97
:::
115
98
116
- #### Execution
99
+ ##### Execution
117
100
118
101
The query plan is then ** executed** against your data.
119
102
120
103
<Thumbnail src = " /img/get-started/pql-execution.png" alt = " A query plan's execution of Python and SQL." width = " 1000px" />
121
104
122
- PromptQL writes Python code that includes SQL queries to retrieve data, and then processes that data using Python's data
123
- structures and the AI functions provided to it.
105
+ PromptQL pulls the necessary data and uses AI to help make sense of it. Behind the scenes, it fetches information from
106
+ your database and organizes it using Python, so you can focus on the insights, not the code.
107
+
108
+ If you're curious, expand the execution in your project and see the code PromptQL is executing against your datasource.
109
+ And, just like the query plan, if you see something that should be different, let PromptQL know!
124
110
125
- #### Artifacts
111
+ ##### Artifacts
126
112
127
113
Typically, the execution of a query plan will result in an ** artifact** .
128
114
@@ -135,6 +121,8 @@ Typically, the execution of a query plan will result in an **artifact**.
135
121
Artifacts are structured outputs like tables, text, or visualizations that store the processed data or analysis results,
136
122
which can be referenced later in the conversation, exported, or used to start new threads for further analysis.
137
123
124
+ We have a more in-depth guide for making decisions with PromptQL; check it out [ here] ( /decision-making.mdx ) .
125
+
138
126
:::tip This is a conversation!
139
127
140
128
Talking with PromptQL is like talking to a human. This means it's an iterative process wherein you ask a question, it
@@ -143,13 +131,42 @@ provide, the better the answers become.
143
131
144
132
:::
145
133
146
- ### Give it a task to automate
134
+ #### Give it a task to automate
135
+
136
+ Using the same sandbox project, we'll ask PromptQL to generate an automation for us:
137
+
138
+ > I need an automation to help me identify risky opportunities in my sales pipeline. I want to input a date range and
139
+ > get back a list of opportunities that need attention. Specifically, I want to know which deals:
140
+ >
141
+ > - Haven't had any recent activity
142
+ > - Are missing important contact relationships
143
+ > - Show low engagement from the customer
144
+ > - Are taking longer than expected to close
145
+ >
146
+ > Can you create something that gives me a risk score for each opportunity and suggests specific actions I should take?
147
+ > I'd like the results in a format that makes it easy for me to prioritize which deals need immediate attention.
148
+
149
+ This task-based prompt asks PromptQL to build an ** automation** : a reusable workflow that runs against your data and
150
+ gives you consistent, structured results. Rather than just answering a one-time question, automations are designed to
151
+ help you monitor, score, or act on key insights regularly.
152
+
153
+ <Thumbnail
154
+ src = " /img/get-started/playground-quickstart-automation.png"
155
+ alt = " A PromptQL-generated automation."
156
+ width = " 1000px"
157
+ />
158
+
159
+ In this example, PromptQL will identify the relevant data, define what makes a deal “risky,” build a scoring system to
160
+ prioritize those deals, and suggest actions—all packaged in a format that’s easy to review and reuse. Just like with
161
+ query plans, PromptQL explains each step and lets you modify the logic, so you stay in control of the process.
147
162
148
- TODO: After conversation with Sooraj on Monday, 23 June
163
+ If you're using your own project, give PromptQL a similar task to automate. Otherwise,
164
+ [ click here] ( https://promptql.console.hasura.io/share/88a988ff-b44b-42b8-9859-846fa4be3f9c ) to be dropped into a thread
165
+ replay.
149
166
150
- - Reusable programs
151
- - Ability to export executable code and run it from an API
167
+ We also have a dedicated guide to building your own automations available [ here] ( /automation.mdx ) .
152
168
153
169
## Next steps
154
170
155
- - Dev mode
171
+ Now that you've had your first set of conversations with PromptQL, we recommend checking out these docs around its
172
+ [ core capabilities] ( /capabilities.mdx ) .
0 commit comments