Categories
Self-Hosted Machine Learning AI Agent Human-in-the-Loop Risk Scoring Explainable AI Credit Card Fraud Fraud DetectionStars
Forks
Watchers
Developer links
FraudGuard AI
For every card transaction it scores, FraudGuard AI writes an investigation report that explains why the payment looks risky and sends the worst cases to a human analyst. Type an amount, time, merchant category, and cardholder age, or load a sample, and the model returns a fraud probability, a Low, Medium, or High risk level, and an action: approve, hold, or block. Tabs reveal the factors that pushed the score up or down, recommended steps, the agent's trace, and a chat box for asking why a case was flagged. High-risk cases wait for an analyst to approve or block them, and every note, decision, and alert is time-stamped and attributed to a user. A live-stream demo scores a generated transaction every second or so, a what-if simulator redraws the risk as you drag sliders, and batch upload scores up to 1,000 CSV rows. Analytics show daily transaction and fraud counts and a risk heatmap by hour and merchant category, while a model page lists precision, recall, a confusion matrix, and ROC and precision-recall curves. Every case exports as a PDF report, high-risk cases can trigger an email alert, and light or dark themes are remembered by the browser. Optional Firebase sign-in adds Admin and Analyst roles and a Users page where admins approve who may enter. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. MIT licensed.
Benefits
- Every score comes with reasons
- Each prediction lists the transaction features that raised or lowered the fraud score and turns them into a readable report, so analysts see why a payment was flagged instead of a bare number.
- Humans decide the risky cases
- Cases scoring 70 percent or higher are escalated, and an analyst approves or blocks them; each note and decision is recorded with a time and the user who made it.
- Works without an LLM key
- With no Groq key, reports come from a built-in template, so scoring, explanations, and recommendations keep working; adding a key lets a language model write the summary instead.
- Try risk scenarios before they happen
- A what-if simulator redraws the risk as you move amount and feature sliders, and batch upload scores up to 1,000 CSV rows, so thresholds can be tested against sample data.
Features
- Random Forest Detector
- A scikit-learn Random Forest with 120 trees scores 32 features, 28 from the Kaggle credit-card data and 4 engineered; the README reports 0.897 precision, 0.737 recall, and 0.962 ROC-AUC.
- LangGraph Investigation Agent
- A LangGraph workflow runs receive, explain, score, investigate, recommend, and escalate steps, calling a Groq llama-3.3-70b-versatile model for the report text when a key is set.
- SHAP Explanations
- SHAP attributions name the features that pushed each score up or down, shown as bars on the Reasoning tab and as plain sentences in the investigation report.
- FastAPI Backend and PDF Reports
- A FastAPI service exposes predict, investigate, batch, chat, and report endpoints with Swagger docs at /docs, and ReportLab renders each investigation as a downloadable PDF.
- Vanilla JavaScript Dashboard
- The dashboard is plain HTML, CSS, and JavaScript with no build step, served by any static file server, with dark and light themes.
- Optional Firebase Auth
- Firebase Authentication and Firestore can replace the demo login and local JSON storage, enforcing Admin and Analyst roles on the server for every request.