{"id":50400472,"url":"https://github.com/deypadma2020/banking-faq-rag-system","last_synced_at":"2026-05-30T23:03:25.499Z","repository":{"id":359808256,"uuid":"1241295889","full_name":"deypadma2020/Banking-FAQ-RAG-System","owner":"deypadma2020","description":"An end-to-end NLP-based Banking FAQ Intent Classification System using TF-IDF, Machine Learning, Ensemble Models, and Streamlit deployment for real-time banking query intent prediction and bulk CSV classification.","archived":false,"fork":false,"pushed_at":"2026-05-23T14:57:10.000Z","size":19495,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T16:15:40.235Z","etag":null,"topics":["banking-applications","nlp-machine-learning","supervised-machine-learning"],"latest_commit_sha":null,"homepage":"https://banking-faq-rag-system.onrender.com","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deypadma2020.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-17T07:44:03.000Z","updated_at":"2026-05-23T14:57:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/deypadma2020/Banking-FAQ-RAG-System","commit_stats":null,"previous_names":["deypadma2020/banking-faq-rag-system"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/deypadma2020/Banking-FAQ-RAG-System","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deypadma2020%2FBanking-FAQ-RAG-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deypadma2020%2FBanking-FAQ-RAG-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deypadma2020%2FBanking-FAQ-RAG-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deypadma2020%2FBanking-FAQ-RAG-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deypadma2020","download_url":"https://codeload.github.com/deypadma2020/Banking-FAQ-RAG-System/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deypadma2020%2FBanking-FAQ-RAG-System/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33712582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["banking-applications","nlp-machine-learning","supervised-machine-learning"],"created_at":"2026-05-30T23:03:18.851Z","updated_at":"2026-05-30T23:03:25.492Z","avatar_url":"https://github.com/deypadma2020.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏦 Banking FAQ Intent Classification System\n\nAn end-to-end NLP-based Banking FAQ Intent Classification System built using:\n\n- TF-IDF Feature Engineering\n- Machine Learning Models\n- Ensemble Learning\n- Streamlit Deployment\n- Render Cloud Hosting\n\nThe project classifies banking-related customer queries into predefined intent categories such as:\n- UPI Services\n- Loans\n- Debit Card\n- Mutual Funds\n- Account Services\n- Financial Markets\n- and more.\n\n---\n\n# 🚀 Project Overview\n\nThis project demonstrates a complete NLP pipeline for banking query intent classification.\n\nThe system:\n- preprocesses banking text data\n- generates TF-IDF features\n- trains multiple ML models\n- evaluates model performance\n- predicts intents for new queries\n- supports bulk CSV prediction\n- deploys as a Streamlit web application\n\n---\n\n# 📌 Features\n\n## ✅ Single Question Prediction\nUsers can enter a banking question and instantly receive the predicted intent.\n\nExample:\n```text\nHow can I block my debit card?\n```\n\nOutput:\n```text\nDebit Card Services\n```\n\n---\n\n## ✅ Bulk CSV Prediction\nUsers can upload a CSV file containing multiple banking questions.\n\nThe application:\n- predicts intents for all questions\n- displays total predictions\n- allows downloading the predicted CSV file\n\n---\n\n## ✅ NLP Pipeline\nImplemented:\n- text preprocessing\n- regex cleaning\n- TF-IDF vectorization\n- word-level features\n- character-level features\n\n---\n\n## ✅ Machine Learning Models\nModels evaluated:\n- Logistic Regression\n- Naive Bayes\n- Random Forest\n- LinearSVC\n- Ensemble Voting Classifier\n\n---\n\n## ✅ Best Performing Model\n`LinearSVC` achieved the best overall performance for sparse TF-IDF text classification.\n\n---\n\n# 🧠 Technologies Used\n\n- Python\n- Pandas\n- NumPy\n- Scikit-learn\n- SciPy\n- Streamlit\n- Pickle\n- Render\n\n---\n\n# 📂 Project Structure\n\n```text\nBANKING-FAQ-RAG-SYSTEM/\n│\n├── app/\n│   └── streamlit_app.py\n│\n├── data/\n│   ├── raw_data/\n│   ├── verification_data/\n│   ├── banking_cleaned.csv\n│   └── banking_processed.csv\n│\n├── models/\n│   ├── best_model.pkl\n│   ├── word_vectorizer.pkl\n│   ├── char_vectorizer.pkl\n│   └── label_encoder.pkl\n│\n├── notebooks/\n│   ├── 01_eda.ipynb\n│   ├── 02_preprocessing.ipynb\n│   ├── 03_intent_classification.ipynb\n│   └── 04_model_acc_verification.ipynb\n│\n├── scripts/\n│   ├── download_nlp_resources.py\n│   ├── setup_nltk.py\n│   └── setup_spacy.py\n│\n├── test/\n│   └── test.ipynb\n│\n├── .gitignore\n├── LICENSE\n├── README.md\n├── render.yaml\n├── requirements.txt\n├── runtime.txt\n├── setup.py\n└── template.sh\n```\n\n---\n\n# ⚙️ Installation\n\n## 1️⃣ Clone Repository\n\n```bash\ngit clone https://github.com/your-username/Banking-FAQ-RAG-System.git\n```\n\n---\n\n## 2️⃣ Create Virtual Environment\n\n```bash\npython -m venv venv\n```\n\nActivate environment:\n\n### Windows\n```bash\nvenv\\Scripts\\activate\n```\n\n### Linux / Mac\n```bash\nsource venv/bin/activate\n```\n\n---\n\n## 3️⃣ Install Requirements\n\n```bash\npip install -r requirements.txt\n```\n\n---\n\n# ▶️ Run Streamlit Application\n\n```bash\nstreamlit run app/streamlit_app.py\n```\n\n---\n\n# 🌐 Render Deployment\n\nThis project is deployment-ready for Render.\n\n## Deployment Files Included\n\n- `render.yaml`\n- `runtime.txt`\n- `requirements.txt`\n\n---\n\n# 📊 Machine Learning Workflow\n\n## 1. Data Preprocessing\n- lowercasing\n- punctuation removal\n- whitespace normalization\n\n---\n\n## 2. Feature Engineering\n\n### Word-Level TF-IDF\n```python\nngram_range=(1,3)\n```\n\n### Character-Level TF-IDF\n```python\nanalyzer='char_wb'\nngram_range=(3,5)\n```\n\n---\n\n## 3. Sparse Feature Combination\n\n```python\nhstack([word_features, char_features])\n```\n\n---\n\n## 4. Model Training\n\nTrained Models:\n- Logistic Regression\n- Naive Bayes\n- LinearSVC\n- Ensemble Voting Classifier\n\n---\n\n# 📈 Model Evaluation\n\nEvaluation Metrics:\n- Training Accuracy\n- Testing Accuracy\n- Cross Validation Accuracy\n- Classification Report\n- Overfitting Gap\n\n---\n\n# 🧪 Verification System\n\nA separate verification dataset was used to:\n- validate predictions\n- calculate real-world accuracy\n- generate classification reports\n\n---\n\n# 📦 Model Artifacts\n\nSaved using `pickle`:\n- trained model\n- vectorizers\n- label encoder\n\nThese files are used directly during Streamlit inference.\n\n---\n\n# 🖥️ Streamlit Application Functionalities\n\n## Single Query Prediction\nInput:\n```text\nHow to activate UPI?\n```\n\nOutput:\n```text\nUPI Services\n```\n\n---\n\n## Bulk CSV Prediction\n\nInput CSV:\n```csv\nQuestion\nHow to activate UPI?\nWhat is SWIFT transfer?\n```\n\nOutput CSV:\n```csv\nQuestion,Predicted_Intent\nHow to activate UPI?,UPI Services\nWhat is SWIFT transfer?,International Banking\n```\n\n---\n\n# 📌 Future Improvements\n\nPossible future enhancements:\n- BERT / Transformer Models\n- Semantic Search\n- FAISS Vector Database\n- Retrieval-Augmented Generation (RAG)\n- Banking Chatbot Integration\n- FastAPI Backend\n- Docker Deployment\n\n---\n\n# 👨‍💻 Author\n\n**Tuktuki Halder**\n\n---\n\n# 📜 License\n\nThis project is licensed under the MIT License.\n\n---\n\n# ⭐ If You Like This Project\n\nPlease consider giving this repository a ⭐ on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeypadma2020%2Fbanking-faq-rag-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeypadma2020%2Fbanking-faq-rag-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeypadma2020%2Fbanking-faq-rag-system/lists"}