HR Assistant - RAG Based Application
This project is a Retrieval-Augmented Generation (RAG) application designed to assist HR departments. It allows users to upload HR-related documents (like policy PDFs or employee handbooks) and query them using an LLM (Large Language Model) to get accurate, context-aware answers.
Features
- Document Ingestion: Upload and process PDF documents.
- Vector Storage: Uses
FAISSorChromaDBfor efficient similarity search. - RAG Pipeline: Combines retrieved document context with LLM generation for precise answers.
- User Interface: Built with
Streamlitfor an interactive experience.
Tech Stack
- Language: Python
- Framework: LangChain
- LLM: OpenAI (GPT-3.5/4) or Groq (Llama3)
- Frontend: Streamlit
- Embeddings: HuggingFace / OpenAI Embeddings
Prerequisites
Ensure you have the following installed:
- Python 3.10 or higher
- An API Key (OpenAI or Groq)
Installation & Setup
-
Clone the repository:
git clone https://github.com/vinaygandhigit/HRAssistantRAG.git cd HRAssistantRAG -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venvScriptsactivate -
Install dependencies:
pip install -r requirements.txt -
Set up Environment Variables:
Create a.envfile in the root directory and add your keys:OPENAI_API_KEY=your_api_key_here GROQ_API_KEY=your_groq_key_here
How to Run
Run the Streamlit application using the following command:
streamlit run app.py
Usage
- Open the local URL provided by Streamlit.
- Upload your HR PDF documents via the sidebar.
- Wait for the documents to be indexed.
- Ask questions like "What is the company's remote work policy?" or "How many paid leaves are allowed?"