About AmpAI Assistants¶
There are two AmpAI Assistants:
Queries AI Assistant helps users author SQL queries and resolve errors
Segents AI Assistant helps users build segments
These assistants are generative AI features within Amperity that lets users input commands in natural language.

Use the Queries AI Assistant in the SQL Query Editor to:
Create SQL queries starting from natural language, such as “Who are my top 100 customers by lifetime spend?” or “Show me everyone who shopped in-store over the last 30 days.”
Ask for help while resolving a SQL error
Get advice on how to improve a query
Ask questions about SQL syntax, such as “What is the syntax for a window function?”
Use the Segments AI Assistant in the Segment Editor to:
Generate customer segments
Refine customer segments
Get advice on building better customer segments to meet campaign goals
Important
As with all generative AI capabilities, the outputs of AmpAI Assistants are probabilistic. Users should double check outputs for accuracy.
Review the Privacy FAQ for the AI Assistant to learn more about how the AmpAI Assistant interacts with LLMs and the Microsoft Azure OpenAI Service.
Amperity Learning Lab
![]() |
The AmpAI Assistants are generative AI features that can help you build better SQL queries and generate customer segments based on the data in your Amperity tenant. Open Learning Lab to learn more about how the AmpAI Assistant can help you build better queries and segments. Registration is required. |
Enable or disable AmpAI Assistants¶
AmpAI features, including AmpAI Assistants, may be enabled (or disabled) by a user who is assigned the DataGrid Operator or DataGrid Administrator policy.
To disable AmpAI Assistants
From the Settings page, open the AmpAI tab.
Under Advanced settings, select the Disable AmpAI features option to disable AmpAI features, including the AmpAI Assistant.
Click Confirm.
How AmpAI Assistants work¶
AmpAI Assistants are powered by LLMs on a private instance of Azure OpenAI Service.
Amperity passes information on the schema information, query and segment examples, results, errors, table usage, and performs a series of research tool calls to improve the quality of results.
Note
More detail about how AmpAI Assistants work, including data sharing policies, how the model stores data, and what types of data is sent (or not sent), is available from the AI Assistant Privacy FAQ.
Query Examples¶
The following examples show some of the ways you can use the Queries AI Assistant while working in the SQL Query Editor.
Note
The answers to these questions within your tenant will depend on the query, schema, results, and error information that was provided to the model and may be different than the examples shown in this topic.
Build natural language queries¶
You can use natural language—the same types of sentences you use when talking to co-workers and friends—to ask the AmpAI Assistant to help you build queries against any database in the Customer 360 page.
Customers by lifetime spend¶
- Question
“Who are my top 100 customers by lifetime spend?”
- Answer
The Queries AI Assistant will respond similar to:
Tip
When “Tables and fields are valid” is shown for the SQL returned by the AmpAI Assistant you can try running the query in the SQL Query Editor.
Click the Copy SQL link in the response from the AmpAI Assistant, paste the SQL into the SQL Query Editor, click the Run query button, and then (after the query is finished running) you can view the results.
In-store shoppers¶
- Question
“Show me everyone who shopped in-store over the last 30 days.”
- Answer
The Queries AI Assistant will respond similar to:
Ask for help resolving errors¶
When you have an error in your query syntax you can ask the AmpAI Assistant for help resolving the error.
- Question
“Can you help me resolve this error?”
- Answer
The Queries AI Assistant will respond similar to:
Ask questions about syntax¶
You can ask the AmpAI Assistant to help you understand how specific types of syntax work in a SQL query.
- Question
“What is the syntax for a CASE statement?”
- Answer
The Queries AI Assistant will respond similar to:
Note
Amperity uses Presto SQL syntax within the SQL Query Editor.
Segment Examples¶
The following examples show some of the ways you can use the Segments AI Assistant while working in the Segment Editor.
Note
The answers to these questions within your tenant will depend on the query, schema, results, and error information that was provided to the model and may be different than the examples shown in this topic.
Create a segment¶
You can ask the Segments AI Assistant to build a segment based on the criteria you lay out.
- Question
“Build a segment of my highest value customers based on customer lifetime value.”
- Answer
The Segments AI Assistant will respond similar to:
Tip
Be sure to check that the segment created matches what you were looking for, and if not you can guide the AmpAI Assistant on how to try again.
For example, if you ask for a segment of your highest value customers without specifying customer lifetime value as the criteria, you may get a segment based on highest spend over the past year.
In cases like this, prompt the AmpAI Assistant again and specify how you want to measure value.
Refine a segment¶
You can ask the Segments AI Assistant to add additional conditions to your segment.
- Question
“Narrow it down to high value customers who have a product preference for jeans and have not purchased in the last month.”
- Answer
The Segments AI Assistant will respond similar to:
Get advice on your segment¶
You can ask the Segments AI Assistant for guidance on how else you might design your segment to meet the goals of your campaign.
- Question
“What other criteria should I consider adding to the segment in order to attract high-value customers who haven’t recently purchased to buy new offerings in our jeans category?”
- Answer
The Segments AI Assistant will respond similar to:
"To make your segment even more effective for targeting high-value customers
who haven't recently purchased (especially with the goal of promoting new
jeans offerings), you might consider adding additional criteria."
Answers will include suggestsions similar to:
Predicted Affinity for Related Categories:
Include customers who also have a demonstrated or predicted interest in complementary categories, such as “Tops and T-shirts” or “Accessories,” which pair well with jeans.
Preferred Channel or Brand:
Focus on customers who prefer a specific purchase channel (e.g., online vs. in-store) or brand, if your new jeans offerings are exclusive or more prominent in certain channels or under specific brands.
Contactability:
Ensure that customers are opted into email or SMS marketing, so your campaigns can actually reach them.
Geographic Proximity:
Filter for customers living in regions where jeans sales or promotions are planned or more likely (e.g., areas with upcoming in-store events).
Previous Buyers of Premium Jeans:
Target customers who have purchased higher-value or premium jeans in the past, as they’re more likely to be interested in new, similar offerings.
Lapsed but Historically Loyal Customers:
Identify customers who have bought jeans repeatedly in the past but haven’t purchased any recently—they may respond well to a “welcome back” campaign for new jeans.
Customer Lifecycle Status:
Pay attention to customers with a “likely to return” or “at-risk” predicted lifecycle, as they could be nudged toward purchase with targeted messaging.