The Enhanced Interview Preparation Q&A Chatbot is a sophisticated Streamlit-based application with a modern, professional UI designed to help users excel in technical interviews. It leverages Large Language Models (LLMs) and advanced embeddings to provide context-aware answers based on uploaded study materials. The chatbot specializes in DBMS, SQL, HR, OOPS, OS topics with an intuitive and visually appealing interface.
๐ Click Here to Try the Enhanced Chatbot
- Professional gradient design with custom CSS styling
- Responsive sidebar with real-time system status monitoring
- Interactive progress indicators and loading animations
- Card-based layout for better content organization
- Status dashboard with API key validation and database metrics
- Loads PDF documents from specified directory with batch processing
- Intelligent text splitting using RecursiveCharacterTextSplitter
- Rate limit handling with automatic retry mechanisms
- Alternative embedding fallback using HuggingFace transformers
- Google Generative AI Embeddings with
models/embedding-001
- FAISS vector database for efficient similarity search
- Batch processing to handle API rate limits gracefully
- Memory-efficient indexing with merge capabilities
- ChatGroq LLM (Llama3-8b-8192) for high-quality responses
- RAG (Retrieval-Augmented Generation) for context-aware answers
- Dynamic context retrieval with similarity scoring
- Response time tracking for performance optimization
- API key validation with clear status indicators
- Fallback embedding methods for reliability
- Graceful error recovery with user-friendly messages
- Rate limit management with automatic retries
Users interact through a modern, professional web interface with gradient backgrounds, status indicators, and organized layouts.
User queries are processed with semantic understanding using Google AI embeddings, with fallback options for maximum reliability.
Document chunks are stored as high-dimensional vectors with batch processing and merge capabilities for efficient similarity searches.
The system uses optimized Retrieval-Augmented Generation with ChatGroq's Llama3 model, providing contextually rich and accurate responses.
Answers are presented in beautifully formatted containers with source references, response times, and expandable context sections.
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Streamlit UI โโโโโถโ Document Loader โโโโโถโ Text Splitter โ
โ (Enhanced) โ โ (PDF Reader) โ โ (Recursive) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ User Query โโโโโโ ChatGroq LLM โโโโโโ FAISS Retriever โ
โ (Response) โ โ (Llama3-8b) โ โ (Similarity) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โฒ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Google AI โโโโโถโ Vector Store โ
โ Embeddings โ โ (FAISS Index) โ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
- Python 3.8+
- pip package manager
- Virtual environment (recommended)
- API Keys (GROQ_API_KEY, GOOGLE_API_KEY)
-
Clone the repository
git clone https://github.com/SimranShaikh20/Smart-Interview-Bot.git cd Smart-Interview-Bot
-
Create and activate virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Setup environment variables Create a
.env
file in the project root:GROQ_API_KEY=your_groq_api_key_here GOOGLE_API_KEY=your_google_api_key_here
-
Create study materials directory
mkdir study_material # Add your PDF files to this directory
-
Run the application
streamlit run app.py
streamlit>=1.28.0
langchain>=0.1.0
langchain-groq>=0.1.0
langchain-google-genai>=1.0.0
langchain-community>=0.0.20
faiss-cpu>=1.7.4
pypdf>=3.17.0
python-dotenv>=1.0.0
- Sign up at GROQ Console
- Generate your API key
- Add to
.env
file asGROQ_API_KEY
- Visit Google AI Studio
- Create and configure your API key
- Add to
.env
file asGOOGLE_API_KEY
- Initialize Database: Click "๐ Initialize Database" to process your PDF documents
- Monitor Status: Check the sidebar for real-time system status
- Ask Questions: Enter your interview questions in the input field
- View Results: Get formatted answers with source references
- Explore Context: Expand the similarity search section for detailed context
- ๐๏ธ Database Management Systems (DBMS)
- ๐ผ Human Resources (HR)
- ๐งฉ Object-Oriented Programming (OOPS)
- ๐ป Operating Systems (OS)
- ๐ Structured Query Language (SQL)
- ๐๏ธ Multi-format support (Word, Excel, PowerPoint)
- ๐ Multi-language capabilities for global users
- ๐ค Advanced LLM integration (GPT-4, Claude)
- ๐ฑ Mobile-responsive design optimization
- ๐ Voice interaction capabilities
- ๐ Analytics dashboard for usage insights
- ๐ User authentication and session management
"API Key not found"
- Ensure
.env
file exists with valid API keys - Check environment variable names match exactly
"No documents found"
- Verify PDF files are in
./study_material/
directory - Check file permissions and formats
"Rate limit exceeded"
- Wait and retry - the app handles this automatically
- Consider using the HuggingFace fallback option
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Simran Shaikh
- GitHub: @SimranShaikh20
- LangChain for the powerful RAG framework
- Streamlit for the amazing web app framework
- GROQ for lightning-fast LLM inference
- Google AI for advanced embedding models
- FAISS for efficient vector similarity search
If this project helped you, please consider giving it a โญ!
๐ Happy Learning & Best of Luck with Your Interviews! ๐ก๐ฏ