AI Assistant
Query your pricing data using natural language with AI-powered insights
Overview
The AI Assistant allows you to ask questions about your pricing data in plain English. It converts your queries into SQL, retrieves the data, and provides natural language answers with context and follow-up suggestions.
Access: Navigate to Assistant in the project sidebar, or visit /p/[your-project]/assistant
How It Works
You ask a question
Type your question in natural language, like "What are my most expensive products?" or "Show me all SKUs with prices over $100"
AI processes your query
The AI understands your intent and converts it into a SQL query against your pricing database
Data is retrieved
The generated SQL query runs against your database to fetch the relevant data
AI generates answer
Results are formatted into a natural language answer with tables, charts, or summaries
Example Queries
Product Discovery
- →What are my top 10 most expensive products?
- →Show me all products with prices under $20
- →List SKUs that haven't changed price in 30 days
- →Which products have the most variants?
Price Analysis
- →What's the average price of my catalog?
- →Show me products with prices above $100
- →Which SKUs have the highest profit margins?
- →What's the price range for my summer collection?
Price Changes
- →Why was SKU-123 price changed?
- →Show me all pending price changes
- →What price changes were applied today?
- →Which products have the most price change history?
Trends & Insights
- →What's my average price increase this month?
- →Show me products with frequent price changes
- →Which categories have the most pricing activity?
- →What's the pricing trend for product XYZ?
Understanding Responses
Each AI Assistant response includes several components:
Natural Language Answer
Human-readable summary of the results
Data Results
Structured data table or chart showing the query results
Generated SQL Query
The actual SQL that was executed (for transparency)
Follow-up Suggestions
Related questions you can ask to dive deeper
Suggested Questions
When you first open the AI Assistant, you'll see suggested questions to get started. These are curated queries that demonstrate the assistant's capabilities:
- •"What are my most expensive products?"
- •"Show me all pending price changes"
- •"Why was this price changed?"
- •"What's my average product price?"
💡 Tip: Click on any suggested question to see how the AI responds, then modify it for your specific needs.
Conversation History
The AI Assistant maintains a conversation history during your session:
- •Context Aware: Ask follow-up questions that reference previous queries
- •Scroll Through History: Review past questions and answers
- •Session-Based: History clears when you leave the page
- •Refinement: Iteratively refine queries based on results
Types of Queries
AI-Powered Queries
Complex natural language questions that require AI understanding
- • Why did prices increase?
- • What's the impact of my summer sale?
- • Recommend price adjustments
Pattern-Based Queries
Simple lookups that match common patterns
- • Show product ABC
- • List all SKUs
- • Get price for XYZ
Note: Pattern-based queries are faster but less flexible. AI-powered queries can understand more complex requests and context.
Best Practices
Current Limitations
- ⚠️Read-Only: The assistant can query data but cannot create price changes or modify settings
- ⚠️Session History: Conversation history doesn't persist across sessions
- ⚠️Data Scope: Can only access data for the current project
- ⚠️Real-time Only: Responses are based on current database state
API Reference
The AI Assistant API allows you to submit natural language queries programmatically and receive structured responses. All endpoints require authentication via Bearer token.
Submit a natural language query to the AI Assistant
{
"query": "What are my most expensive products?",
"projectSlug": "demo"
}{
"answer": "Your top 3 most expensive products are...",
"data": [
{
"productCode": "PROD-001",
"name": "Premium Widget",
"price": 19999 // in cents ($199.99)
}
],
"sql": "SELECT * FROM products ORDER BY price DESC LIMIT 10",
"suggestions": [
"Show me price history for these products",
"What's the average price across all products?"
]
}Usage Notes
- •Queries should be natural language questions about your pricing data
- •Responses include the natural language answer, structured data, and generated SQL
- •The API is read-only and cannot modify data or create price changes
- •Rate limits apply: 20 queries per minute per user