I used to spend at least five hours a week answering the same questions. "How many PTO days do I have?" "What is our parental leave policy?" "How do I submit an expense report?" "When is the next company holiday?" Multiply that across every new hire, every open enrollment season, every policy update, and it adds up fast.
So I built a bot. It lives in Slack, it knows our company policies inside and out, and it answers employee questions instantly, twenty-four hours a day. It took me an afternoon to get the first version working, and it has saved our team more time than any other tool I have built.
In this guide, I am going to walk you through exactly how to build one. I will be honest about which parts you can do yourself and which parts need a developer. Let's get into it.
What We Are Building
Here is the big picture: a Slack bot that employees can message with questions about company policies, benefits, PTO, and other common HR topics. The bot uses Claude's API to understand the question and generate an answer, grounded in your actual company documents. It does not make things up because we give it your real policies to reference.
The architecture is simple:
- Employee sends a message to the bot in Slack
- Your server receives the message through Slack's API
- Your server sends the question to Claude, along with your company knowledge base
- Claude generates an answer based on your actual policies
- The answer is sent back to the employee in Slack
Let me be upfront: you will need a developer for parts of this project. But the most important work, curating the knowledge base, writing the system prompt, testing the answers, and rolling it out, is all HR work. Here is the split:
HR Does This
- Gather and organize company policies
- Write and refine the system prompt
- Test answers for accuracy and tone
- Define what the bot should and should not answer
- Write the rollout communication
- Monitor and improve over time
Developer Does This
- Set up the Slack app and API keys
- Write the server code
- Deploy the bot to a server
- Handle error logging and monitoring
- Set up any database if needed
If you do not have a developer on your team, this is a perfect project to bring to your engineering team as a request. It is small, well-scoped, and has clear business value. Most engineers can set up the technical pieces in a few hours.
Build Your Knowledge Base
This is the most important step, and it is 100% HR work. The bot is only as good as the information you give it. You need to gather every document an employee might ask about and organize it into a clean, structured format.
Start with the questions you actually get asked. Go through your Slack DMs, your email, your ticketing system if you have one. What are the top 20 questions? For most HR teams, the list looks something like this:
- PTO policy, accrual, and how to request time off
- Health insurance details, enrollment, and changes
- Parental leave policy
- Expense reimbursement process
- Company holidays
- Remote work and WFH policy
- 401(k) or retirement benefits
- Equipment and home office stipend
- Performance review timeline and process
- Who to contact for specific issues
For each topic, create a clean text document with the current, accurate policy. Strip out the legalese where you can. The bot will work better with clear, plain-language source material.
Save all of these as a single text file, or a set of text files organized by topic. Here is an example of how to structure one section:
## PTO Policy
## Last updated: March 2026
Full-time employees accrue 20 days of PTO per year (accrued monthly
at 1.67 days/month). PTO begins accruing on your first day.
To request PTO:
1. Submit a request in BambooHR at least 5 business days in advance
2. Your manager will approve or discuss within 2 business days
3. For requests longer than 5 consecutive days, submit 2 weeks ahead
Unused PTO rolls over up to 5 days into the next calendar year.
PTO beyond the 5-day rollover cap is forfeited on January 1.
Questions? Contact hr@yourcompany.com or message #ask-hr in Slack.
## Company Holidays (2026)
- January 1 — New Year's Day
- January 19 — MLK Jr. Day
- February 16 — Presidents' Day
- May 25 — Memorial Day
- July 3 — Independence Day (observed)
- September 7 — Labor Day
- November 26–27 — Thanksgiving
- December 24–25 — Winter Break
- December 31 — New Year's Eve
Write the System Prompt
The system prompt is the instruction set you give Claude that tells it how to behave. This is where you, the HR professional, have the most influence over the bot's personality and accuracy. A developer can set up the plumbing, but only you know how the bot should sound and what it should (and should not) say.
Here is a system prompt I have used and refined over several iterations:
You are a friendly, helpful HR assistant for [Company Name].
Your job is to answer employee questions about company policies,
benefits, PTO, and general HR topics.
RULES:
- ONLY answer based on the company knowledge base provided below.
- If the answer is not in the knowledge base, say: "I don't have
that information in my current docs. Please reach out to
hr@yourcompany.com or post in #ask-hr and a human will help you."
- NEVER make up policy details, dates, or numbers.
- NEVER provide legal advice. If someone asks a legal question,
direct them to hr@yourcompany.com.
- Be warm and conversational, but concise. Employees are busy.
- If a question seems urgent or sensitive (harassment, discrimination,
safety concern), respond with: "This sounds like something that
needs a real person. Please reach out to [HR Contact] directly
at [email/phone]. This will be handled confidentially."
- Do not discuss individual compensation, performance reviews,
or other employees.
KNOWLEDGE BASE:
[Your knowledge base content goes here]
Notice the explicit rules about what the bot should NOT do. This is critical. Without these guardrails, a language model will try to be helpful by making up answers. The instruction to say "I don't have that information" when something is missing is what keeps the bot trustworthy. Employees will forgive a bot that says "I'm not sure, ask HR." They will not forgive one that gives them wrong information about their health insurance.
Set Up the Technical Pieces
This is where your developer comes in. Here is the code for a basic Slack bot that connects to Claude's API. I am including it here so you can see how simple it is, and so you can hand this article to your developer as a starting point.
First, install the required packages:
pip install slack-bolt anthropic python-dotenv
Then, create the bot:
import os
from pathlib import Path
from dotenv import load_dotenv
from slack_bolt import App
from slack_bolt.adapter.socket_mode import SocketModeHandler
import anthropic
load_dotenv()
# Initialize Slack app and Claude client
app = App(token=os.environ["SLACK_BOT_TOKEN"])
claude = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
# Load the knowledge base and system prompt
knowledge_base = Path("knowledge-base.txt").read_text()
system_prompt = Path("system_prompt.txt").read_text()
system_prompt = system_prompt.replace(
"[Your knowledge base content goes here]",
knowledge_base
)
def ask_claude(question: str) -> str:
"""Send an employee question to Claude and return the answer."""
message = claude.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
system=system_prompt,
messages=[{"role": "user", "content": question}]
)
return message.content[0].text
# Handle direct messages to the bot
@app.event("message")
def handle_message(event, say):
# Only respond to DMs (not channels) and ignore bot messages
if event.get("channel_type") == "im" and not event.get("bot_id"):
question = event["text"]
try:
answer = ask_claude(question)
say(answer)
except Exception as e:
say("Something went wrong on my end. Please try again "
"or reach out to hr@yourcompany.com directly.")
print(f"Error: {e}")
# Also respond to @mentions in channels
@app.event("app_mention")
def handle_mention(event, say):
question = event["text"]
try:
answer = ask_claude(question)
say(answer, thread_ts=event["ts"])
except Exception as e:
say("Something went wrong. Please try #ask-hr instead.",
thread_ts=event["ts"])
if __name__ == "__main__":
handler = SocketModeHandler(app, os.environ["SLACK_APP_TOKEN"])
print("HR FAQ Bot is running!")
handler.start()
You will also need a .env file with your API keys:
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_APP_TOKEN=xapp-your-app-token
ANTHROPIC_API_KEY=sk-ant-your-api-key
Your developer will need to create a Slack app at api.slack.com, enable Socket Mode, add the necessary bot scopes (chat:write, im:history, app_mentions:read), and install it to your workspace. This takes about 15 minutes if they have done it before.
Test Thoroughly Before You Launch
This is the step most people rush through, and it is the step that matters most. Before a single employee sees this bot, you need to test it with every question you can think of, including the ones designed to break it.
Here is my testing checklist:
Accuracy tests: Ask every common question and verify the answer matches your actual policy. "How many PTO days do I get?" "What is the deadline for open enrollment?" "How do I request parental leave?" Check every number, every date, every process step.
Boundary tests: Ask questions the bot should NOT answer. "What is Sarah's salary?" "Am I going to get fired?" "Can I sue the company for this?" The bot should gracefully redirect to a human every time.
Edge case tests: Ask ambiguous questions. "What happens to my PTO if I leave?" "Do contractors get benefits?" "My manager is making me work on a holiday." These are the questions that reveal whether your knowledge base has gaps.
Tone tests: Ask the same question in different ways. Formally. Casually. Frustrated. The bot should maintain a consistent, warm, helpful tone regardless of how the question is asked.
The most frequent problem I see in testing is the bot confidently answering questions that are NOT in the knowledge base by inferring or guessing. If this happens, make the "I don't have that information" instruction in your system prompt more explicit. You can also add: "Before answering, verify that the specific information is explicitly stated in the knowledge base. If you are inferring or guessing, redirect to a human instead."
Roll It Out Thoughtfully
Do not just flip the switch and announce it to the whole company. Roll it out in phases so you can catch issues early.
Week 1: Internal testing. Your HR team uses it exclusively. Everyone on the team tries to break it. Document every wrong answer and fix the knowledge base or system prompt accordingly.
Week 2: Beta group. Invite 10 to 15 employees from different teams to try the bot. Ask them to report anything that seems off. These should be people who are comfortable giving honest feedback.
Week 3: Company launch. Send a warm, clear announcement. Here is what to include:
- What the bot can help with (be specific: PTO, benefits, policies, holidays)
- What it cannot help with (be specific: personal situations, legal questions, sensitive matters)
- How to use it (DM the bot, or mention it in a channel)
- That it is powered by AI and answers come from your company's actual policies
- That HR is still always available for anything the bot cannot handle
Be transparent that this is an AI tool. Employees appreciate honesty about what they are interacting with, and it sets the right expectations about the bot's limitations.
Keeping It Running
A FAQ bot is not a "set it and forget it" tool. Policies change. Benefits update. New questions come up that you did not anticipate. Here is a simple maintenance routine:
Monthly: Review the questions the bot received. Are there new patterns? Questions it could not answer? Topics you need to add to the knowledge base?
Quarterly: Review and update the entire knowledge base. Make sure every policy, date, and process is still current. This is also a good time to review the system prompt and refine the tone or rules based on what you have observed.
On every policy change: Update the knowledge base immediately. If you change your PTO policy on April 1, the bot's knowledge base should be updated on April 1. Not April 15. Not "when we get around to it."
What This Costs
Let me give you realistic numbers so you can make the business case.
Claude API costs: For a company of 200 employees, expect to spend roughly $20 to $50 per month on API calls. Each question-and-answer exchange costs a fraction of a cent. Even heavy usage will not break the bank.
Slack: If you already have Slack, there is no additional cost. The bot uses Slack's free API tier for most use cases.
Hosting: A small server to run the bot costs $5 to $20 per month on any cloud provider. Your developer can also run it as a serverless function for even less.
Developer time: Initial setup is 4 to 8 hours. Ongoing maintenance is about 1 hour per month.
Your time: Building the knowledge base takes 3 to 5 hours upfront. Testing takes 2 to 3 hours. Maintenance is about 1 to 2 hours per month.
Compare that to the 5 or more hours per week you currently spend answering repetitive questions. The bot pays for itself within the first month.
What the Bot Should Never Replace
I want to end with something important. A FAQ bot is fantastic for routine questions with clear, documented answers. It is not a replacement for the human side of HR.
When an employee is going through a difficult personal situation, they need a person. When someone has a concern about their manager, they need a person. When a team is struggling and morale is low, they need a person. The entire point of building this bot is to free up your time so you can show up more fully for the moments that actually require a human being.
Build the bot. Save the time. Then reinvest those hours into the work that only you can do.
← Back to all articles