An open API service indexing awesome lists of open source software.

https://github.com/azkasahar/ai-powered-hr-chatbot

An interactive chatbot that answers HR policy questions using FAISS vector search and GPT-4o via GitHub-provided OpenAI token.
https://github.com/azkasahar/ai-powered-hr-chatbot

Last synced: 4 months ago
JSON representation

An interactive chatbot that answers HR policy questions using FAISS vector search and GPT-4o via GitHub-provided OpenAI token.

Awesome Lists containing this project

README

          

# πŸ€– HR Chatbot with FAISS + GPT-4o

An interactive chatbot that answers HR policy questions using FAISS vector search and GPT-4o via GitHub-provided OpenAI token.
image

---

## πŸ›  Features

- πŸ’¬ Chat interface using Streamlit
- πŸ“ HR documents embedded using `sentence-transformers` + FAISS
- πŸ” Context-aware question rephrasing
- πŸ€– GPT-4o responses via GitHub Token (`https://models.github.ai/inference`)

---

## πŸ“¦ Installation

### 1. Clone the repository

```bash
git clone https://github.com/YOUR_USERNAME/hr-chatbot.git
cd hr-chatbot
````

### 2. Install dependencies

```bash
pip install -r requirements.txt
```

### 3. Create a `.env` file

```env
GITHUB_TOKEN=your_github_provided_token_here
```

---

## πŸ“ Folder Structure

```
β”œβ”€β”€ faiss_index/ # Vector store (auto-generated)
β”œβ”€β”€ hr-policies/ # Your HTML files (input)
β”œβ”€β”€ hr-chatbot.py # Main Streamlit chatbot app
β”œβ”€β”€ hr-upload.py # Script to build FAISS index from HTML
β”œβ”€β”€ requirements.txt
└── README.md
```

---

## πŸš€ Usage

### 1. Build FAISS Vector Index (run once)

Make sure your `hr-policies/` folder contains all the HTML documents.

```bash
python hr-upload.py
```

### 2. Start the Chatbot UI

```bash
streamlit run hr-chatbot.py
```

You’ll be able to chat with the bot about HR policies in a Streamlit web UI.

---

## 🧠 Notes

* GPT-4o is accessed via GitHub’s [models.github.ai](https://models.github.ai/inference) inference endpoint.
* Your `GITHUB_TOKEN` must be valid and have access to that endpoint.
* Ensure `faiss_index/` exists before running the chatbot.

---

## πŸ“ License

MIT – free to use, modify, and share.