{"id":29253513,"url":"https://github.com/tanusssss/ai_fraudguard_chatbot","last_synced_at":"2026-04-28T14:34:14.063Z","repository":{"id":301690994,"uuid":"1010030188","full_name":"tanusssss/AI_fraudguard_chatbot","owner":"tanusssss","description":"FraudGuard AI Chatbot : Gen-AI powered fraud detection assistant using KNN + Hugging Face LLM. Upload CSVs, detect risky transactions, and ask natural questions. Built with Streamlit, Flan‑T5, and custom rule-based features.","archived":false,"fork":false,"pushed_at":"2025-06-28T08:13:58.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-28T08:33:50.464Z","etag":null,"topics":["chatbot","data-science-projects","fraud-detection","huggingface","knn","llm","machine-learning","portfolio-project","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanusssss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-28T07:34:38.000Z","updated_at":"2025-06-28T08:14:00.000Z","dependencies_parsed_at":"2025-06-28T08:45:42.324Z","dependency_job_id":null,"html_url":"https://github.com/tanusssss/AI_fraudguard_chatbot","commit_stats":null,"previous_names":["tanusssss/ai_fraudguard_chatbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tanusssss/AI_fraudguard_chatbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanusssss%2FAI_fraudguard_chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanusssss%2FAI_fraudguard_chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanusssss%2FAI_fraudguard_chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanusssss%2FAI_fraudguard_chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanusssss","download_url":"https://codeload.github.com/tanusssss/AI_fraudguard_chatbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanusssss%2FAI_fraudguard_chatbot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263432382,"owners_count":23465577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","data-science-projects","fraud-detection","huggingface","knn","llm","machine-learning","portfolio-project","streamlit"],"created_at":"2025-07-04T02:03:10.391Z","updated_at":"2026-04-28T14:34:14.023Z","avatar_url":"https://github.com/tanusssss.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  FraudGuard AI Chatbot\n\nAn interactive Gen-AI powered fraud detection assistant that predicts and explains risky financial transactions. Built with **Streamlit**, **KNN**, and **Hugging Face Transformers**.\n\n---\n\n##  Project Overview\n\nFraudGuard is designed for **three user roles**:\n- 👤 Customers: Get fraud risk explanations on their transactions\n- 🕵️ Fraud Analysts: Investigate suspicious activities interactively\n- 👔 Bank Managers: Understand risk trends and summaries\n\n---\n\n##  Tech Stack\n\n| Component        | Tech Used                    |\n|------------------|------------------------------|\n| ML Model         | KNeighborsClassifier (KNN)   |\n| Feature Engineering | Custom rule-based + derived |\n| LLM (GenAI)      | `google/flan-t5-base` (Hugging Face) |\n| Interface        | Streamlit + Plotly           |\n| Model Storage    | Pickle (`.pkl`)              |\n| Deployment       | Local / Streamlit sharing    |\n\n---\n\n---\n\n##  Running the App\n\n```bash\n# 1. Create environment\npython -m venv venv\nsource venv/bin/activate  # or venv\\\\Scripts\\\\activate on Windows\n\n# 2. Install dependencies\npip install -r requirements.txt\n\n# 3. Launch the app\nstreamlit run app/main.py\n\n\n##  Running the App\n\n```bash\n# 1. Create environment\npython -m venv venv\nsource venv/bin/activate  # or venv\\\\Scripts\\\\activate on Windows\n\n# 2. Install dependencies\npip install -r requirements.txt\n\n# 3. Launch the app\nstreamlit run app/main.py\n\n##  Folder Structure\nfraudguard-ai-chatbot/\n│\n├── app/\n│ └── main.py # Streamlit chatbot UI\n│\n├── ml_model/\n│ ├── model_class.py # FraudDetectionModel definition\n│ ├── model_predict.py # Prediction interface for chatbot\n│ └── retrain_model.py # CLI retraining utility\n│\n├── tests/\n│ └── test_model_predict.py # Unit tests for model\n│\n├── data/ # (optional) Sample input CSVs\n├── assets/ # (optional) Images, icons\n├── requirements.txt # All dependencies\n├── .gitignore\n└── README.md\n\nFeatures:\n\nUpload your own transaction CSV\n\nPredict fraud with KNN model\n\nRisk filtering, sorting, CSV download\n\nRole-based question prompts\n\nNatural Language QA using Hugging Face Flan-T5\n\nRisk distribution charts via Plotly\n\nExample Prompt (Fraud Analyst):  Show all transactions flagged as fraudulent\n\nFuture Improvements\nLLM plug-in mode (OpenAI/GPT ready)\nBetter transaction timeline visualizations\nRole-based authentication (planned)\nModel explainability (SHAP values)\n\n\n\n\n### LLM Modes\n\n| Mode | How to Activate | Cost |\n|------|-----------------|------|\n\n\n| **Hugging Face (default)** | No action needed – free `microsoft/DialoGPT-small` model is downloaded on first run. | Free |\n\n\n| **OpenAI GPT** | Set `USE_OPENAI=True` and add `OPENAI_API_KEY` to `.env`. | Pay‑as‑you‑go |\n| **Rule‑based** | Set both `USE_HF_LLM=False` and `USE_OPENAI=False`. | Free |\n\n\u003e The project is LLM‑ready but incurs **no charges by default** because it runs an open‑source small model locally.\n\n\nContact:\nCreated by TANVI_VISHWANATH | For resume \u0026 learning purposes only.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanusssss%2Fai_fraudguard_chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanusssss%2Fai_fraudguard_chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanusssss%2Fai_fraudguard_chatbot/lists"}