Description
The Autonomous HR Chatbot, hosted on GitHub, is designed as a prototype enterprise application. It functions as an autonomous agent capable of addressing HR-related inquiries using a suite of tools. The chatbot's architecture is built upon LangChain's agents and tools modules, utilizing Pinecone as a vector database and powered by either ChatGPT or gpt-3.5-turbo. The front-end is developed with Streamlit, incorporating the streamlit_chat component for user interaction.
The chatbot's functionality is centered around several key tools. These include Timekeeping Policies, a sample HR policy document generated by ChatGPT, and Employee Data, a CSV file containing dummy employee information. Embeddings for the HR policy document are created using OpenAI’s text-embedding-ada-002 model and stored in a Pinecone index. The employee data is loaded as a pandas dataframe and manipulated by the LLM using LangChain's PythonAstREPLTool. Additionally, the chatbot incorporates LangChain's calculator chain module, LLMMathChain, for performing calculations.
The project offers a modernized version using an agent loop via OpenAI's Responses API, without LangChain or Pinecone, with gpt-5.2 reasoning summaries, available in the v2/ directory. The original 2023 implementation is preserved for reference. The tech stack includes Azure OpenAI Service, LangChain, Pinecone, Streamlit, Azure Data Lake, and Azure Data Factory. The project is authored by Stephen Bonifacio, who provides links to his LinkedIn and Twitter profiles for further engagement.
The chatbot's value lies in its ability to automate HR query responses, providing a practical application of AI in enterprise settings. It streamlines information retrieval and offers a user-friendly interface for employees to access HR-related information efficiently. The project's open-source nature allows for customization and further development, making it a valuable resource for developers and HR professionals alike.
Autonomous HR Chatbot's Core Features
Autonomous HR agent
Answers HR queries
Uses LangChain agents and tools
Employs Pinecone vector database
Powered by ChatGPT or gpt-3.5-turbo
Front-end built with Streamlit
Includes Timekeeping Policies tool
Utilizes Employee Data from CSV
Integrates LangChain's PythonAstREPLTool
Incorporates LLMMathChain calculator
Uses OpenAI's text-embedding-ada-002 model
Modernized version with OpenAI's Responses API
Open-source project
Getting Started with Autonomous HR Chatbot
Clone: Clone the repository to a local directory.
Install Dependencies: Navigate to the local directory and run `pip install -r requirements.txt` in your terminal.
Configure API Keys: Input your API keys in the `hr_agent_backend_local.py` file (or `hr_agent_backend_azure.py` if using Azure).
Run Frontend: Run `streamlit run hr_agent_frontent.py` in your terminal.
Create Pinecone Account: Create a Pinecone account at pinecone.io.
Store Embeddings: Run the notebook 'store_embeddings_in_pinecone.ipynb' and replace API keys.
Autonomous HR Chatbot's Use Cases
- HR Query Automation
- Employee Self-Service
- Policy Information Retrieval
- Data Analysis
- HR Process Improvement
- Knowledge Base
- Training and Onboarding
- Compliance







