Natural Language Queries: Talk to Your Data
AUM's Natural Language Query (NLQ) engine lets you ask questions in plain English - no SQL required.
How It Works
AUM uses advanced NLP to understand your intent and translate it into data operations.
Supported Query Types
1. Top N Queries
Examples:
- "top 10 products by revenue"
- "show me the best 5 salespersons"
- "highest selling categories"
What Happens:
Intent: RANK
Metric: revenue/sales
Dimension: product/salesperson/category
N: 10/5/default
2. Aggregation Queries
Examples:
- "total revenue"
- "average order value"
- "sum of sales by region"
What Happens:
Intent: AGGREGATE
Operation: sum/average/count
Metric: revenue/order_value/sales
Group By: region (if specified)
3. Group By Queries
Examples:
- "revenue by month"
- "count customers by state"
- "sales by product and region"
What Happens:
Intent: GROUP_BY
Metric: revenue/customers/sales
Dimensions: month/state/[product, region]
4. Filtering Queries
Examples:
- "show orders above 1000"
- "customers in California"
- "products with rating > 4.5"
What Happens:
Intent: FILTER
Condition: amount > 1000, state = 'California', rating > 4.5
5. Trend Analysis
Examples:
- "sales trend over time"
- "show monthly revenue growth"
- "customer acquisition by quarter"
What Happens:
Intent: TREND
Metric: sales/revenue/customers
Time Dimension: auto-detected date column
6. Comparison Queries
Examples:
- "compare sales 2023 vs 2024"
- "revenue this month vs last month"
- "product A vs product B performance"
What Happens:
Intent: COMPARE
Metric: sales/revenue
Segments: 2023 vs 2024, current vs previous
Query Suggestions
AUM automatically generates relevant query suggestions based on your data:
For E-commerce Data:
- "top 10 products by revenue"
- "orders by month"
- "average order value by customer segment"
- "return rate by category"
For Manufacturing Data:
- "OEE by production line"
- "defect rate trend over time"
- "downtime hours by machine"
- "throughput by shift"
For Healthcare Data:
- "bed occupancy by department"
- "average length of stay by diagnosis"
- "appointment no-show rate by clinic"
- "readmission rate trend"
Advanced Features
Column Fuzzy Matching
AUM intelligently matches your query terms to actual column names:
Your Query: "show revenue by customer"
Actual Columns: customer_id, total_revenue
Matched: ✓ Automatically maps "customer" → "customer_id", "revenue" → "total_revenue"
Multi-Word Column Handling
Your Query: "sales by product category"
Actual Column: product_category
Matched: ✓ Handles compound words intelligently
Synonym Recognition
- "revenue" = "sales" = "income"
- "customers" = "clients" = "buyers"
- "orders" = "transactions" = "purchases"
Query Response Format
Every query returns:
{
"success": true,
"result": {
"columns": ["product", "revenue"],
"data": [
{ "product": "Widget A", "revenue": 125000 },
{ "product": "Widget B", "revenue": 98000 }
],
"total_rows": 2,
"query_type": "rank"
},
"insights": [
{
"type": "result",
"insight": "Top 2 products account for 45% of total revenue",
"importance": 0.8
}
],
"visualization_suggestions": [
{
"type": "bar",
"x": "product",
"y": "revenue",
"description": "Bar chart showing revenue by product"
}
]
}
Using the Query Interface
Desktop
- Click the search bar at the top of your dashboard
- Start typing your question
- See suggested completions
- Press Enter to execute
Voice Input (Coming Soon)
AUM will support voice queries: "Alexa, ask AUM what my top products are"
Query History
Access your recent queries:
- Click the clock icon in the query bar
- See last 20 queries
- Re-run with one click
- Save favorites
Keyboard Shortcuts
Cmd/Ctrl + K: Open query barCmd/Ctrl + Enter: Execute query↑/↓: Navigate query history
Tips for Better Results
✅ DO:
- Use industry-standard terms
- Be specific: "revenue in Q4" > "money"
- Include units: "sales in thousands"
- Specify time ranges: "last month", "2024"
❌ DON'T:
- Use abbreviated slang
- Mix multiple unrelated metrics
- Expect mind-reading (be clear!)
Troubleshooting
Q: My query returned no results A: Check if the column names match your query terms. Try using actual column names.
Q: Wrong columns were selected A: Add more context. Instead of "show sales", try "show total_sales by region"
Q: Can I use complex SQL-like queries? A: Currently, AUM focuses on common business questions. Complex joins and subqueries coming soon!
API Usage
Execute queries programmatically:
const response = await fetch('/api/query/execute', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN'
},
body: JSON.stringify({
file: fileBlob,
prompt: 'top 10 products by revenue',
columns: ['product_name', 'total_revenue']
})
});
const result = await response.json();
Next: Explore Smart Joins