AI Insights
The AI Insights feature analyzes your business data and surfaces actionable observations automatically. It combines LLM-powered analysis with rule-based fallback to ensure reliability.
How It Works
KPI Data --> Rule Engine --> Insights
| ^
v |
LLM Analysis ---------+
(when available)- Data collection — The system aggregates KPIs from all active modules (revenue, pipeline, inventory levels, HR metrics)
- Rule-based analysis — A set of predefined rules evaluates the data for common patterns (thresholds, trends, anomalies)
- LLM analysis — When an AI provider is configured, the data is sent to the LLM for deeper, contextual analysis
- Merge and deduplicate — Results from both engines are combined, deduplicated, and ranked by relevance
- Display — Insights appear on the Dashboard and in module-specific views
Rule-Based Fallback
The rule engine runs independently of any AI provider, ensuring insights are always available:
| Rule | Trigger | Example Insight |
|---|---|---|
| Revenue trend | MoM change > 10% | “Revenue increased 23% compared to last month” |
| Overdue invoices | Count > 0 | ”5 invoices totaling SAR 120,000 are past due” |
| Pipeline stagnation | Deal unchanged > 30 days | ”3 deals have not progressed in over 30 days” |
| Low stock | Below reorder point | ”4 products are below minimum stock levels” |
| Payroll variance | Change > 5% from prior run | ”Payroll cost increased 8% this month” |
| Attendance anomaly | Absence rate > threshold | ”Absence rate is 12%, above the 5% threshold” |
LLM-Powered Analysis
When configured, the LLM provides richer, contextual insights:
- Correlation detection — “Revenue growth correlates with the 3 new deals closed this quarter”
- Forecasting — “At the current burn rate, Project X will exceed budget by week 6”
- Recommendations — “Consider increasing reorder quantity for SKU-1234 based on seasonal demand”
- Narrative summaries — Natural language summaries of financial reports
Configuration
Set the AI provider in Settings > AI Configuration:
- Provider — OpenAI, Azure OpenAI, or Anthropic
- API key — Your provider API key (stored encrypted)
- Model — Model selection (e.g.,
gpt-4o,claude-sonnet)
If no provider is configured, the system falls back to rule-based insights only.
KPI Analysis
The system tracks and analyzes these KPI categories:
| Category | Metrics |
|---|---|
| Financial | Revenue, expenses, profit margin, cash flow |
| Sales | Pipeline value, conversion rate, average deal size |
| Operations | Inventory turnover, order fulfillment rate |
| HR | Headcount, turnover rate, absence rate |
| Projects | Velocity, burn rate, on-time delivery |
Privacy and Data Handling
- KPI data sent to the LLM is aggregated and anonymized — no customer PII is included
- Raw transactional data is never sent to external providers
- All AI requests are logged in the audit trail
- AI features can be fully disabled per company
API Endpoint
GET /api/v1/ai/insights?companyId=COMPANY_UUIDReturns an array of insight objects:
{
"insights": [
{
"id": "ins_abc123",
"category": "financial",
"message": "Revenue increased 23% month-over-month",
"severity": "info",
"source": "rule",
"createdAt": "2026-04-13T10:00:00Z"
}
]
}Last updated on