This repository contains a retrieval‑augmented generation (RAG) chatbot built with
Pinecone and OpenAI.
The content of the HR handbook (under folders like benefits/
, guides/
etc.)
is indexed into a Pinecone vector database. Users can ask questions via a
Gradio interface and receive answers based on the indexed
material.
- Install dependencies (preferably in a virtual environment):
pip install -r requirements.txt
- Create a
.env
file in the project root and set the following variables:
OPENAI_API_KEY=YOUR_OPENAI_KEY
PINECONE_API_KEY=YOUR_PINECONE_KEY
PINECONE_ENV=YOUR_PINECONE_ENVIRONMENT
# optional: PINECONE_INDEX=hr-handbook
- Run the application:
python app.py
The first run will index all .txt
files into Pinecone. You can skip this step
on subsequent runs by setting the environment variable SKIP_INDEXING=1
.
The Gradio interface now displays category buttons and a list of recommended questions. Pick a category, choose a suggested question or type your own, and the model retrieves relevant documents to answer using OpenAI's Chat API. The layout uses two columns with the title centered.
If you want to display a logo in the UI, add a logo.jpeg
image (170×170) to the project root. The application will use it if present.
benefits/ HR benefits information
communities-of-practice/ Community related docs
company/ Company overview
guides/ Guides and policies
roles/ Role descriptions