Skip to main content

Finance Assistant

AI-powered financial analysis assistant providing natural language queries, expense insights, cash flow predictions, and anomaly detection.

Features

  • Financial Analysis - AI-driven analysis of financial data and trends
  • Expense Insights - Intelligent categorization and analysis of expenses
  • Cash Flow Predictions - Predictive modeling for cash flow management
  • Anomaly Detection - Automatic detection of unusual transactions or patterns
  • Natural Language Queries - Query financial data using conversational language

Requirements

RequirementDetails
DependenciesAICore
PHP Version8.2+
AI ProviderAt least one AI provider configured in AI Core
RecommendedAccountingCore, Expense modules for full functionality

Installation

  1. Ensure AI Core module is installed and enabled
  2. Enable the Finance Assistant module in Settings > Modules
  3. Configure data access and anomaly detection thresholds

Configuration

Navigate to Settings > AI Core > Finance Assistant to configure:

  • Data Access - Configure which financial data the assistant can access
  • Anomaly Sensitivity - Set sensitivity levels for anomaly detection
  • Prediction Models - Configure cash flow prediction parameters
  • Alert Recipients - Set up alerts for detected anomalies

Usage

Natural Language Queries

Ask questions in plain language:

  • "What were our top expenses last month?"
  • "Compare Q3 revenue to Q2"
  • "Show me unusual transactions this week"
  • "What's our projected cash position in 30 days?"

Programmatic Access

use Modules\FinanceAssistant\Services\FinanceAssistantService;

$assistant = app(FinanceAssistantService::class);

// Natural language query
$response = $assistant->query([
'question' => 'What were our top 5 expense categories last quarter?',
]);

// Expense analysis
$analysis = $assistant->analyzeExpenses([
'period' => 'last_month',
'group_by' => 'category',
'include_trends' => true,
]);

// Cash flow prediction
$prediction = $assistant->predictCashFlow([
'horizon' => '90_days',
'include_scenarios' => true,
]);

Anomaly Detection

$anomalies = $assistant->detectAnomalies([
'period' => 'last_30_days',
'sensitivity' => 'medium',
'categories' => ['expenses', 'revenue'],
]);

API Endpoints

MethodEndpointDescription
POST/api/v1/finance-assistant/queryNatural language query
POST/api/v1/finance-assistant/analyzeAnalyze financial data
POST/api/v1/finance-assistant/predictCash flow prediction
GET/api/v1/finance-assistant/anomaliesGet detected anomalies

Analysis Capabilities

CapabilityDescription
Expense BreakdownCategorize and analyze spending patterns
Revenue AnalysisIdentify revenue trends and anomalies
Cash Flow ModelingPredict future cash positions
Budget VarianceAnalyze actual vs. budgeted amounts
Vendor AnalysisInsights on vendor spending patterns

Notes

  • All financial queries respect user permissions
  • Anomaly alerts can be sent via email or notification
  • Predictions include confidence intervals
  • Historical data improves prediction accuracy
  • Supports multiple currencies and fiscal calendars