Using AI Prompts in Data Components
Using AI Prompts in Data Components
Data Components can be enhanced with AI capabilities, allowing users to ask natural language questions about visible data and receive intelligent, context-aware responses. This feature transforms static data tables into interactive, queryable datasets that users can explore conversationally.
What Are AI-Enabled Data Components?
When you add AI Prompts to data components, users can:
- Ask Questions - Type natural language queries about the data they're viewing
- Get Intelligent Answers - Receive AI-powered responses based only on visible records
- Analyze Trends - Identify patterns, outliers, and insights automatically
- Generate Summaries - Create instant summaries of filtered data sets
- Make Comparisons - Compare records or groups within the current view
Setting Up AI in Data Components
Prerequisites
- An existing data table with records
- A page with a data component (table, list, etc.)
- AI Prompts enabled on your plan
Configuration Steps
Types of AI Interactions
Dynamic Question Box
A text input field where users can ask any question about the visible data.
How It Works:
- User types a question (e.g., "What's the average sale price?")
- AI analyzes all visible records in the component
- Generates and displays an answer
- Response appears below the question box or in a designated area
Example Questions Users Can Ask:
- "Which customer has the highest order value?"
- "What's the total revenue this month?"
- "How many tickets are marked as urgent?"
- "Who are the top 5 sales reps by performance?"
- "Summarize the feedback from these reviews"
- "What patterns do you see in these orders?"
Pre-configured Prompts
Benefits:
- Faster for users - no typing required
- Ensures consistent, well-formed questions
- Guides users to useful insights
- Reduces token usage with optimized prompts
Example Pre-configured Prompts:
- "Summarize today's sales" - Quick daily overview
- "Show top performers" - Instant ranking
- "Identify issues" - Highlight problems in the data
- "Compare this month to last month" - Trend analysis
- "Recommend next actions" - Actionable insights
Setting Up Pre-configured Prompts
- In the data component AI settings, select Add Pre-configured Prompt
- Enter a user-friendly button label (e.g., "Get Summary")
- Write the actual prompt that will be sent to AI:
"Summarize the key insights from these {data_table_name} records. Focus on trends, notable values, and any patterns." - Choose where to display the response (inline, modal, side panel)
- Add as many pre-configured prompts as needed
- Save your configuration
How AI Processes Data Component Queries
When a user asks a question, here's what happens:
- Context Gathering - AI receives:
- All visible record data (respecting filters and search)
- Field names and types
- Current sort order
- User's question
- Analysis - AI processes the data to understand:
- What the user is asking for
- Which fields are relevant
- What calculations or comparisons are needed
- Response Generation - AI creates a natural language answer:
- Direct answers to specific questions
- Summaries of patterns and trends
- Lists or rankings when appropriate
- Explanations of insights found
- Display - The response is shown to the user in a readable format
Common Use Cases
Sales Dashboard Analysis
Component: Sales table showing this month's orders
User Questions:
- "What's our total revenue so far?"
- "Which product category is selling best?"
- "Are sales trending up or down this week?"
- "Who are our top 3 customers by order value?"
Support Ticket Management
Component: Table of open support tickets
User Questions:
- "How many high-priority tickets are unassigned?"
- "What are the most common issues this week?"
- "Which team member has the most open tickets?"
- "Summarize the urgent technical issues"
Inventory Monitoring
Component: Product inventory table
User Questions:
- "Which products are running low on stock?"
- "What's the total value of our current inventory?"
- "Which items haven't moved in 30 days?"
- "Are there any inventory anomalies I should know about?"
Customer Feedback Analysis
Component: Customer reviews table
User Questions:
- "What's the overall sentiment of these reviews?"
- "What are customers praising most?"
- "What complaints are appearing repeatedly?"
- "Summarize the feedback for this product"
Project Status Overview
Component: Project tasks table
User Questions:
- "How many tasks are overdue?"
- "Which projects are at risk?"
- "What percentage of tasks are complete?"
- "Who has the heaviest workload right now?"
Customizing AI Responses
Response Display Options
Inline Display
- Answer appears directly below the question box
- Best for quick facts and short responses
- Keeps user in context of the data
Modal/Popup
- Response shown in overlay window
- Good for longer, detailed answers
- Allows formatting and structure
- User can close when done reading
Side Panel
- Persistent panel alongside the data
- Allows multiple questions without losing context
- History of questions and answers
- Can be collapsed when not in use
Response Formatting
Configure how AI structures its answers:
- Plain Text - Simple, straightforward answers
- Markdown - Formatted text with headings, lists, bold/italic
- Structured Data - Tables, lists, or organized information
- With Citations - Reference specific records when answering
Best Practices
Component Design
- Keep Data Relevant - Only show fields that users need; AI processes everything visible
- Provide Context - Use clear field names that AI can understand
- Optimize Filters - Ensure filters work correctly so AI analyzes right subset
- Limit Records - For very large datasets, encourage filtering before AI queries
Prompt Configuration
- Be Specific - Pre-configured prompts should be clear about what they're asking
- Add Context - Include data table name and field context in prompts
- Set Expectations - Tell AI what format to return (summary, list, number, etc.)
- Test Thoroughly - Try prompts with various data scenarios
User Guidance
- Provide Examples - Show sample questions users can ask
- Set Boundaries - Explain AI only sees visible data
- Offer Suggestions - Display helpful question templates
- Show Loading State - Let users know AI is processing
Performance Optimization
- Manage Record Count - Large datasets take longer to process and use more tokens
- Use Pagination - Break large tables into pages
- Encourage Pre-configured - Optimized prompts are more efficient than free-form
- Cache Common Queries - If possible, cache frequently asked questions
Security & Privacy Considerations
- Data Visibility - AI only accesses data the current user can see based on permissions
- Field-Level Security - Hidden fields are not included in AI analysis
- Row-Level Security - Record rules determine which records AI can analyze
- Logging - All AI queries are logged for audit purposes
- Token Usage - Queries count toward your daily AI token limit
Troubleshooting
AI Not Understanding Questions
- Ensure field names are descriptive (not codes or abbreviations)
- Add field descriptions that AI can use for context
- Rephrase question to be more specific
- Use pre-configured prompts for complex queries
Incomplete or Generic Answers
- Check if enough data is visible (filters might be too restrictive)
- Verify relevant fields are included in component
- Make question more specific about what you want
- Ensure data has meaningful values (not just IDs or codes)
Slow Performance
- Reduce number of visible records (add filters or pagination)
- Limit number of fields displayed in component
- Use pre-configured prompts instead of free-form questions
- Check if data includes large text fields that slow processing
AI Response Not Appearing
- Check token limit - you may have reached daily quota
- Review AI Prompt logs for error messages
- Verify AI is enabled for the component
- Ensure user has permissions to access the data
Advanced Techniques
Contextual Help System
Combine AI with help documentation:
- Pre-configured prompt: "How do I use this data?"
- AI provides guidance based on visible fields and data type
- Dynamic help that adapts to current context
Automated Insights
Trigger AI automatically when component loads:
- Display automatic summary of key metrics
- Highlight unusual patterns or outliers
- Show trends without user needing to ask
Multi-Component Analysis
Allow AI to reference multiple components on the same page:
- "Compare sales in Chart 1 to inventory in Table 2"
- Cross-reference data from different sources
- More comprehensive insights
Example Implementations
Sales Dashboard
Component: Monthly Sales Table AI Enabled: Yes Display: Side Panel Pre-configured Prompts: 1. "Summarize Performance" → "Provide a brief summary of sales performance shown in this table, including total revenue, number of orders, and any notable trends." 2. "Top Performers" → "List the top 5 sales representatives by revenue from these records, showing their names and total sales." 3. "Identify Concerns" → "Identify any concerning patterns or anomalies in these sales records that might require attention."
Support Ticket Queue
Component: Active Tickets Table AI Enabled: Yes Display: Inline Pre-configured Prompts: 1. "Urgent Items" → "List all high-priority or urgent tickets from these records, including ticket ID and brief description." 2. "Workload Distribution" → "Analyze the distribution of tickets across team members and identify if anyone is overloaded." Dynamic Question Box: Enabled Example Questions Shown: - "What are the most common issue types?" - "Which tickets have been open longest?" - "Are there any SLA violations?"
Monitoring & Analytics
Track how users interact with AI in data components:
- Query Frequency - How often is AI being used?
- Popular Questions - What are users asking most?
- Token Usage - How much does each component consume?
- Response Quality - Are users getting helpful answers?
- Performance Metrics - How long do queries take?
Use this data to:
- Convert common free-form questions into pre-configured prompts
- Optimize slow-performing queries
- Identify gaps in data or fields needed
- Improve user guidance and documentation
We'd love to hear your feedback.