Note
This repository is a portfolio case study. It explains the architecture, engineering decisions, AI workflow, and product reasoning behind Ava AI without exposing proprietary source code, secrets, private HR data, or confidential implementation details.
| Context | Team | Status | My part |
|---|---|---|---|
| AI Engineering Internship, Apping Technology Sdn. Bhd. (2026) | Engineering team | Used by real users | My contributions → |
Ava AI is an AI-powered HR assistant that helps employees get fast, policy-aware answers about leave, payroll, benefits, claims, workplace conduct, and HR procedures. It combines document-grounded retrieval, HRIS-aware employee context, realtime HR handover, and platform-level usage governance.
The product was designed for a practical HR operations problem: employees need immediate support, while HR teams need visibility, control, and confidence that answers remain scoped to approved company knowledge.
Portfolio Snapshot
| Dimension | Summary |
|---|---|
| Product | Confidential HR assistant for employees and HR teams |
| Core AI Pattern | Retrieval-Augmented Generation with scoped company context |
| Users | Employees, HR admins, superadmins |
| Backend | Modular NestJS API with PostgreSQL-style persistence |
| Frontend | React, TanStack Router, React Query, Tailwind, Radix UI |
| AI Providers | OpenAI and Gemini abstraction for chat and embeddings |
| Retrieval | Qdrant vector store with hybrid vector and payload text search |
| Realtime | Socket.IO chat updates and HR handover events |
| Governance | AI credits, usage tracking, provider settings, request logs |
Ava AI turns HR policy documents and HRIS records into a conversational support experience. Employees can ask natural-language questions, receive concise answers grounded in approved documents or live HRIS data, and escalate to HR when the system cannot answer safely.
For HR admins, Ava AI provides document management, conversation review, employee visibility, and escalation handling. For superadmins, it adds tenant-level controls, AI provider settings, usage analytics, and operational monitoring.
| Area | Capability | Why It Matters |
|---|---|---|
| Employee chat | Suggested prompts, message history, confidential assistant UX | Reduces HR support friction while keeping the experience approachable |
| RAG answers | Document ingestion, embeddings, scoped retrieval, grounded generation | Keeps answers aligned with approved company policy |
| HRIS-aware responses | Leave balance, payroll, expenses, employee profile context | Separates live personal data from static policy knowledge |
| HR handover | Assistant can offer escalation and HR can respond in the same thread | Preserves continuity when automation should stop |
| Admin review | Conversation tables, message drawer, escalations, employees | Gives HR operational visibility without exposing implementation internals |
| Superadmin controls | Organizations, AI credits, usage dashboards, settings, logs | Supports governance, cost control, and platform oversight |
| Layer | Technologies |
|---|---|
| Web app | React, Vite, TanStack Router, TanStack Query, Tailwind CSS, Radix UI |
| API | NestJS, TypeScript, JWT auth, role guards, Socket.IO, EventEmitter |
| Data | PostgreSQL-style relational schema, migrations, HRIS database integration |
| AI | OpenAI, Gemini, provider abstraction, token usage attribution |
| Retrieval | Qdrant, chunking, embeddings, hybrid vector and text search |
| Observability | Request logs, API usage summaries, AI credit tracking |
flowchart LR
Employee[Employee Console] --> Web[React Frontend]
HR[HR Admin Console] --> Web
Super[Superadmin Console] --> Web
Web --> API[NestJS API]
API --> Auth[Auth and Roles]
API --> Chat[Employee Chat Service]
API --> Docs[Document Service]
API --> Usage[API Usage Service]
API --> Realtime[Socket.IO Gateway]
Chat --> HRIS[HRIS Database]
Chat --> RAG[RAG Retrieval]
Docs --> RAG
RAG --> Qdrant[Qdrant Vector Store]
RAG --> AI[OpenAI or Gemini]
API --> DB[(Application Database)]
flowchart TD
Upload[HR uploads policy document] --> Parse[Extract text from PDF or DOCX]
Parse --> Chunk[Chunk document with overlap]
Chunk --> Embed[Create embeddings]
Embed --> Store[Store vectors and metadata in Qdrant]
Question[Employee asks HR question] --> Scope[Resolve employee and company scope]
Scope --> Search[Hybrid vector and text retrieval]
Search --> Prompt[Build grounded prompt]
Prompt --> Answer[Generate answer through active AI provider]
Answer --> Save[Store message and usage attribution]
Save --> UI[Return answer to employee chat]
Screenshots are captured with sanitized demo data and selected to show the core product workflows.
| Employee Assistant | HR Admin Operations |
|---|---|
![]() |
![]() |
| Suggested prompts help employees start with common HR questions. | HR teams can monitor assistant activity, conversations, and escalations. |
| Grounded Answer | Platform Governance |
|---|---|
![]() |
![]() |
| Ava AI answers policy questions through scoped retrieval and clear trust cues. | Superadmins can monitor usage, credits, and operational trends. |
More Screenshots
| Workflow | Screenshot |
|---|---|
| HR handover | ![]() |
| Admin conversations | ![]() |
| Admin escalations | ![]() |
| Admin documents | ![]() |
| Superadmin organizations | ![]() |
| Superadmin settings | ![]() |
| Document | What It Explains |
|---|---|
| 01 Executive Summary | Product, architecture, and portfolio value in one page |
| 02 Business Problem | Why Ava AI exists and what problem it solves |
| 03 System Architecture | Components, boundaries, data flow, and roles |
| 04 AI Workflow | RAG, HRIS-aware answers, provider abstraction, handover |
| 05 Backend Design | NestJS modules, service responsibilities, realtime events |
| 06 Database Design | Entity model, tenancy, chat, documents, usage governance |
| 07 API Overview | Endpoint groups and API design principles |
| 08 Feature Documentation | User-facing features by role |
| 09 Engineering Decisions | Trade-offs and architectural reasoning |
| 10 Challenges | Technical risks and how they were managed |
| 11 My Contributions | Engineering contribution narrative |
| 12 Future Work | Roadmap and next technical improvements |
| Appendix | Glossary, privacy notes, and review checklist |
| Diagram Plan | Diagram inventory and export guidance |
| Screenshot Plan | Capture list and privacy guidance |
- Designed a multi-role AI HR assistant spanning employees, HR admins, and superadmins.
- Implemented a RAG workflow that scopes answers by organization or HRIS company context.
- Added provider abstraction so chat and embedding workflows can operate with OpenAI or Gemini.
- Combined document retrieval with live HRIS data for leave, payroll, expense, and profile questions.
- Added realtime HR handover so sensitive or unanswered cases can move from AI to human support.
- Built platform governance through usage tracking, AI credits, request logs, and provider settings.
What this case study does not show, and what the system does not yet do:
- Source code, HR documents and employee data are private, so answer quality is described qualitatively here.
- There is no automated regression suite for RAG quality and hallucination behaviour yet.
- Answers do not yet show the exact source excerpt and document link they were grounded in.
- Policy documents have no versioning or effective dates; stale content relies on the reindex workflow.
- Bahasa Malaysia and mixed-language answers need further work.
- Enterprise single sign-on (SSO/SAML/OIDC) is not supported yet.
Important
HR assistants need trust boundaries as much as they need intelligence. The strongest design decisions in Ava AI separate what the model can infer, what the system must retrieve, and when a human should take over.
- RAG is most valuable when retrieval is scoped, auditable, and connected to a clear fallback path.
- Live HRIS data should be treated as a source of truth for personal facts, not blended casually with policy excerpts.
- Cost governance belongs in the product architecture, not as an afterthought.
- Realtime handover makes AI support safer because it gives the system a graceful way to stop.









