An intelligent FAQ chatbot powered by Groq's LLM and LangChain, designed to answer questions about Electronic Voting Machines (EVM) based on a curated FAQ dataset.
- Interactive command-line chatbot interface
- Powered by Groq's LLM (llama-3.1-8b-instant and GPT-OSS-20B)
- Built with LangChain for prompt management and chain creation
- Secure API key handling with getpass prompt
- Python 3.12+
- Groq API Key - Get one from Groq Console
- Clone the repository:
git clone git@github.com:asmshaon/AI-POWERED-FAQ-BOT.git
cd AI-Powered-FQA-Bot- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
Create a .env file in the project root:
GROQ_API_KEY=your_groq_api_key_hereAlternatively, the notebook will prompt you to enter the API key at runtime if not found in the .env file.
- Start Jupyter:
jupyter notebook-
Open
faq-bot.ipynb -
Run all cells to initialize the chatbot
-
Interact with the chatbot in the final cell
- "What is EVM?"
- "How does an EVM work?"
- "Is EVM secure?"
- "Who uses EVM?"
- "Can an EVM be tampered with?"
Type exit to end the conversation.
AI-Powered-FQA-Bot/
├── faq-bot.ipynb # Main Jupyter notebook with chatbot implementation
├── requirements.txt # Python dependencies
├── .env # Environment variables (not tracked in git)
├── .env.example # Example environment file
├── .gitignore # Git ignore rules
└── README.md # Project documentation
- LangChain - Framework for building LLM applications
- Groq - Fast LLM inference API
- Python-dotenv - Environment variable management
- Environment Setup: Loads API keys from
.envfile or prompts user input with getpass - FAQ Data: Stores predefined questions and answers about Electronic Voting Machines
- LLM Chain: Uses LangChain's PromptTemplate and ChatGroq for response generation
- Interactive Loop: Continuously accepts user questions and generates AI-powered responses
- Context-Aware: Uses the FAQ dataset to provide accurate, contextual answers
Never commit your .env file containing API keys to version control. The .gitignore file is configured to prevent this.
Abu Saleh Muhammad Shaon Email: srabon.php@gmail.com GitHub: @asmshaon