Skip to content

natgluons/HiringHelp-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

title: HiringHelp-Chatbot app_file: app.py sdk: gradio sdk_version: 5.22.0

πŸ‘” HiringHelp Chatbot

A chatbot that helps you find the most fitting candidate for the role! Made using RAG (Retrieval-Augmented Generation) with LangChain.

image

How It Works

HiringHelp uses LangChain's RAG implementation to provide accurate, document-grounded responses. The process involves:

  1. Document Processing: Candidate documents are split into chunks and embedded
  2. Retrieval: When a query is received, relevant document chunks are retrieved using FAISS vector similarity
  3. Generation: Retrieved context is combined with the query to generate accurate responses

Technology

  • 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

Features

  • 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

Usage Examples

"List all the available candidates"
"Tell me about a candidate named [Name]"
"Which candidate is best for [Role] role?"

Demo Snapshots

A demo version is available with sample candidate data for testing purposes.

❔ Ask about a specific candidate

πŸ† Or ask who's best for the role

πŸ‘€ Preview all candidate's resume!

Rate Limits

  • 10 requests per minute
  • 100 requests per day

Deployment

  1. Vercel Deployment: Live Demo - inactive API [Preview Only]
  1. Hugging Face Spaces: Interactive Demo - active
  1. Local Development: See below for setup instructions & local-docs branch for complete script.

❝ Interested in building your own chatbot? Follow this setup instructions below! (β—•β€Ώβ—•) ❞

Local Development Setup

Requirements

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
  1. Clone the repository:
git clone https://github.com/natgluons/HiringHelp-Chatbot.git
cd HiringHelp-Chatbot
  1. Set up environment variables: Create a .env file in the root directory:
OPENROUTER_API_KEY=your_api_key_here
  1. Add candidate documents: Place candidate documents in the knowledge_sources directory.

  2. Run with Docker:

# Build and start the container
docker-compose up --build

# Access the web interface at http://localhost:5000

Docker Commands

# 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 -d

Project Structure

HiringHelp-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

About

A chatbot that helps with hiring-related questions using RAG (Retrieval-Augmented Generation) with LangChain

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published