Skip to content

An innovative chatbot designed to transform interview preparation by providing context-driven, accurate answers using advanced LLMs and embeddings for efficient document-based Q&A.

License

Notifications You must be signed in to change notification settings

SimranShaikh20/Smart-Interview-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

29 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฏ Enhanced Interview Preparation Q&A Chatbot

Prompt Engineering LangChain RAG (Retrieval-Augmented Generation) Streamlit FAISS Google AI


๐Ÿ“Œ Project Overview

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.


๐Ÿš€ Live Demo

๐Ÿ”— Click Here to Try the Enhanced Chatbot


โœจ Key Features

๐ŸŽจ Modern UI/UX

  • 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

๐Ÿ“ Advanced Document Processing

  • 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

๐Ÿ” Smart Vector Store Management

  • 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

๐Ÿ’ก Intelligent Q&A System

  • 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

๐Ÿ›ก๏ธ Robust Error Handling

  • 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

โš™๏ธ How It Works

๐ŸŽจ Enhanced Streamlit Interface

Users interact through a modern, professional web interface with gradient backgrounds, status indicators, and organized layouts.

๐Ÿ“ฅ Intelligent Input Processing

User queries are processed with semantic understanding using Google AI embeddings, with fallback options for maximum reliability.

๐Ÿ“š Advanced FAISS Vector Store

Document chunks are stored as high-dimensional vectors with batch processing and merge capabilities for efficient similarity searches.

๐Ÿ”Ž Enhanced RAG Implementation

The system uses optimized Retrieval-Augmented Generation with ChatGroq's Llama3 model, providing contextually rich and accurate responses.

๐Ÿ“ค Professional Response Display

Answers are presented in beautifully formatted containers with source references, response times, and expandable context sections.


๐Ÿ”ง Technical Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   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)   โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“‚ Installation & Setup

Prerequisites

  • Python 3.8+
  • pip package manager
  • Virtual environment (recommended)
  • API Keys (GROQ_API_KEY, GOOGLE_API_KEY)

๐Ÿ› ๏ธ Setup Steps

  1. Clone the repository

    git clone https://github.com/SimranShaikh20/Smart-Interview-Bot.git
    cd Smart-Interview-Bot
  2. Create and activate virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. 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
  5. Create study materials directory

    mkdir study_material
    # Add your PDF files to this directory
  6. Run the application

    streamlit run app.py

๐Ÿ“‹ Requirements

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

๐Ÿ”‘ API Configuration

GROQ API Key

  1. Sign up at GROQ Console
  2. Generate your API key
  3. Add to .env file as GROQ_API_KEY

Google AI API Key

  1. Visit Google AI Studio
  2. Create and configure your API key
  3. Add to .env file as GOOGLE_API_KEY

๐Ÿš€ Usage Guide

  1. Initialize Database: Click "๐Ÿš€ Initialize Database" to process your PDF documents
  2. Monitor Status: Check the sidebar for real-time system status
  3. Ask Questions: Enter your interview questions in the input field
  4. View Results: Get formatted answers with source references
  5. Explore Context: Expand the similarity search section for detailed context

๐Ÿ“Š Supported Topics

  • ๐Ÿ—„๏ธ Database Management Systems (DBMS)
  • ๐Ÿ’ผ Human Resources (HR)
  • ๐Ÿงฉ Object-Oriented Programming (OOPS)
  • ๐Ÿ’ป Operating Systems (OS)
  • ๐Ÿ” Structured Query Language (SQL)

๐Ÿ”ฎ Future Enhancements

  • ๐Ÿ—๏ธ 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

๐Ÿ› ๏ธ Troubleshooting

Common Issues

"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

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

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

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ‘จโ€๐Ÿ’ป Author

Simran Shaikh


๐Ÿ™ Acknowledgments

  • 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

โญ Star History

If this project helped you, please consider giving it a โญ!


๐Ÿš€ Happy Learning & Best of Luck with Your Interviews! ๐Ÿ’ก๐ŸŽฏ

About

An innovative chatbot designed to transform interview preparation by providing context-driven, accurate answers using advanced LLMs and embeddings for efficient document-based Q&A.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published