SHIFT AI uses large language models (LLMs) to translate natural language questions into SQL. While it’s highly effective with general knowledge, getting accurate, business-specific results requires some guidance. Think of SHIFT AI like a new team member—it needs time to learn your company’s terminology, metrics, and data structure.
This article walks you through key ways to train SHIFT AI to understand your data faster and deliver more accurate SQL answers.
Adjust Topic Columns
SHIFT AI can only generate accurate SQL if it has access to the right data. Topics define which tables and columns the model uses to answer categories of questions.
- Too few columns? SHIFT AI might lack the data it needs, leading to incomplete or incorrect SQL.
Too many or overlapping columns? SHIFT AI may become confused or choose the wrong ones.
To update topic columns:
After asking a question, click “Modify Topics” to go directly to the Topics section.
Or, use the Data Explorer:
Click the ➕ / ➖ icons next to each column name to include or exclude them.
Topic tables and columns are shown in purple.
Click “Resubmit to SHIFT AI” in the confirmation window to re-ask your question using the updated topic.
Add Descriptions to Tables and Columns
SHIFT AI uses table and column descriptions to interpret ambiguous names and domain-specific terminology. Clear descriptions with instructions help the model pick the right fields for calculations and improve accuracy.
Example descriptions that include guidance or usage context:
- Number of tickets purchased. Use for questions about total tickets purchased.
- Date of the event. Not the purchase date. Format: MM-DD-YY
- Corporate, Individual, or Season Pass account types
- Use this for questions about sales reps or account reps
How to add descriptions:
Click "Modify Topics"
Or, use the Data Explorer.
Hover over the dictionary icon beside a column to see its current description.
Click the icon to add or update it.
After saving, click "Resubmit to SHIFT AI" to re-ask your question with the new context.
Save Example Templates for Complex Metrics
If SHIFT AI calculates a metric incorrectly, you can provide it with a SQL example. Create a template with SQL demonstrating the calculation. These templates act as learning references—SHIFT AI will use them to better handle similar questions in the future.
Use templates to define:
Custom aggregations
Complex joins
Calculations with specific business logic
Give Topic Feedback
Some questions can be answered by multiple topics, or SHIFT AI might pick the wrong one if topics overlap.
When this happens:
Use the Topic selector to choose the correct topic manually.
SHIFT AI will reprocess your question using the selected topic.
After receiving the updated result, click thumbs up/down to give feedback. This helps SHIFT AI learn which topics are best for each type of question going forward.