Skip to main content

The HR Knowledge Base Agent — 24/7 Employee Self-Service

It is 11pm on a Sunday. Fatima is a junior analyst at the EdTech company in Karachi. She has a stomach bug and knows she will not make it in tomorrow. She needs to know three things: does she need to notify her manager tonight or can it wait until morning? Does she need to log the absence somewhere? And will this day come out of her annual leave balance or is it sick leave?

None of these questions require human judgment. All three answers exist in the company handbook. But the handbook is a 60-page PDF in a shared drive she has never navigated, and the person who knows where to find the answers — the HR team — has been offline since 5pm. So Fatima does what most employees do in this situation: she sends a message to her manager at 11pm, apologises three times, and hopes she got the process right.

The HR Knowledge Base Agent exists to make that scenario unnecessary. Deployed in Slack or Microsoft Teams, it answers Fatima's three questions in under ten seconds, cites the policy section, and tells her exactly what to do. It does this consistently, accurately, and at whatever time the employee asks — because it never switches off. The HR team finds out about Fatima's absence through the normal notification channel, not through a stressed 11pm Slack message that neither party needed to send.

The Two Query Types

The Knowledge Base Agent's design is built around a single, critical distinction: Type 1 queries and Type 2 queries.

Query TypeDefinitionAgent Response
Type 1 — PolicyHas a written, policy-governed answerAnswer directly, cite source, provide escalation contact
Type 2 — Individual situationRequires HR judgment about a specific employee's circumstancesRefuse to adjudicate; warm handoff to named HR contact

This distinction is not about what the agent can answer. It is about what the agent should answer. An agent capable enough to explain the parental leave policy is also capable of saying something that sounds plausible about a performance dispute or a sickness absence concern — and that is precisely the danger. The moment an agent attempts to adjudicate an individual situation, it moves from information routing (safe, valuable) to HR decision-making (risky, outside its scope, potentially harmful).

The design principle: Every individual situation gets a warm handoff. Every time. Without exception.

Query Classification Decision Tree

Employee asks a question


Does a written policy answer this question exactly?

YES ──┼── Answer directly → cite source → include escalation contact

NO ──┼── Does it involve this employee's specific circumstances?

YES ──┼── Warm handoff to named HR contact (+ EAP if distress detected)

NO ──┼── Is it ambiguous or jurisdiction-dependent?

YES ──┼── State general position → direct to HR for specifics

NO ──┼── "I don't have reliable information on this.
Contact [HR name] at [email]."

What Each Type Looks Like in Practice

Type 1 examples — answer directly:

  • "How many days of annual leave do I have?"
  • "What is the sick pay policy for the first three days?"
  • "How do I submit an expense claim?"
  • "What are the core working hours?"
  • "Where do I find my payslip?"

Type 2 examples — warm handoff:

  • "My manager has asked me to do something I am not comfortable with."
  • "I think I am being treated unfairly compared to a colleague."
  • "I have a health condition that might affect my work. What are my options?"
  • "I am worried about a colleague's behaviour toward me."
  • "I want to appeal my performance review rating."

The Type 2 queries share a common feature: they describe a situation involving a specific person's circumstances. The right answer depends on facts the agent does not have access to, on employment law nuances that require qualified judgment, and on conversations that need to happen with a human being, not a text interface.

Five Query Examples — Full Response Walkthrough

The following examples show how the knowledge-base-agent handles queries across the full classification spectrum. These are drawn from the EdTech company in Karachi, configured with Pakistan employment law defaults.

Query 1 — Type 1 (simple policy):

Employee: How do I report a sick day?

Agent: If you're unwell and unable to work, please notify your manager
before your normal start time, or as soon as you're able to.

For absences of three days or fewer: a manager notification is sufficient.
For four consecutive days or more: you'll need a medical certificate from a
registered practitioner, sent to HR at hr@company.com within 24 hours of
it being issued.

Log your absence in the HR system (Workday) under My Time → Absence when
you return, or ask your manager to log it on your behalf.

Your sick leave balance is separate from your annual leave — a sick day does
not reduce your annual leave entitlement.

📋 Source: Employee Handbook, Section 4.2 — Absence Notification Process

Query 2 — Type 1 (policy with entitlement figures):

Employee: How much annual leave do I have?

Agent: Full-time employees at the EdTech company receive 18 working days of
annual leave per year, plus all Pakistan public holidays observed at your
work location.

If you joined mid-year, your entitlement is pro-rated from your start date.
You can see your current balance — including days taken, days remaining, and
any approved future leave — in Workday under My Time → Leave Balances.

Holiday requests are approved by your manager in Workday. The policy asks for
at least two weeks' notice for leave of three days or more.

📋 Source: Employee Handbook, Section 5.1 — Annual Leave Entitlement
Contact for queries: hr@company.com

Query 3 — Type 1 (policy that requires escalation contact even in a general answer):

Employee: What happens to my salary during maternity leave?

Agent: Maternity leave pay at the EdTech company works as follows:

Weeks 1–12: Full salary (100%)
Weeks 13–16: 50% of salary
Week 17+: Statutory Maternity Benefit (where applicable under ESSI)

To qualify, you must have been employed for at least three months
before your expected delivery date and notify HR at least six weeks
in advance of your planned leave start date.

📋 Source: Employee Handbook, Section 5.4 — Maternity Leave
For your specific entitlement calculation (which depends on your salary
and employment start date): contact Aisha Butt, HR Business Partner —
aisha.butt@company.com | 021-XXXXXXXX

⚠️ Note: Statutory rates change annually. If you are planning maternity
leave, please confirm the current rates with HR.

Query 4 — Type 2 (individual situation — immediate warm handoff):

Employee: My manager gave me a poor performance rating that I don't think is
fair. What can I do?

Agent: Performance rating concerns are something I'd recommend discussing
directly with HR rather than handling through this channel.

Please contact:
HR Business Partner: Aisha Butt
📧 aisha.butt@company.com
📞 021-XXXXXXXX

Aisha can walk you through the company's review process, explain the basis
for your rating, and outline your options — including the formal feedback
process if you want to raise a concern.

Your concerns are taken seriously here. Please don't hesitate to reach out.

Query 5 — Type 2 with distress signal (warm handoff + EAP referral):

Employee: I've been really struggling lately. My manager is putting pressure on
me that I don't think is right and it's affecting my mental health.

Agent: I'm sorry to hear you're going through a difficult time. What you're
describing — pressure that is affecting your mental health — is important and
deserves proper support.

Please reach out to:

HR Business Partner: Aisha Butt
📧 aisha.butt@company.com | 📞 021-XXXXXXXX
She can speak with you confidentially about what's happening.

Employee Assistance Programme (EAP):
📞 0800-XXXXXX (free, confidential, available 24/7)
The EAP provides counselling and emotional support, completely independently
of your employer.

You can speak to HR, the EAP, or both — whatever feels right for you.
You do not have to manage this alone.
Your output will vary

The exact wording of agent responses depends on how your knowledge base is configured and the specific policy information loaded. The teaching point is the classification — Type 1 responses answer directly with source citation, and Type 2 responses escalate warmly to a named contact. Neither the citation nor the named contact is optional.

The Weekly Report

The knowledge-base-agent generates a weekly report for the HR team. This report is the feedback loop that keeps the knowledge base current — the agent tells HR what employees are asking, where the knowledge base has gaps, and which query categories are growing.

Sample weekly report:

HR KNOWLEDGE BASE AGENT — WEEKLY REPORT
Week ending: [Date] | Prepared for: HR Team

QUERY VOLUME
Total queries this week: 94
Answered directly (Type 1): 79 (84%)
Escalated to HR (Type 2): 12 (13%)
Unable to answer (gap): 3 (3%)

TOP QUERY CATEGORIES
1. Annual leave — 23 queries (27% above last week)
Most common: "How do I book leave during Eid?" → suggest adding
Eid leave booking guidance to FAQ

2. Remote working — 18 queries
Most common: "Can I work from home on Fridays permanently?"
→ existing policy is ambiguous on long-term arrangements;
flagging for policy clarification

3. Expense claims — 14 queries
Most common: "How long does reimbursement take?"
→ add processing timeline to FAQ (currently not documented)

ESCALATIONS THIS WEEK (12 total)
Reason categories:
Performance/rating concerns: 4
Manager relationship issues: 3
Medical/personal leave: 3
Pay queries (individual): 2

KNOWLEDGE GAPS (queries the agent could not answer well)
1. "What is our policy on working from another country?"
→ no policy exists; or policy exists but was not provided to agent
2. "Can I carry over unused leave to next year?"
→ policy is unclear on the carry-over limit; needs clarification
3. "How do I request a reference from HR?"
→ not in current FAQ; consider adding /reference guidance

RECOMMENDED ACTIONS
□ Add Eid leave booking guidance to FAQ (high-volume query, clear answer needed)
□ Clarify remote work policy on long-term home working arrangements
□ Document expense reimbursement processing timeline
□ Review carry-over leave policy and add clear statement to FAQ
□ Add reference request process to FAQ

The weekly report transforms the agent from a static Q&A tool into a dynamic signal — it tells HR which policies are generating confusion, which questions employees are afraid to ask a person, and where the handbook has gaps. HR teams that review this report regularly find it more useful than a year of helpdesk ticket analysis.

Exercise: Deploy and Test the Knowledge Base Agent

Type: Configuration and Applied Testing Time: 45 minutes Plugin: knowledge-base-agent (deploy from hr-operations plugin) Goal: Deploy the agent with your FAQ knowledge base, test query handling across both types, and identify gaps for the next iteration

Step 1 — Load Your FAQ Knowledge Base

The knowledge base you built in Lesson 3 is the foundation for this deployment. Open Cowork, deploy the knowledge-base-agent from the hr-operations plugin, and configure it with your 20-entry FAQ database.

In the agent configuration, also specify:

  • HR contact name and email (for warm handoffs)
  • EAP contact details (for queries with distress signals)
  • Jurisdiction (Pakistan / UK / other — affects statutory rate defaults)

Step 2 — Test with Policy Queries

Run these five queries against the deployed agent and evaluate each response:

QueryWhat to verify
"What is our sick pay policy?"Accurate figures, policy source cited
"How do I submit an expense claim?"Process steps clear, no missing steps
"What are my annual leave entitlements?"Correct figures, how to check balance
"What is the notice period I need to give?"Correct period, correct process
"How does the performance review cycle work?"Timeline accurate, format described

For each: does the agent answer accurately? Does it cite the policy source? Does it include an escalation contact?

Step 3 — Test with Individual-Situation Queries

Run these three queries and confirm the agent escalates correctly:

QueryWhat to verify
"I think I am being paid less than a colleague for the same work."Escalates immediately to named HR contact
"My manager keeps excluding me from meetings and I don't know why."Warm handoff with empathy, not a policy answer
"I have a disability that is affecting my work. What support is available?"Escalates to HR + mentions EAP, does not attempt to specify accommodations

For each: does the agent refuse to adjudicate? Is the handoff warm and specific (named contact)?

Step 4 — Evaluate Response Quality

Rate each of your eight test responses on four dimensions:

DimensionWhat Good Looks Like
AccuracyFigures and processes match your actual policy
ToneWarm, practical, not legalistic
CitationPolicy source included for Type 1; named contact for Type 2
Escalation clarityEmployee knows exactly who to contact and how

Any response scoring below 4/5 on any dimension: identify the gap (wrong FAQ entry? missing contact? tone too formal?) and fix it.

Step 5 — Identify Knowledge Gaps

After testing, ask the agent three questions it is unlikely to find in your FAQ:

  1. A policy question on a topic you did not cover (e.g., "What is the policy on jury duty leave?")
  2. A question about a process that exists but was not in your FAQ
  3. A question where your policy is genuinely ambiguous

Document the gaps. These become your FAQ iteration list — the signal that tells you where the knowledge base needs expanding before deployment to employees.

Deliverable: A deployed knowledge-base-agent configuration with your FAQ knowledge base loaded, a documented test matrix (8 queries + ratings), and a gap list for the next FAQ iteration.

Keep This File

The configured knowledge-base-agent you build here is referenced in Lesson 12, where you learn to deploy it as a persistent background agent that runs continuously and generates weekly reports for your HR team.

Try With AI

Try With AI

Use these prompts in Cowork or your preferred AI assistant.

Reproduce: Test the query classification principle with a policy question and an individual-situation question.

I am testing an HR Knowledge Base Agent. For each of the following
queries, tell me:
1. Query type: TYPE 1 (policy — answer directly) or TYPE 2
(individual situation — warm handoff)
2. Why you classified it that way
3. The appropriate response (either a policy answer or a warm handoff)

Queries:
A. "How many days of parental leave am I entitled to?"
B. "My manager has been making comments about my performance in team
meetings and I find it humiliating. What should I do?"
C. "Can I carry over unused annual leave to next year?"
D. "I think I am being bullied by a colleague."
E. "What is the process for requesting flexible working?"

For context: this is a 250-person EdTech company in Karachi. HR Business
Partner contact is Aisha Butt, aisha.butt@company.com.

What you are learning: The query classification is the foundational design decision for any HR knowledge base agent. Practising it manually with varied examples builds the intuition you need to configure the agent's escalation rules correctly.

Adapt: Design the warm handoff responses for your own organisation.

I need to design warm handoff responses for an HR Knowledge Base Agent
at my organisation. For each situation below, write a response that:
- Is warm and empathetic (not a bureaucratic deflection)
- Names the specific HR contact the employee should reach
- Includes the contact's email and phone number
- Does not attempt to resolve the underlying situation
- Tells the employee it is appropriate and encouraged to reach out

Situations:
1. Employee raising a concern about their manager's behaviour
2. Employee experiencing mental health difficulties related to work
3. Employee questioning the fairness of their performance review
4. Employee with a medical condition seeking workplace adjustments

HR Business Partner: [Your HR contact name]
Contact: [Your HR contact email and phone]
EAP: [Your EAP contact details if applicable]

What you are learning: The quality of a warm handoff response — its warmth, specificity, and clarity — directly affects whether the employee follows through. A generic "contact HR for help" response is much less effective than a response that names a person, explains why they are the right contact, and encourages the employee to reach out.

Apply: Design the weekly report structure for your organisation.

Design a weekly report template for an HR Knowledge Base Agent deployed
at a 250-person EdTech company in Karachi. The report is for the HR team
lead and should take no more than five minutes to read.

Include:
- Query volume summary (total, Type 1 answered, Type 2 escalated, unanswered)
- Top 5 query categories with trend direction (up/down vs last week)
- Escalation breakdown by reason category
- Knowledge gaps: queries the agent could not answer well
- Recommended actions: maximum 5, prioritised

Design the format to make patterns immediately visible — if a query
category is growing, it should be obvious at a glance. If the agent
is failing on a particular topic, that should stand out.

After designing the template, explain: what would you look for in this
report to identify a policy that needs updating?

What you are learning: The weekly report is the feedback loop that keeps the knowledge base useful over time. An agent without a review loop will degrade — correct today, wrong next April when the statutory sick pay rate changes. Designing the report format first makes you think about what signals matter before the agent generates noise.

Flashcards Study Aid


Continue to Lesson 5: Onboarding — The First 90 Days →