A beginner-friendly Generative AI tutorial featuring AskHR, a practical HR chatbot built with Python, Streamlit, and OpenAI. The project demonstrates prompt engineering, LLM integration, and interactive chatbot development using synthetic HR policy data.

Getting started with Generative AI doesn't have to be complicated. One of the best ways to learn is by building something simple and practical.
AskHR is a beginner-friendly AI chatbot built with Python, Streamlit, and OpenAI. It demonstrates how Large Language Models (LLMs) can answer employee questions about company HR policies using prompt engineering.
This project is designed for anyone who wants to move beyond theory and gain hands-on experience with Generative AI.
AskHR simulates an internal HR assistant that helps employees find information about vacation days, sick leave, benefits, remote work, reimbursements, training opportunities, and other company policies.
The chatbot includes:
Department and seniority selection: Personalized answers based on 6 departments and 4 employee levels.
Synthetic HR policies: Sample company policies stored in a JSON file.
Interactive chat: Employees can ask questions and continue conversations.
Starter questions: Ready-to-use examples to help users get started.
Contact Support: An email option when additional assistance is needed.
The repository has a simple structure that beginners can easily understand and modify.
data/policies.json: Synthetic HR policies covering 6 departments and 4 seniority levels.
src/app.py: Streamlit user interface, employee selections, and chat history.
src/llm.py: OpenAI integration, prompt construction, and response generation.
requirements.txt: Required Python packages.
README.md: Instructions for setting up and running the application.
By exploring and modifying this project, you'll gain practical experience with:
Building an interactive chatbot using Streamlit.
Connecting a Python application to the OpenAI API.
Writing system and user prompts.
Passing structured information to an LLM.
Managing conversation history using Streamlit Session State.
Customizing an AI application for a real-world business use case.
Once you understand how AskHR works, you can expand it with additional features:
Improve prompt engineering: Experiment with different system prompts and response formats.
Add new policies: Extend the synthetic dataset with more departments, roles, and company policies.
Add document upload: Allow users to upload HR policy PDFs.
Implement RAG: Use embeddings and a vector database to retrieve relevant policy information.
Add multilingual support: Allow employees to ask questions in different languages.
These improvements can help you gradually move from a simple prompt-based chatbot to a more advanced Generative AI application.
The project requires basic Python knowledge and an OpenAI API key.
Clone the repository, install the dependencies, configure your API key in the .env file, and run:
streamlit run src/app.pyThe full setup instructions are available in the README.
AskHR is a good starting point for Python developers, students, and anyone learning Generative AI who wants to understand how to build a working LLM-powered application.
The project uses synthetic company policies and is intended for learning and experimentation, not as a production HR system.
Ready to build your first chatbot?
Download the source code, explore how it works, and start experimenting with your own ideas.