title: HiringHelp-Chatbot app_file: app.py sdk: gradio sdk_version: 5.22.0
A chatbot that helps you find the most fitting candidate for the role! Made using RAG (Retrieval-Augmented Generation) with LangChain.
HiringHelp uses LangChain's RAG implementation to provide accurate, document-grounded responses. The process involves:
- Document Processing: Candidate documents are split into chunks and embedded
- Retrieval: When a query is received, relevant document chunks are retrieved using FAISS vector similarity
- Generation: Retrieved context is combined with the query to generate accurate responses
- API & Model: Using Qwen-2-7B-Chat via OpenRouter API for its balance of performance and cost-effectiveness in RAG applications, with custom embedding generation for document retrieval.
- Stack: LangChain, FAISS, Gradio, Flask-Limiter
- Interactive chat interface
- Support for text document formats
- Example questions for easy interaction
- Source attribution for responses
- Rate limiting (10 requests/minute, 100 requests/day)
- Vector similarity search for accurate retrieval
- Environment variable configuration
"List all the available candidates"
"Tell me about a candidate named [Name]"
"Which candidate is best for [Role] role?"
A demo version is available with sample candidate data for testing purposes.
- 10 requests per minute
- 100 requests per day
- Vercel Deployment: Live Demo - inactive API [Preview Only]
- Hugging Face Spaces: Interactive Demo - active
- Local Development: See below for setup instructions & local-docs branch for complete script.
Flask==2.0.3
Werkzeug==2.0.3
openai>=1.0.0
sqlalchemy==1.4.25
python-dotenv==1.0.1
pandas==2.2.0
scikit-learn==1.5.0
langchain-core>=0.1.17
langchain-community>=0.0.13
langchain>=0.1.0
tiktoken
langchain-openai
faiss-cpu==1.7.4
Flask-Limiter>=3.5.0
requests>=2.32.3
aiohttp==3.9.1
beautifulsoup4==4.12.2
- Clone the repository:
git clone https://github.com/natgluons/HiringHelp-Chatbot.git
cd HiringHelp-Chatbot- Set up environment variables:
Create a
.envfile in the root directory:
OPENROUTER_API_KEY=your_api_key_here
-
Add candidate documents: Place candidate documents in the
knowledge_sourcesdirectory. -
Run with Docker:
# Build and start the container
docker-compose up --build
# Access the web interface at http://localhost:5000# Start the application
docker-compose up -d
# Stop the application
docker-compose down
# View logs
docker-compose logs -f
# Rebuild and restart
docker-compose up --build -dHiringHelp-Chatbot/
βββ api/ # Main application code
β βββ index.py # Flask application and API endpoints
β βββ __init__.py
βββ knowledge_sources/ # Directory for candidate documents
βββ lib/ # Helper libraries
βββ public/ # Static files
βββ database/ # Database related files
βββ docker-compose.yml # Docker compose configuration
βββ Dockerfile # Docker build instructions
βββ requirements.txt # Python dependencies
βββ .env # Environment variables
