Web Application · 2026 · Sole engineer — architecture, backend, AI layer, Flutter APIs, admin UI

AI-Assisted HRM Platform

AI Feature

An HR platform for Qatar operations teams, with an AI layer that drafts policies, answers workforce questions, and structures employee records — cutting routine HR paperwork from multi-step manual entry to a guided, reviewable flow.

  • Laravel
  • MySQL
  • REST APIs
  • Flutter (mobile clients)
  • Queued jobs
  • Bootstrap/admin UI
  • OpenAI GPT-4o
  • Structured outputs
  • RAG over policy docs
  • Queued AI jobs
  • Prompt versioning

The problem

Before the AI layer, HR staff spent hours every week answering the same policy questions, re-keying employee documents into forms, and chasing incomplete records across email and spreadsheets. Mistakes in leave balances, contract fields, and onboarding checklists were common because validation lived in people, not in the system.

Approach

I kept Laravel as the system of record and added an AI assistance layer as a queued, reviewable service — not an autonomous agent. Calls go through structured prompts with JSON/schema-constrained outputs for fields the UI can validate before write. RAG over approved policy documents answers “what is our leave rule?” without inventing company policy. I deliberately did not let the model write payroll or mutate balances directly: those paths stay deterministic Laravel code with human confirmation.

Engineering notes

Hallucination / validation: model output is never trusted as truth. Structured outputs are schema-checked in PHP; free-text answers are grounded with retrieval from approved policy docs and shown as “suggested” until an HR user accepts. Required fields that fail validation never auto-save.

Cost & latency: AI work runs on queued jobs (not request-blocking). Short prompts, cached embeddings/policy chunks where useful, and hard caps on tokens per job. The UI stays responsive; staff see “generating…” then a review card.

Messy input: uploads and mixed-language notes are normalized before prompting (strip noise, keep language tags). When OCR/text quality is poor, the system falls back to manual form entry instead of forcing a bad parse.

Rate limits & failures: retries with backoff on provider errors; circuit-break to a non-AI path so HRM stays usable if the model API is down. Failures are logged with prompt version + job id for replay.

Evaluation: spot-check accepted vs rejected suggestions; prompt versions are stored so we can compare quality after changes instead of editing prompts in the dark.

Outcome

In daily use by HR, Employees, Finance, Department managers, CEO stakeholders, and payroll assistants across multi-company operations in Qatar. The platform covers the full employee lifecycle — profiles and documents (QID, passport, contracts), org structure (companies, departments, sections, positions, org charts), onboarding documents, employment contract templates, terminations, and rehire. Operational workflows include leave requests and leave settlements, attendance dashboards and analytics/graphs, biometric sync, duty schedules (employee/department/company/temporary), timetables, shifts, attendance rules, pay codes, overtime requests/approvals and overtime reporting, manual punch logs, and public holidays. People and performance processes cover appraisals (categories, requests, logs), warnings, disciplinary actions, rewards, and appreciations. Finance and payroll run through advance salary, loans and loan clearances, reimbursements, procurement and payment requests, payroll generation, payslips, bank/cash/other WPS, EOSB settlements, salary groups and formula calculations, plus finance employee/management/internal modules. Governance is handled with role-based permissions, multi-level approvals, approval logs, completed-request history, reports, notifications, FAQs/policy content, and mobile/API self-service — with AI suggestions, where used, always requiring staff review before anything is saved to the database.
WhatsApp