Answer HR policy questions through AI chat

Workflow purpose

This guide demonstrates how to use Proto's AI agent to answer the HR questions staff ask every day – how much notice to give, what the sick leave rules are, when the probation period ends – straight from your own HR handbook, so HR teams spend less time repeating the same answers.

The workflow answers policy questions only from the handbook, cites the section it used and says when it isn't sure. Personal questions, such as a leave balance or a payslip, are answered from your HR system only after the staff member has been verified. Sensitive matters – grievances, harassment, health and anything a person wants kept confidential – are never answered by the AI agent: they go straight to a confidential HR live agent, or to a ticket when HR is offline.

A policy answer is only as good as the handbook behind it, so the guide also covers who owns the handbook and how to keep the AI agent's copy current.

Who can benefit from this guide:

  • HR teams in ministries, agencies and public bodies
  • Banks and digital finance providers with large branch networks
  • Telecom operators with shop, call centre and field staff
  • Hospitals and health services with shift-based staff
  • Shared service centres handling HR enquiries for several organisations

HR policy questions

This workflow answers HR policy questions from your handbook and routes personal and sensitive questions safely 24/7. See how to build an HR policy workflow.

Just starting with the platform?
For initial setup of your AI agent – including workspace setup, agent training, and channel deployment – please start here. This workflow guide assumes your AI agent is set up and ready for more advanced configurations.

1. Create a trigger

Start the flow when a staff member asks about an HR policy, their leave or their pay.

  • Navigate to the Workflows tab in the AI agent settings.
  • Click New workflow and select Message received as the Workflow type.
  • Name the trigger (e.g. “HR Policy Question”) and add a short description (e.g. “Triggers if user asks about HR policy, leave, sick leave, working hours, benefits, pay, probation, notice periods, conduct, or raises a workplace concern.”).
  • Add training phrases (e.g. “How many days of annual leave do I get?”, “What’s the policy on working from home?”, “How much is my leave balance?”, “Can I get my last payslip?”, “I want to report my manager”).

Requests to book leave belong in a separate leave request workflow, if you have one – add “booking or applying for leave” to this trigger’s description as something it should not match.

2. Load the HR handbook

The AI agent can only be as accurate as the handbook you give it.

Open the AI agent’s Knowledge tab › Knowledge base:

  • Upload file for the handbook as a PDF, one file per policy if your handbook is split that way.
  • Or Add URL to the HR pages on your intranet, choosing all pages under the HR section and using Excluded pages for drafts, archived policies and pages meant only for HR staff.

Check that Large language model is on under Personalization on the Agent tab, and add to the Agent persona: “You answer staff HR questions only from the HR handbook. You never give legal advice, never guess and never comment on a person’s individual case.”

Deploy the AI agent on your signed-in intranet Webchat where you can. Staff are already identified there, which Step 5 relies on.

3. Route sensitive topics first

Some subjects must reach a person without the AI agent saying anything about them.

Add an LLM Processing action as the first action in the workflow:

  • Input: {_user_input}
  • Model: your preferred model
  • Temperature: 0
  • System prompt: “Classify a message sent to an HR service. Reply only with JSON: {"type": "sensitive" | "personal" | "policy"}. Use sensitive for grievances, harassment, bullying, discrimination, whistleblowing, disciplinary matters, physical or mental health, pregnancy, family or domestic problems, or anything the person says is confidential. Use personal for questions about their own leave balance, pay, payslip, contract or benefits. Use policy for general questions about rules. If you are unsure whether a message is sensitive, reply sensitive.”
  • Resulting variable: route

Add a Set variable action – Variable: route, Chat script: _.json_parse(route) – then a Branch action:

Condition What happens
route["type"] == "policy" Continue to Step 4
route["type"] == "personal" Jump to Step 5
Else Jump to Step 7 – no AI answer, no policy summary, no follow-up questions

The Else branch also catches a reply that couldn’t be read, so the safe default is always a person.

4. Answer policy questions from the handbook

Give a short answer, show where it came from and admit uncertainty.

Add an LLM Processing action:

  • Input: {_user_input}
  • Model: your preferred model
  • Temperature: 0
  • System prompt: “Answer the staff member’s question using only the HR handbook in the knowledge provided. Reply in three sentences or fewer, then on a new line write ‘Source:’ followed by the policy name and section number. If the handbook doesn’t answer the question, or different sections seem to disagree, reply only with UNSURE. Never use general knowledge or the law of any country.”
  • Use Knowledge info to provide more context: on
  • Resulting variable: hr_answer

Add a Branch. If hr_answer == "UNSURE", send:

“I couldn’t find a clear answer in the HR handbook. I can pass your question to the HR team.”

with quick replies Ask HR | No, thanks, where Ask HR leads to Step 8. Under Else, add a Send message with {hr_answer} and the quick replies That answers it | Ask HR.

Policies often differ by grade, location or contract type. Add to the system prompt: “If the answer depends on grade, location or contract type, give each version and ask the person to check which applies to them.”

5. Verify the staff member

Confirm who is asking before any personal record is read.

On signed-in intranet Webchat, the staff member’s work email is already known. Add a Branch: if {_customer.email} is set, add a Send API action:

  • HTTP method: GET
  • URL endpoint: your HR system’s staff lookup endpoint, passing {_customer.email}
  • Headers: the authorisation key your system requires
  • Resulting variable: staff

Under Else – any channel where the person isn’t signed in – add an Ask survey action. Action title: Staff verification

Field Variable Type Invalid reply
Staff ID staff_id Text Please enter the staff ID on your ID badge or payslip
Date of birth (DD/MM/YYYY) date_of_birth Text Please enter your date of birth as DD/MM/YYYY

Send both to your HR system’s verification endpoint with a Send API POST, using the same resulting variable staff. Count failed attempts with a Set variable action and, after two, offer the HR team’s contact details instead. Under Error and Timed out, do the same – never show personal data you couldn’t verify.

6. Answer personal questions from the HR system

Leave balances and payslips come from your HR system, never from the handbook or the model.

Add a Send message with quick replies: My leave balance | My latest payslip | My contract details.

  • Under My leave balance, add a Send API action (HTTP method: GET) to your HR system’s leave endpoint, passing {staff["id"]}, with the resulting variable leave. Then a Send message: “You have {leave[“annual_remaining”]} days of annual leave and {leave[“sick_remaining”]} days of sick leave left this year. Balances are correct as of {leave[“as_of”]}.“
  • Under My latest payslip, add a Branch so payslips are only sent on signed-in Webchat, where {_customer.email} is set. Add a Send API action to your payroll endpoint, then a Send attachment action – File format: Document, Source: Chat script, e.g. payslip["url"]. Use a short-lived link from your payroll system. On other channels, tell the person to download it from the staff portal.
  • Under My contract details, return only the fields staff can already see in your staff portal – job title, grade, start date, contract end date.

If a balance looks wrong, offer Ask HR, which leads to Step 8 with the balance included in the ticket.

7. Hand sensitive matters to a confidential HR live agent

The AI agent connects the person and says nothing else about the subject.

Add a Send message action:

“Thank you for reaching out. I’m connecting you to a member of the HR team in confidence. They’ll be able to help.”

Add a Live agent handoff action assigned to a confidential HR team made up only of the people who handle these cases, with Live agent availability check on.

Under If there is no live agent online, add a Send message: “The confidential HR team isn’t available right now. Would you like them to contact you?” with quick replies Yes, contact me | No, I’ll come back later. Under Yes, contact me, add a Create ticket assigned to the same team, with the subject Confidential HR request, the Full name and Email from Step 5 where known, and the tag confidential – leave the description empty so the details aren’t copied into the ticket. If the person mentions being in danger, add your employee assistance or emergency number to the message.

8. Create a ticket when HR is offline

Questions the handbook can’t answer still get an answer.

Under Ask HR, add a Live agent handoff to your general HR team with Live agent availability check on. Under If there is no live agent online, add a Create ticket action:

  • Assignee: your HR team
  • Subject: HR question – {staff[“id”]}
  • Description: the question and the AI agent’s last answer
  • Full name and Email: from the verified record, or ask for them with an Ask survey action if the person wasn’t verified
  • Auto-apply tags: hr-question

Then add a Send message: “Your question has been sent to HR – your reference is {_new_ticket.short_id}. They’ll reply by email.” HR replies from the ticket in the Inbox, and the teamspace’s overdue rule under Settings › Tickets › Overdue rules applies to every ticket.

9. Keep the handbook current

An outdated policy answered confidently is worse than no answer.

Name one person in HR as the owner of the AI agent’s handbook. Whenever a policy changes, they delete the old file from the Knowledge base and upload the new one on the day it takes effect – or, for intranet pages added with Add URL, remove the URL and add it again so the new version is read. Review the tickets tagged hr-question each month: questions that keep coming back show where the handbook is unclear or missing a section.

10. Test the flow

Validate every path before going live using the AI agent tester side panel.

  • Ask “How many days’ notice do I need to give?” and check the answer cites the right handbook section.
  • Ask something the handbook doesn’t cover and confirm the AI agent says it’s unsure and offers HR.
  • Send “I want to report harassment by my manager” and confirm the handoff happens with no AI answer about the policy.
  • Ask for a payslip without signing in and confirm no document is sent.
  • Build and test in an undeployed version – Duplicate the live version on the Workflows tab – then Deploy when every path passes.

Finalise the AI agent deployment by configuring your preferred channels and languages.