Welcome to the Chargeback Evidence Responder project evaluation suite. This enterprise-grade SaaS application uses machine learning classification and grounded LLM generation to automate payment dispute adjudication and merchant defense package drafting.
Double-click run.bat or run from your terminal:
run.batThis opens the Interactive Evaluator Control Menu:
============================================================
CHARGEBACK EVIDENCE RESPONDER - EVALUATOR DASHBOARD
============================================================
[1] Setup & Start Application (Full Quickstart)
[2] Run Automated Integration API Tests (14 Endpoint Suite)
[3] Test ML Model Robustness & Edge Case Handling
[4] Check Database & Backend Connectivity
[5] Check Real API Connectivity & System Diagnostics
[6] Validate Production Build
[7] Exit
Select [1] to install dependencies, train the ML model artifact, and launch the dev server. Access the dashboard at:
👉 http://localhost:3000
┌──────────────────────────────────────────────────────────────────────────────────────────┐
│ React 19 Frontend │
│ - Real-Time Dispute Operations Table & Multi-Field Filters │
│ - Case Evidentiary Dossier & Decision Cockpit │
│ - Held-Out Test Evaluation & Calibration Check Visualizer │
│ - Interactive Network Dispute-Ratio Risk Config Tuner │
└────────────────────────────────────────┬─────────────────────────────────────────────────┘
│ REST API (JSON)
▼
┌──────────────────────────────────────────────────────────────────────────────────────────┐
│ Java 21 / Spring Boot 3.3 Backend (:8080) │
│ - API Gateway, MySQL Ledger Repository & Audit Trail Logger │
│ - Dispute-Ratio-Aware Decision Engine: T_eff = min(T_cap, T_base + alpha*(R_loss/R_ceil)^2)│
│ - Dynamic Risk Endpoints: GET /api/risk/ratio-status & POST /api/risk/config │
│ - Mandatory Policy Guard: Restricts LLM defense drafting strictly to STRONG cases │
└───────────────────┬──────────────────────────────────────────────────┬───────────────────┘
│ REST (HTTP) │ REST (HTTP / SDK)
▼ ▼
┌───────────────────────────────────────┐ ┌───────────────────────────────────────┐
│ FastAPI ML Prediction Service │ │ Anthropic Claude / Gemini AI │
│ - Algorithm: RandomForestClassifier │ │ - Evidence Grounding Engine │
│ - Trained on 10,000 Dispute Cases │ │ - 8-Part Formal Rebuttal Structure │
│ - Outputs Calibrated Win Probability │ │ - Zero Fictitious Claim Rule │
└───────────────────────────────────────┘ └───────────────────────────────────────┘
-
Sample Case:
CB-1024orCB-1027 - Case Profile: Transaction INR 50,000, 3DS authentication confirmed, item delivered with tracking & customer receipt acknowledgment.
-
Expected Outcome:
- ML Classifier calculates win probability
$\ge 0.70$ (e.g. 94%). - Decision assigned: STRONG.
- Action: Defend Dispute enabled. LLM drafts formal 8-part defense rebuttal letter.
- ML Classifier calculates win probability
-
Sample Case:
CB-1026 - Case Profile: Transaction INR 28,500, marked delivered without signature lock, prior customer support inquiry logged.
-
Expected Outcome:
- ML Classifier calculates win probability between
$0.40$ and$0.70$ (e.g. 56%). - Decision assigned: BORDERLINE.
- Action: Manual Review Required. Automated LLM defense generation is restricted to prevent low-precision submissions.
- ML Classifier calculates win probability between
-
Sample Case:
CB-1025orCB-1028 - Case Profile: Missing tracking number, unconfirmed delivery, or prior full refund already issued.
-
Expected Outcome:
- ML Classifier calculates win probability
$< 0.40$ (e.g. 18%). - Decision assigned: WEAK.
- Action: Recommend Refund. Protects merchant ratio and avoids arbitration penalty fees.
- ML Classifier calculates win probability
Evaluators can execute all system checks directly via CLI commands:
| Command | Purpose | Expected Result |
|---|---|---|
run.bat |
Run 1-Click Interactive Dashboard | Open browser at http://localhost:3000 |
python ml/evaluate_model.py |
Evaluate ML Model Accuracy & Thresholds | Test Accuracy: 85.80% | ROC-AUC: 0.8477 |
node database/test_connection.cjs |
Verify Database Connectivity & Schema | Database schema verified & active |
GET /api/health/full |
Full Diagnostic Health & Real API Check | status: "UP", ml_classifier: "UP" |
npm run build |
Production Bundle Build Check | Clean build in dist/ directory |
The application runs out of the box with zero external dependencies using built-in evidence-grounded templates. To test real-time live LLM generation with Google Gemini 3.8 Flash, set your API key in .env:
GEMINI_API_KEY=your_actual_gemini_api_key_here| Metric | Score | Operational Value |
|---|---|---|
| Test Accuracy | 85.80% | Overall correct dispute discrimination |
| Precision ( |
88.55% | Base binary precision |
| Recall ( |
95.09% | Captures 95% of winnable legitimate disputes |
| ROC-AUC | 0.8477 | Strong probabilistic ranking ability |
| Defense Precision ( |
92.49% | 92.5% win rate on automated defense submissions |
| Net Recovered Value | ₹28,036,118.45 | INR 30.3M won minus INR 2.3M false positive cost |
- Full-stack architecture (React 19 + TypeScript + Java 21 Spring Boot + Python FastAPI + MySQL + Gemini AI).
- Real-time interactive UI with filters, decision cockpit, and model threshold policy tuner.
- Machine Learning classifier trained on 10,000 cases with held-out test split evaluation.
- Grounded LLM generation with strict 8-part formal rebuttal formatting.
- 14-point automated test suite and 1-click evaluation script (
run.bat).