Skip to Content
AI Insights

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)
  1. Data collection — The system aggregates KPIs from all active modules (revenue, pipeline, inventory levels, HR metrics)
  2. Rule-based analysis — A set of predefined rules evaluates the data for common patterns (thresholds, trends, anomalies)
  3. LLM analysis — When an AI provider is configured, the data is sent to the LLM for deeper, contextual analysis
  4. Merge and deduplicate — Results from both engines are combined, deduplicated, and ranked by relevance
  5. 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:

RuleTriggerExample Insight
Revenue trendMoM change > 10%“Revenue increased 23% compared to last month”
Overdue invoicesCount > 0”5 invoices totaling SAR 120,000 are past due”
Pipeline stagnationDeal unchanged > 30 days”3 deals have not progressed in over 30 days”
Low stockBelow reorder point”4 products are below minimum stock levels”
Payroll varianceChange > 5% from prior run”Payroll cost increased 8% this month”
Attendance anomalyAbsence 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:

CategoryMetrics
FinancialRevenue, expenses, profit margin, cash flow
SalesPipeline value, conversion rate, average deal size
OperationsInventory turnover, order fulfillment rate
HRHeadcount, turnover rate, absence rate
ProjectsVelocity, 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_UUID

Returns 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