Skip to content

ibizabroker/slack-hr-gpt

Repository files navigation


HR Virtuoso: Your Intelligent HR Assistant

Python LangChain OpenAI Slack Supabase Pinecone

Why HR Virtuoso?Instructions to SetupInstallationContribution

Why HR Virtuoso?

As an employee are you tired of waiting on HR responses? Meet HR Virtuoso! Say goodbye to delays and going through long policies. With HR Virtuoso, get instant answers to your queries, 24/7. No more hassle—just quick, accurate info at your fingertips. Empower yourself with the ultimate HR tool.

As an HR professional, are you all too familiar with the relentless loop of addressing the same questions? Well, it's time to envision a game-changing solution – presenting HR Virtuoso! Our cutting-edge tool is tailor-made to take care of those predictable inquiries surrounding company policies. This means you can reclaim valuable time to direct your energy towards driving strategic initiatives that truly matter. Elevate your role, supercharge your team's potential, and wave farewell to the humdrum routine. With HR Virtuoso, the future of HR management is at your fingertips.

demo

Key Features:

  • HR Policy Expertise: HR Virtuoso is a cutting-edge solution designed to provide accurate and comprehensive answers to any questions related to HR policies within your organization.
  • Advanced Natural Language Processing: Powered by state-of-the-art Natural Language Processing (NLP) technology, the bot can understand and interpret the nuances of human language, ensuring that it comprehends even complex and context-dependent queries.
  • Feedback Loop: Recognizing the significance of continuous improvement, HR Virtuoso comes with a built-in feedback mechanism, allowing users to provide feedback on the accuracy and helpfulness of the answers. This feedback loop can be used for the bot to learn and refine its responses over time.
  • Effortless Self-Service: Employees no longer need to wait for HR personnel to clarify their doubts. HR Virtuoso empowers employees to find answers quickly and independently, leading to increased productivity and reduced dependency on HR staff for routine queries.
  • 24/7 Availability: HR Virtuoso is available round-the-clock, catering to employees in different time zones and accommodating diverse work schedules. This accessibility enhances employee satisfaction by providing instant support when needed.
  • Expandable Knowledge: One of HR Virtuoso's standout features is its ability to autonomously expand its knowledge base in real-time. With a simple script execution, the bot can effortlessly integrate new HR policies as they are introduced by the company.

Instructions to Setup

  • Setup the environmental variables

    • Create a .env file in the working directory. Copy the contents of .env.example.
  • Setup your openai account

    • Sign up with OpenAI.
    • Go to Personal -> View API Keys -> Create new secret key.
    • Copy this key and paste it in your .env file for the variable OPENAI_API_KEY.
  • Setup your slack app

    • Sign up with Slack and create your workspace.
    • Create a slack app. Click from an app manifest, select your workspace, and copy the given below app manifest in yaml format or you can copy my app manifest.
    display_information:
      name: Demo Bot
      description: "Give a short discription here."
      background_color: "#2c2d30"
      long_description: "Give a long discription here with a minimum of 175 characters. This property is optional, you can remove this."
    features:
      bot_user:
        display_name: Demo Bot
        always_online: true
    oauth_config:
      scopes:
        user:
          - im:history
          - im:read
          - im:write
          - mpim:history
          - mpim:read
          - mpim:write
          - reactions:read
          - reactions:write
        bot:
          - app_mentions:read
          - channels:history
          - channels:read
          - chat:write
          - chat:write.customize
          - im:history
          - im:read
          - im:write
          - mpim:history
          - mpim:read
          - mpim:write
          - reactions:read
          - reactions:write
          - users:read
    settings:
      event_subscriptions:
        bot_events:
          - app_mention
          - im_history_changed
          - message.channels
          - message.im
          - reaction_added
      interactivity:
        is_enabled: true
      org_deploy_enabled: false
      socket_mode_enabled: true
      token_rotation_enabled: false
    • Click on Install to Workspace
  • Setup the logs database

    • Sign up with Supabase.
    • Create a new project with the appropriate region.
    • Your project URL will be the SUPABASE_URL env variable and anon public key will be the SUPABASE_KEY.
    • Create a table and name it hr-gpt-feedback. Disable RLS and create 6 columns:
      • Name: id, Type: uuid, Default Value: gen_random_uuid(), make this as primary key.
      • Name: user_name, Type: Text,
      • Name: user_query, Type: Text,
      • Name: actual_output, Type: Text,
      • Name: expected_output, Type: Text,
      • Name: reaction, Type: Text,
  • Setup the vector database

    • Sign up with Pinecone.
    • Create a project and select the appropriate region.
    • Create an index, name it as hr-data. Configure your index to have cosine metric with 1536 dimensions.

Installation

  • Clone the repository: git clone https://github.com/ibizabroker/slack-hr-gpt.git
  • Create a virtual environment
pip install virtualenv
virtualenv venv
  • Activate virtual environment on Windows:
.\venv\Scripts\activate
  • Activate virtual environment on MAC:
source venv/bin/activate
  • Once your virtual environment is activated, install the required pacakges: pip install -r requirements.txt
  • Upload the necessary HR polices in the pdf directory.
  • Ingest this data into pinecone.
cd llm
python ingest.py
  • Run the bot in an activated virtual environment: python bot.py

Contribution

Feel free to open an issue or submit a pull request. Your feedback and suggestions are greatly appreciated :)

This project is licensed under the MIT License - see the LICENSE file for details.