Risk & Fraud Scoring
Overview
LoanPilot utilizes AI-driven analysis to evaluate borrower reliability and detect potential financial irregularities. The system processes bank statements, GST returns, and financial statements to generate a multi-dimensional risk profile, focusing on cashflow stability, fraud indicators, and overall repayment capacity.
Automated Risk Assessment
The primary risk assessment is triggered during the bank statement analysis phase. The system evaluates the transaction history to identify patterns that correlate with credit risk or fraudulent behavior.
Overall Borrower Health Score
The Overall Health Score is a consolidated metric (typically 0-100) that reflects the borrower's financial viability. It aggregates several sub-scores:
- Inflow Regularity Score: Measures the consistency and predictability of incoming funds.
- Repayment Capacity: Evaluates the ability to service new debt based on current obligations.
- Transaction Quality: Assesses customer concentration and the nature of the business's revenue streams.
Fraud Detection & Flags
LoanPilot monitors for specific "red flags" that indicate potential data manipulation or high-risk financial behavior. These are surfaced in the enhanced_analysis object of the bank statement analysis.
Key Fraud Indicators
- Overall Fraud Risk Score: A calculated probability of fraudulent activity.
- Cash Deposit Percentage: High volumes of cash deposits relative to digital transfers are flagged as high-risk for money laundering or unverified revenue.
- Document Integrity: Checks for inconsistencies between the bank statement metadata and the transaction ledger.
- Flags List: A collection of specific detected anomalies, such as circular transactions or frequent rounded-amount transfers.
Usage Example: Checking for Fraud Flags
When querying the bank statement analysis, you can quickly filter for high-risk applications:
// Example: Accessing fraud data from the bank analysis record
const { data: analysis } = await supabase
.from('bank_statement_analysis')
.select('fraud_risk_score, has_fraud_flags, enhanced_analysis')
.eq('application_id', applicationId)
.single();
if (analysis.has_fraud_flags) {
console.warn(`Risk Alert: Score ${analysis.fraud_risk_score}`);
console.log('Specific Flags:', analysis.enhanced_analysis.fraudFlags.flagsList);
}
Cashflow & Volatility Metrics
To ensure the borrower can sustain loan repayments, the system analyzes the "shape" of their cashflow.
| Metric | Description | | :--- | :--- | | Cashflow Volatility | Measures the standard deviation of daily balances. High volatility indicates unpredictable liquidity. | | Inflow Growth Rate | Tracks month-over-month revenue trends to identify declining businesses. | | Negative Balance Days | Counts how many days the account spent in an overdrawn state during the analysis period. | | Buffer Months | Estimates how many months the borrower could survive without new income, based on average expenses. |
Reconciliation & Cross-Verification
Beyond individual document analysis, LoanPilot performs Cross-Document Reconciliation. This is the most advanced layer of fraud detection, ensuring that the numbers reported in one document match those in another.
The /api/analyze/reconciliation endpoint compares:
- Bank Statements vs. GST Returns: Verifies that the sales reported for taxes align with actual bank credits.
- GST Returns vs. P&L Statements: Ensures the revenue claimed in financial audits matches the tax filings.
- Bank Statements vs. P&L: Checks if the net income and operating expenses reflected in the ledger match the summary financials.
API Reference: Risk Metrics
POST /api/analyze/bank-statement
Triggering this endpoint returns the primary risk and fraud data.
Request Body:
{
"documentId": "uuid",
"applicationId": "uuid",
"organizationId": "uuid",
"aiProvider": "openai | anthropic"
}
Risk-Related Response Data (enhanced_analysis):
{
"fraudFlags": {
"overallFraudRiskScore": number, // 0-100
"has_fraud_flags": boolean,
"cashDepositPercentage": number,
"flagsList": string[]
},
"cashflowMetrics": {
"cashflowVolatility": number,
"inflowGrowthRate": number
},
"repaymentCapacity": {
"emiToInflowRatio": number,
"netDisposableIncome": number,
"detectedEMIs": number
},
"overallHealthScore": number
}
Risk Ratios in Financial Analysis
When processing Financial Statements (P&L and Balance Sheets), the system automatically calculates standard credit ratios:
- DSCR (Debt Service Coverage Ratio): Primary indicator of loan repayment ability.
- Debt-to-Equity: Measures the borrower's leverage.
- Current/Quick Ratios: Measures short-term liquidity risk.