AI in HR: Where It Helps, What It Must Never Decide
AI in HR should draft, explain payslips, answer HR chatbot questions and flag payroll anomalies. It must never decide pay, leave, approvals or statutory figures.
AI in HR is the use of language models and machine learning in human resources work: drafting letters, answering employee policy questions through an HR chatbot, explaining payslips, and flagging payroll anomalies for review. Most guides stop at that list. What they skip is the question an HR team has to answer before switching anything on: once a model is in the loop, who owns the decision?
We build and run LekhaHR, Paiteq's HR and payroll software for small Indian businesses, so we've had to write our answer down as an engineering rule. This post is that rule, explained for HR teams buying AI and for the engineers building it.
Where AI in HR actually helps
AI for HR earns its keep wherever the output is something a person reads before anything changes. We see four jobs where it pays off.
Drafting
Offer letters, appointment letters, job posts, the note announcing a new leave policy, a first pass at a review summary. A model turns a few bullet points into a readable draft in seconds. The HR person edits it and sends it. If the draft is wrong, the cost is a minute of editing, which is the kind of mistake you want.
Explaining
Payslips confuse people. Why is this month's take-home lower? Why did the PF deduction change? A model can turn payslip lines into plain sentences, such as: "You had two days of loss of pay because those days had no punch and no approved leave." That explanation is only safe when every number in it comes from the payroll record. The model describes the figure; it doesn't produce it.
Answering policy questions
How many casual leaves do I have left? Can I carry earned leave forward? What's my notice period? An HR chatbot that reads the published policy and the person's own records can answer most of these at 11 pm on a Sunday, which is when people tend to ask them.
Spotting anomalies
Some payroll checks should stay plain rules: two employees sharing one bank account, or a joiner paid for days before their start date. A model earns its place on the fuzzier ones, such as noticing that one person's net pay jumped, tracing it to arrears added mid-month, and writing that up for the approver. It raises the flag. A person decides what the flag means.
In every one of these jobs the AI produces words or a flag, and a person or a fixed rule produces the decision. That's the whole design, and the rest of this post is about keeping it that way.
The line: what AI must never decide
AI in HR is advisory: it can draft, explain, answer and flag, but it never owns pay, leave or attendance status, approvals, statutory figures or money.
The reasons differ by job and apply to AI in human resources well beyond payroll.
| HR job | AI's role | Who owns the outcome | Why |
|---|---|---|---|
| Salary and payroll figures | Explain lines, flag odd ones | Payroll rules, then a second approver | Same inputs must give the same figure, and anyone must be able to recompute it |
| PF, ESI, PT and TDS | Explain what was deducted and why | Statutory rules with effective dates | A plausible but wrong figure is a compliance problem, not a typo |
| Leave balance and status | Answer "how many do I have?" from the ledger | The leave ledger and the approver | A balance is a record of past events, never an estimate |
| Attendance status | Explain why a day shows as absent | Punch records, regularisation and the monthly lock | Attendance feeds pay, so it carries pay's rules |
| Approvals | Summarise the request for the approver | The named approver | Accountability needs a person's name on the decision |
| Salary payouts and dues | None | The employer, outside the HR tool | Moving money is the one step you can't take back |
| Hiring and exits | Draft job posts, summarise applications for a reviewer | The hiring manager and HR | These calls carry legal weight and bias risk |
None of the reasons in that last column is "models aren't good enough yet". A smarter model doesn't fix any of them, because they're about who answers for the outcome when an employee, an auditor or a labour inspector asks.
AI payroll: why the figures stay rule-based
AI should not calculate payroll. It can explain a run and check it, but the figures have to come from rules, for three reasons.
It has to be reproducible. Run the same month twice with the same attendance and the same salary structure, and you must get the same payslip to the paisa. A language model samples its output. Even with every setting turned down, you're relying on behaviour rather than a guarantee, and "usually the same" isn't a property you can sign a payslip on.
It has to be explainable later. When an employee disputes a deduction in March about something in November, someone has to show which rule applied, from which date, to which inputs. A model can read that trail out loud. It can't be the trail.
The rules change on dates. Wage ceilings move (the EPF wage ceiling rose from ₹15,000 to ₹25,000 on 17 September 2026, in the middle of a pay month), professional tax slabs differ by state, income tax has two regimes, and India's Labour Codes changed how wages are defined. A rule engine stores each setting with an effective date, so October's payslip uses October's rules even if you run it in December. A model prompted last quarter has no reliable way to know which version applies to which month.
So the split is clean: the rules compute, and the AI explains what they computed. That's also what makes AI payroll help safe to switch on, because nothing the model says can move a number.
| AI may | AI must not | |
|---|---|---|
| Payslip lines | Explain each line in plain language | Calculate gross pay, net pay, PF, ESI, PT or TDS |
| An unusual figure | Point it out against last month | Change it because it looks wrong |
| Attendance | Explain why a day shows as absent | Mark a day present or absent |
| Leave | Answer balance questions from the ledger | Approve or reject a request |
| Salary payouts | Draft the note to employees | Prepare or release a transfer |
| Someone else's pay | Nothing | Answer any question about it |
HR chatbots: answer the question, never make the call
An HR chatbot answers employees' leave, policy and payslip questions from the published policy and their own records, then hands decisions to a named approver. It's where most teams start, and where scope creep bites first. Someone types "can I take Friday off?" The honest answer isn't yes or no. It's closer to: "You have three casual leaves left, Friday isn't a holiday, and your manager approves leave. Want me to start the request?"
That answer works because the bot stays inside four rules:
- It answers from the published policy, in the version the person is allowed to see, and names the document it used.
- For "why" questions it reads only the asker's own records. It never reads or reveals another employee's pay or leave.
- It says it can be wrong, and points to the person who can confirm.
- It starts requests; it doesn't decide them. The leave request goes to the approver like any other request.
Test the bot on what it refuses as well as what it answers. A policy assistant that confidently tells a new joiner the wrong notice period is worse than no assistant at all. Our guide to LLM evaluation frameworks covers how to build that test set; for HR, we'd make about half the cases questions the bot must hand off.
Much of what we wrote in the customer service chatbot buyer's guide applies to an internal HR helpdesk too, with one difference: your users are also the people whose records the bot can see. If you're scoping a policy chatbot for your HR team, settle the record-access rules before you pick a model.
Anomalies: flag them, don't fix them
Anomaly review is the AI payroll job we'd switch on first. Before a run is approved, a reviewer is scrolling through hundreds of lines. Plain rules catch the hard errors; a model can rank the rest and say why a line deserves a second look.
Good flags are specific: "Net pay for this employee is a third higher than last month; the change comes from arrears added on 12 November." Bad flags are vague ("this looks unusual") or, far worse, silent corrections.
The rule for flags is short. A flag never edits the figure. It goes to the second approver with the evidence attached, and the approver either accepts the run or sends it back so someone fixes the input. If the AI quietly fixes a number, you now have a payroll figure with no rule behind it, which is exactly what you set out to prevent.
How we draw the line in LekhaHR
LekhaHR is HR and payroll software for small Indian businesses: attendance, leave and payroll with PF, ESI, PT and TDS in one tool. We're building AI into it, and the rule in this post is written into the engineering rules the product is built under: AI is advisory, and it isn't allowed to own authorisation, attendance or leave status, approval routing, statutory calculations or money.
The product was designed so that no AI ever has to be trusted with the numbers:
- Every payroll figure, leave balance and attendance status shows the rule and the date behind it. An assistant can read that trail; it never has to invent one.
- Statutory settings carry effective dates, so each month's figures come from that month's rules.
- Payroll has a second approver before a run is final.
- LekhaHR works out the payroll figures and prepares the bank-transfer sheet. The employer or their accountant files the returns and pays the dues, so the software never moves money.
Whatever AI we add will work inside those walls: explaining a payslip line from the record, answering a policy question with a citation, drafting a letter, flagging a line for the approver. It won't approve, mark, calculate or pay.
We drew the same line for venue maps in floor plan to seating chart: the model proposes, deterministic software decides what's valid, and a person approves what goes live. Different domain, same split.
If you're building AI into HR software
For engineering teams putting AI in HR software, the advisory rule is far easier to keep when the code can't break it. A prompt that says "don't approve leave" is a request to the model. A permission check that refuses an approval from an AI actor is a rule. The second one is the one to build, and three habits help.
- Give the AI its own actor. Every AI call runs as a distinct actor with read access only to the records the task needs, so the audit log shows what the model saw.
- Make its output types advisory. The model can return a draft, an explanation, an answer or a flag. None of those types can change a record. Only a person's action can.
- Enforce it on the server. Decisions are a separate set of actions, and the authorisation layer refuses them for any AI actor, whatever the prompt said.
Here's an illustrative version; the shape holds in any language:
// The AI can only return advisory output. None of these types mutates a record.
type SourceRef = { doc: string; version: string; recordId?: string };
type Advisory =
| { kind: "draft"; text: string }
| { kind: "explanation"; text: string; sources: SourceRef[] }
| { kind: "answer"; text: string; sources: SourceRef[]; mayBeWrong: true }
| { kind: "flag"; recordId: string; reason: string; evidence: SourceRef[] };
type Actor = { id: string; type: "person" | "ai" };
// Decisions are separate actions, checked on the server for every caller.
const DECISIONS = new Set([
"leave.approve",
"leave.reject",
"attendance.setStatus",
"payroll.editFigure",
"payroll.finalize",
"payout.prepare",
]);
export function authorize(actor: Actor, action: string): void {
if (actor.type === "ai" && DECISIONS.has(action)) {
throw new Error(`${actor.id} is advisory and cannot run ${action}`);
}
// ...normal role and scope checks for people continue here
} The guard doesn't depend on the model behaving. A prompt injection, a confused model and a badly written tool description all end at the same `authorize` call. Flags land in the approver's queue as evidence, never as edits.
If you'd rather not build this yourself, any AI automation agency you talk to should be able to draw it for you before writing code: which calls the model can make, and where the human approval sits. If they can't, the approval step is probably missing.
Questions to ask before you buy AI HR software
AI HR tools tend to demo well. These questions get past the demo.
| Ask the vendor | Good answer | Red flag |
|---|---|---|
| Can the AI change a payroll figure? | No. It explains and flags; rules compute and a person approves. | It auto-corrects errors it finds. |
| Where does a policy answer come from? | The published policy, with document and version shown. | The model's general knowledge. |
| Can an employee ask about a colleague's pay? | No. The assistant reads only the asker's own records. | It depends on how the question is phrased. |
| Who approves leave once AI is switched on? | The same named approver as before. | Auto-approval when the AI is confident. |
| Can you show why a figure is what it is? | The rule, the inputs and the effective date for each line. | "The system calculated it." |
| What does the audit log record for AI actions? | What the AI read, and which person acted on its output. | Nothing separate from user actions. |
How do you use AI in the HR process?
Start with work a person reads before anything changes: drafts, payslip explanations, policy answers and payroll flags. Connect the assistant only to the published policy and the asker's own records. Keep pay, leave and approvals with rules and named approvers, and test what the assistant refuses before you launch it.
Can HR be replaced with AI?
No. AI can take over a lot of drafting and repeat questions, but decisions about people (hiring, pay, leave, exits) need a named person who is accountable for them. The realistic goal is fewer hours spent on routine answers, with the same people making the calls.
Can AI run payroll?
AI shouldn't calculate payroll. Payroll figures have to be reproducible and traceable to a rule and a date, and a language model can't guarantee either. AI is useful around payroll: explaining payslip lines, checking a run for anomalies before approval, and drafting messages to employees.
What should an HR chatbot never do?
It shouldn't approve or reject requests, change attendance or leave records, or answer questions about another employee's pay or leave. It should answer from the published policy, show its source, say it can be wrong, and hand decisions to the right approver.
How do you test an HR chatbot before launch?
Build a test set from real employee questions, including ones the bot must refuse or hand off. Check every answer against the current policy version, and re-run the set whenever a policy changes. A bot that answers fewer questions correctly beats one that answers more with a few confident mistakes.
How does LekhaHR approach AI?
Paiteq's team is building AI into LekhaHR under the rule in this article: AI is advisory and never owns approvals, attendance or leave status, statutory calculations or money. Today every payroll figure, leave balance and attendance status in LekhaHR already shows the rule and date behind it, which is what any assistant will read from.
Put AI into your HR workflows without handing it the decisions.
We design workflows where models draft and flag while rules and named approvers keep pay, leave and approvals. We build and run HR and payroll software ourselves, so we know where the line sits.