AuntyPelz AI

Curacel 2024
AuntyPelz AI

Project Overview

The HR FAQ Chatbot, internally known as AuntyPelz AI, is an intelligent assistant developed to streamline Human Resources operations at Curacel. It leverages a Retrieval-Augmented Generation (RAG) system to provide employees with instant, accurate answers to HR-related questions, process leave day and HMO ID inquiries, and deliver Slack engagement analytics. The system integrates with Google Drive for document-based knowledge and Google Sheets for dynamic employee and analytics data, utilizing OpenAI's language models for natural language understanding and response generation.

As the sole developer on this project, I designed and implemented an AI-powered solution that enhances employee experience by providing a centralized, accessible, and efficient channel for HR information and services. The goal was to reduce the manual workload on the People Operations team and empower employees with self-service capabilities.

Challenges & Solutions

Integrating Diverse and Dynamic Data Sources

The chatbot needed to access information from various sources including HR policy documents (PDFs on Google Drive), structured employee leave/HMO data (Google Sheets), and Slack analytics reports (Google Sheets). Ensuring data freshness and consistent retrieval was crucial.

Solution: I implemented a robust document loading and processing pipeline that converts these varied data types into a unified format suitable for a vector store (Chroma). This involved creating parsers for Google Drive files and Google Sheets, and a mechanism to periodically refresh the vector store to ensure the chatbot always has access to the latest information.

Ensuring Contextual Understanding and Accurate Responses

Providing relevant answers required the chatbot to understand the context of the conversation, including past interactions, and to accurately interpret different types of HR queries (e.g., policy questions, data lookups for leave, specific Slack analytics).

Solution: I worked on the design and implementation of the RAG chain using LangChain. This included setting up history-aware retrievers to maintain conversational context, and crafting detailed system prompts that guide the LLM in how to handle different query types, utilize the retrieved context, and adhere to specific communication protocols (e.g., for leave balance, HMO ID, Slack analytics reporting).

Handling Specialized Queries and Data Presentation

The chatbot needed to not just answer general questions but also perform specific tasks like looking up an employee's leave balance, presenting their Slack engagement metrics in a user-friendly way (including benchmarks and leaderboard positions), and guiding new hires through onboarding processes.

Solution: I developed the logic within the RAG chain and prompt engineering to include protocols for these specialized queries. This involved ensuring the LLM could correctly parse requests, access the appropriate data (leave data, Slack analytics data passed in context), and format the output clearly. For the onboarding process, I implemented a comprehensive system that retrieves personalized onboarding checklists from Google Sheets, creates a customized conversation flow collecting the new employee's name, location, and team, then uses this information to recommend relevant Slack channels and connect them with nearby team members. The system presents an interactive onboarding checklist with progress tracking and integrates with Slack to allow HR personnel to manually trigger onboarding through a dedicated command.

Results & Impact

The HR FAQ Chatbot has significantly improved the efficiency of HR operations and employee satisfaction:

  • Achieved a 90% success rate in resolving common HR queries without human intervention, based on initial deployment feedback.
  • Reduced the time taken for employees to receive answers to questions by an average of 80%.
  • Enabled employees to access their Slack engagement metrics on-demand, fostering a data-aware culture.
  • Freed up an estimated 10-15 hours per week for the People Operations team by automating responses to repetitive inquiries.
  • Improved the onboarding process for new employees by providing a personalized checklist and connecting them with relevant Slack channels.

Key Learnings

This project provided extensive experience in developing and deploying practical AI solutions in a corporate environment:

  • Deepened my understanding of building and optimizing Retrieval-Augmented Generation (RAG) systems for domain-specific Q&A.
  • Gained significant experience in integrating LLMs with diverse external data sources, including unstructured documents and structured spreadsheets via APIs (Google Drive, Google Sheets).
  • Enhanced my skills in prompt engineering to guide LLM behavior for complex tasks, ensuring accuracy, appropriate tone, and adherence to specific operational protocols.
  • Developed expertise in using LangChain for orchestrating complex LLM workflows, including history management and context injection.
  • Acquired practical knowledge in building and deploying AI applications using FastAPI, including managing application lifecycle, background tasks, and API endpoint design.