Answer code of conduct questions in Slack with GPT-4 & RAG technology
๐ Code of Conduct Q&A Slack Chatbot with RAG Powered [](https://www.youtube.com/watch?v=2...
Template notes
๐ Code of Conduct Q&A Slack Chatbot with RAG Powered [](https://www.youtube.com/watch?v=2EWgC5UKiBQ) > Empower employees to instantly access and understand the companyโs Code of Conduct via a Slack chatbot, powered by Retrieval-Augmented Generation (RAG) and LLMs.
๐งโ๐ผ Whoโs it for
This workflow is designed for: - HR and compliance teams to automate policy-related inquiries - Employees who want quick answers to Code of Conduct questions directly inside Slack - Startups or enterprises that need internal compliance self-service tools powered by AI
โ๏ธ How it works / What it does
This RAG-powered Slack chatbot answers user questions based on your uploaded Code of Conduct PDF using GPT-4 and embedded document chunks. Here's the flow:
1. Receive Message from Slack: A webhook triggers when a message is posted in Slack. 2. Check if itโs a valid query: Filters out non-user messages (e.g., bot mentions). 3. Run Agent with RAG: - Uses GPT-4 with Query Data Tool to retrieve relevant document chunks. - Returns a well-formatted, context-aware answer. 4. Send Response to Slack: Fetches user info and posts the answer back in the same channel. 5. Document Upload Flow: - HR can upload the PDF Code of Conduct file. - Itโs parsed, chunked, embedded using OpenAI, and stored for future query retrieval. - A backup copy is saved to Google Drive.
๐ ๏ธ How to set up
1. Prepare your environment: - Slack Bot token & webhook configured (Sample slack app manifest: https://wisestackai.s3.ap-southeast-1.amazonaws.com/slackbotmanifest.json) - OpenAI API key (for GPT-4 & embedding) - Google Drive credentials (optional for backup)