Skip to content

AI-powered HR assistant with resume processing, biometric face verification, and intelligent chatbot. Built with FastAPI, OpenAI GPT-5, Face++, and FAISS for enterprise HR automation.

License

Notifications You must be signed in to change notification settings

Nazmul0005/HireGuard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI-Powered HR Assistant

A sophisticated, enterprise-grade HR assistant system that revolutionizes recruitment and employee management

Python 3.12 FastAPI Uvicorn Docker LLM LangChain OpenAI License: Proprietary

Project Screenshot

πŸ“‹ Overview

This AI-powered HR assistant combines cutting-edge artificial intelligence, biometric verification, and intelligent document processing to streamline HR operations. Built with enterprise scalability in mind, it provides a comprehensive solution for resume screening, candidate verification, and intelligent HR query handling.

Key Capabilities

  • πŸ€– Intelligent Conversational AI: Context-aware chatbot powered by OpenAI's GPT models for natural HR interactions
  • πŸ“„ Automated Resume Processing: Extract, analyze, and categorize candidate information with high accuracy
  • πŸ” Biometric Verification: Secure face verification using Face++ API for identity authentication
  • πŸ” Smart Knowledge Retrieval: FAISS-powered vector search for instant access to HR policies and documentation
  • πŸš€ Production-Ready: Containerized architecture with Nginx for scalable, enterprise deployment
  • πŸ’Ύ Robust Data Management: MongoDB integration for secure storage of verification records and user profiles
  • πŸ”Œ RESTful Architecture: Clean, well-documented API endpoints for seamless integration

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Nginx Proxy   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         FastAPI Application         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Chatbot Service (GPT-5)    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Resume Processing Engine   β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Face Verification (Face++)  β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   FAISS Knowledge Base       β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚
      β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚    MongoDB     β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎯 Use Cases

  • Recruitment Automation: Screen hundreds of resumes in minutes
  • Identity Verification: Verify candidate identity during virtual interviews
  • HR Query Management: Instant answers to policy and procedure questions
  • Onboarding Support: Guide new employees through documentation and processes
  • Compliance Tracking: Maintain verification records for audit purposes

πŸš€ Quick Start

Prerequisites

Ensure you have the following installed and configured:

  • Python: Version 3.12 or higher
  • Docker: Latest stable version
  • Docker Compose: Version 2.0+
  • API Credentials:
    • OpenAI API key with GPT-5 access
    • Face++ API key and secret
    • MongoDB connection URI

Installation

  1. Clone the Repository

    git clone <repository-url>
    cd ai-hr-assistant
  2. Configure Environment Variables

    Create a .env file in the project root:

    # OpenAI Configuration
    OPENAI_API_KEY=sk-your-openai-api-key
    MODEL=gpt-5
    
    # Face++ Configuration
    API_KEY=your-faceplus-api-key
    API_SECRET=your-faceplus-secret
    
    # Database Configuration
    MONGODB_URI=mongodb://username:password@localhost:27017/hr_assistant
    
    # Application Configuration
    APP_HOST=0.0.0.0
    APP_PORT=8000
    LOG_LEVEL=INFO
  3. Install Python Dependencies

    pip install -r requirements.txt
  4. Prepare Knowledge Base

    Place your HR documents (policies, procedures, FAQs) in the knowledge base directory:

    mkdir -p data/knowledge_base
    # Copy your documents to data/knowledge_base/
  5. Build Knowledge Base Index

    python ingest.py

    This creates FAISS vector indices for efficient document retrieval.

πŸ–₯️ Running the Application

Development Mode

For local development with hot-reload:

uvicorn com.mhire.app.main:app --host 0.0.0.0 --port 8000 --reload

Access the application at http://localhost:8000

Production Deployment

Deploy using Docker Compose for production environments:

# Build and start all services
docker-compose up -d --build

# View logs
docker-compose logs -f

# Stop services
docker-compose down

Production endpoint: http://localhost:3014

Health Check

Verify the application is running:

curl http://localhost:8000/health

πŸ“š API Documentation

Interactive Documentation

Once running, access comprehensive API documentation:

  • Swagger UI: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc

Core Endpoints

Chatbot Interface

POST /chat
Content-Type: application/json

{
  "message": "What is the company's leave policy?",
  "session_id": "user-123"
}

Resume Processing

POST /resume
Content-Type: multipart/form-data

file: resume.pdf

Face Verification

POST /face-verification
Content-Type: multipart/form-data

image: photo.jpg
user_id: "candidate-456"

User Verification

GET /verification/{user_id}

Response Format

All endpoints return JSON responses with consistent structure:

{
  "status": "success",
  "data": { /* response data */ },
  "message": "Operation completed successfully"
}

πŸ“ Project Structure

ai-hr-assistant/
β”‚
β”œβ”€β”€ com/mhire/app/
β”‚   β”œβ”€β”€ main.py                    # FastAPI application & routing
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── settings.py            # Configuration management
β”‚   β”œβ”€β”€ database/
β”‚   β”‚   └── mongodb.py             # Database connection handler
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ chat.py                # Chat data models
β”‚   β”‚   β”œβ”€β”€ resume.py              # Resume data models
β”‚   β”‚   └── verification.py        # Verification data models
β”‚   └── services/
β”‚       β”œβ”€β”€ chatbot/
β”‚       β”‚   β”œβ”€β”€ chain.py           # LangChain conversation chain
β”‚       β”‚   └── prompts.py         # System prompts
β”‚       β”œβ”€β”€ resume/
β”‚       β”‚   β”œβ”€β”€ parser.py          # Resume parsing logic
β”‚       β”‚   └── analyzer.py        # Resume analysis
β”‚       β”œβ”€β”€ verification/
β”‚       β”‚   └── handler.py         # User verification logic
β”‚       └── verification_system/
β”‚           └── face_verification/
β”‚               β”œβ”€β”€ detector.py    # Face detection
β”‚               └── comparator.py  # Face comparison
β”‚
β”œβ”€β”€ data/
β”‚   └── knowledge_base/            # HR documents & policies
β”‚
β”œβ”€β”€ faiss_index/                   # Vector store indices (generated)
β”‚
β”œβ”€β”€ nginx/
β”‚   └── nginx.conf                 # Nginx configuration
β”‚
β”œβ”€β”€ tests/                         # Unit & integration tests
β”‚   β”œβ”€β”€ test_chatbot.py
β”‚   β”œβ”€β”€ test_resume.py
β”‚   └── test_verification.py
β”‚
β”œβ”€β”€ docker-compose.yml             # Multi-container orchestration
β”œβ”€β”€ Dockerfile                     # Container image definition
β”œβ”€β”€ requirements.txt               # Python dependencies
β”œβ”€β”€ ingest.py                      # Knowledge base indexing script
β”œβ”€β”€ .env.example                   # Example environment variables
β”œβ”€β”€ .gitignore                     # Git ignore rules
└── README.md                      # This file

πŸ› οΈ Technology Stack

Core Framework

  • FastAPI: High-performance async web framework
  • Uvicorn: Lightning-fast ASGI server

AI & Machine Learning

  • OpenAI GPT-5: State-of-the-art language understanding
  • LangChain: LLM application framework
  • FAISS: Efficient similarity search (Facebook AI)

Biometric & Verification

  • Face++: Enterprise face detection and recognition

Data & Storage

  • MongoDB: Document-oriented database
  • PyMongo: MongoDB driver for Python

Infrastructure

  • Docker: Containerization platform
  • Nginx: Reverse proxy and load balancer

πŸ”’ Security & Compliance

Data Protection

  • All sensitive credentials stored in environment variables
  • API keys never committed to version control
  • MongoDB authentication enforced
  • HTTPS recommended for production deployments

Biometric Data

  • Face verification data encrypted at rest
  • Temporary face images deleted after processing
  • Compliance with GDPR and CCPA regulations

Access Control

  • API key authentication for all endpoints
  • Rate limiting configured in Nginx
  • Session management for chatbot conversations

Best Practices

# Never commit .env files
echo ".env" >> .gitignore

# Use strong MongoDB passwords
# Rotate API keys regularly
# Enable MongoDB encryption at rest
# Configure HTTPS with valid SSL certificates

πŸ§ͺ Testing

Run the test suite:

# Install test dependencies
pip install pytest pytest-asyncio pytest-cov

# Run all tests
pytest

# Run with coverage
pytest --cov=com.mhire.app --cov-report=html

# Run specific test file
pytest tests/test_chatbot.py -v

πŸ”§ Configuration

Environment Variables

Variable Description Required Default
OPENAI_API_KEY OpenAI API authentication key βœ… -
MODEL OpenAI model identifier βœ… gpt-5
API_KEY Face++ API key βœ… -
API_SECRET Face++ API secret βœ… -
MONGODB_URI MongoDB connection string βœ… -
APP_HOST Application host ❌ 0.0.0.0
APP_PORT Application port ❌ 8000
LOG_LEVEL Logging level ❌ INFO

Knowledge Base Configuration

Update ingest.py to customize document processing:

# Supported document types
SUPPORTED_FORMATS = ['.pdf', '.docx', '.txt', '.md']

# Chunking parameters
CHUNK_SIZE = 1000
CHUNK_OVERLAP = 200

πŸ“ˆ Performance & Scaling

Optimization Tips

  1. FAISS Index: Use GPU-accelerated FAISS for large knowledge bases
  2. Caching: Implement Redis for chatbot session caching
  3. Load Balancing: Deploy multiple Nginx instances behind a load balancer
  4. Database: Configure MongoDB replica sets for high availability

Monitoring

Integrate monitoring tools:

  • Prometheus: Metrics collection
  • Grafana: Visualization dashboards
  • Sentry: Error tracking and reporting

🀝 Contributing

We welcome contributions! Please follow these guidelines:

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

Code Standards

  • Follow PEP 8 style guide
  • Add docstrings to all functions
  • Write unit tests for new features
  • Update documentation as needed

πŸ“ Changelog

See CHANGELOG.md for version history and updates.

πŸ› Troubleshooting

Common Issues

Issue: FAISS index not found

# Solution: Rebuild the index
python ingest.py

Issue: MongoDB connection failed

# Solution: Verify MongoDB is running
docker ps | grep mongo
# Check connection string in .env

Issue: Face++ API rate limit exceeded

# Solution: Implement request queuing or upgrade plan

πŸ“ž Support

For issues and questions:

  • Bug Reports: Open an issue on GitHub
  • Feature Requests: Submit via GitHub issues
  • Security Concerns: Contact nazmulislam45213@gmail.com

About

AI-powered HR assistant with resume processing, biometric face verification, and intelligent chatbot. Built with FastAPI, OpenAI GPT-5, Face++, and FAISS for enterprise HR automation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published