This project adapts the RAG/hr-helpdesk/experiments reference into a runnable HR helpdesk for the policy files in docs/.
- Markdown-aware chunking for the numbered policy sections in your docs
- PostgreSQL + PGVector for vector indexing
- Google Gemini embeddings and chat generation
- Streamlit chat UI with source citations
- Create a virtual environment and install dependencies.
- Ensure
.envcontainsGOOGLE_API_KEY. - Start PGVector locally:
docker compose up -d- Wait for the
pgvectorcontainer to become healthy. - Build the index:
python -m hr_helpdesk.indexing- Run the app:
streamlit run hr_helpdesk/main.pyGOOGLE_API_KEYrequiredEMBEDDING_MODELoptional, defaults togemini-embedding-001CHAT_MODELoptional, defaults togemini-2.5-flashHR_DOCS_DIRoptional, defaults todocsHR_COLLECTION_NAMEoptional, defaults tofatimaglow_hr_helpdeskPGVECTOR_CONNECTIONrequired for PGVector, for examplepostgresql+psycopg://postgres:postgres@localhost:5432/fatimaglow_hrEMBEDDING_DIMENSIONoptional if you want a fixed embedding width for PGVector
This repo includes compose.yaml and 01-enable-vector.sql for a local development database.
Default connection:
postgresql+psycopg://postgres:postgres@localhost:5432/fatimaglow_hr
Useful commands:
docker compose up -d
docker compose ps
docker compose down