Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bangla FAQ Chatbot is an advanced AI-powered web application designed to answer user queries in Bengali. It is dynamic animated frontend, and context-aware responses using vector-based retrieval for accurate and natural answers.

Notifications You must be signed in to change notification settings

Aronno1920/FAQ-Chatbot

Repository files navigation

Bangla FAQ Chatbot

An advanced RAG (Retrieval-Augmented Generation) based Bengali FAQ chatbot that uses GitHub-hosted OpenAI models and FAISS vector database. Bangla FAQ Chatbot is an advanced AI-powered web application designed to answer user queries in Bengali. It is dynamic animated frontend, and context-aware responses using vector-based retrieval for accurate and natural answers.

screenshot

🌟 Features

  • Bengali Language Support: Complete question-answer system in Bengali
  • RAG System: Accurate information retrieval through FAISS vector database
  • Topic Filtering: 5 categories - Education, Health, Travel, Technology, Sports
  • Difficulty Levels: Separate filters for easy and difficult questions
  • Modern UI: Beautiful and user-friendly interface built with Tailwind CSS
  • Bengali Embeddings: Uses l3cube-pune/bengali-sentence-similarity-sbert model

πŸš€ Quick Start

Prerequisites

  • Python 3.8+
  • pip (Python package manager)

Installation & Run

# 1. Clone the repository
git clone https://github.com/Aronno1920/FAQ-Chatbot.git
cd BanglaChatbot
# 2. Create a virtual environment
python -m venv venv
# 3. Activate the environment
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate
# 4. Install dependencies
pip install -r [requirements.txt]
# 5. Configure API keys
cp [config.example.py] [config.py]
# Edit [config.py](http://_vscodecontentref_/4) and replace GITHUB_TOKEN with your personal token
# 6. Start the Flask app
python [app.py]

πŸ§ͺ Testing

To test if all system components are working correctly:

python test_models.py

This script will test:

  • GitHub Model API connection
  • HuggingFace embedding model
  • FAISS vector database
  • RAG system integration

πŸ“ Project Structure

BanglaChatbot/
β”œβ”€β”€ app.py # Main Flask application
β”œβ”€β”€ rag_core.py # RAG system and FAQ data
β”œβ”€β”€ utils.py # Utility functions
β”œβ”€β”€ test_models.py # Testing script
β”œβ”€β”€ requirements.txt # Python dependencies
β”œβ”€β”€ templates/
β”‚ └── index.html # Frontend UI
└── README.md # This file

πŸ”§ Configuration

GitHub API Setup

  1. Go to GitHub and create a Personal Access Token
  2. Update the token in app.py
  3. The following model is used: openai/gpt-4.1-nano

FAQ Data Update

Add new question-answer pairs in the FAQ_DATA list in rag_core.py:

FAQ_DATA = [
 {
 'topic': 'ঢিক্ষা', 
 'difficulty': 'সহজ', 
 'question': 'Your question', 
 'answer': 'Answer'
 },
 # More questions...
]

🎯 Usage

  1. Select Topic: Choose desired subject from the top menu
  2. Set Difficulty: Filter for easy or difficult questions
  3. Ask Questions: Type your question in Bengali in the text box below
  4. Get Answers: Receive relevant answers from the RAG system

πŸ› οΈ Technology Stack

  • Backend: Flask (Python)
  • AI/ML:
    • GitHub-hosted OpenAI GPT-4.1-nano
    • HuggingFace Transformers
    • FAISS (Facebook AI Similarity Search)
    • LangChain
  • Frontend: HTML5, Tailwind CSS, JavaScript
  • Vector Database: FAISS
  • Embeddings: Bengali Sentence-BERT

πŸ“Š RAG Architecture

  1. Data Preparation: Create documents from FAQ data
  2. Embedding: Generate vectors using Bengali Sentence-BERT
  3. Indexing: Create vector database with FAISS
  4. Retrieval: Find documents matching user queries
  5. Generation: Generate relevant answers using OpenAI model

πŸ” API Endpoints

  • GET / - Main chat interface
  • POST /chat - Process chat messages
  • POST /filter - Update topic/difficulty filter

πŸ› Troubleshooting

Common Issues

  1. GitHub API Error: Check if token is correct
  2. Model Loading Error: Check internet connection
  3. FAISS Error: Reinstall with pip install faiss-cpu

Log Checking

You can see detailed logs in the console while running the application.

🀝 Contributing

  1. Fork this repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License.

πŸ“ž Contact

Create an issue for questions or suggestions.


Bangla FAQ Chatbot - Smart Q&A service in Bengali using AI πŸ€–

About

Bangla FAQ Chatbot is an advanced AI-powered web application designed to answer user queries in Bengali. It is dynamic animated frontend, and context-aware responses using vector-based retrieval for accurate and natural answers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /