Enterprise HR Agentic Chatbot
TL;DR
Multi-agent HR chatbot built on LangGraph + LlamaIndex with the ReAct pattern, hierarchical semantic chunking, and hybrid retrieval (Vector + Full-text + Graph + Pandas). Migrated from local POC to production AWS infrastructure with Lambda, ECS Fargate, and distributed Langfuse observability. CI/CD via AWS CDK in TypeScript.
Problem
HTI Group needed a single chatbot that could carry the weight of fragmented HR institutional knowledge — and then survive the jump from quick demo to enterprise production.
- Fragmented knowledge spread across Excel, Docs, Markdown, PowerPoint, PNG, and CSV sources.
- Off-the-shelf RAG broke down on complex policy queries that crossed multiple sub-domains: leave, payroll, benefits, tooling.
- POC-to-production was non-negotiable: the agent layer had to evolve to AWS without a rewrite.
- Observability gap: multi-agent systems fail in subtle ways that unit tests miss.
Phase 1 — Proof of Concept
High-Level System Architecture
The foundation of the HR Chatbot. This diagram details the core interaction flow between the front-end user interfaces, the centralized API gateways, and the underlying AI knowledge engines before scaling up.
Multi-Agent Router (ReAct)
The brain of the chatbot. Using the ReAct methodology, queries are intercepted, understood, and dynamically routed to specialized sub-agents. This lets the bot handle complex HR policies, leave requests, and payroll inquiries with high accuracy — and makes each sub-agent independently testable and observable.
Data Ingestion Pipeline
A robust offline pipeline that automatically ingests, chunks, and maps unstructured HR documents into a high-dimensional vector space for semantic retrieval. Uses Hierarchical Semantic Chunking with Auto Merge, plus LLM Contextualization for child chunks so each retrieval unit carries its surrounding context.
Phase 2 — Enterprise Production
AWS Cloud Migration
Challenge The POC ran on a single box. Enterprise needed 99.9% uptime, auto-scaling, VPC isolation, and a clean split between short-lived tool calls and long-running agent workers — without rewriting the agent layer.
Transitioning from local/on-prem POC to AWS. Leveraging fully managed services and container orchestration to reach enterprise targets: 99.9% uptime, auto-scaling, and security inside a VPC. Compute split between AWS Lambda (event handlers, short-lived tools) and ECS Fargate (long-running agent workers).
Serverless Ingestion Pipeline
An alternative, highly optimized ingestion architecture using serverless cloud functions. Designed for event-driven document processing — minimizes idle compute cost and maximizes real-time scalability during data upload spikes. Useful when ingestion is bursty and unpredictable rather than steady-state.
Outcome
- Unified institutional knowledge across 6+ document formats behind one chatbot interface.
- Production-ready on AWS with two deployment topologies (Lambda + ECS Fargate, plus a serverless ingestion alternative).
- Hallucination-free outputs via Langfuse-traced agent trajectories and per-step evaluation.
- Reusable agent and infra patterns that informed downstream projects at FPT Software.
- Tool calling to external services (Discord, Google Calendar) integrated cleanly through the agent framework.