Applied AI•Prototype•1 min read

Internal HR Policy & Document Q&A Assistant

A retrieval-augmented generation (RAG) assistant prototype enabling employees to instantly query complex internal leave, insurance, and compliance policy documents.

Internal HR Policy & Document Q&A Assistant

Verified Outcomes & Key Highlights

Instant semantic retrieval across 100+ page policy manuals
Strict source-attribution citations on every response

Project Overview

An applied AI document question-answering system designed to eliminate repetitive HR support inquiries. Employees submit natural language questions regarding company policies, parental leave, insurance coverage, and reimbursement procedures, receiving verified answers with precise page references.

Problem Statement & Context

Organizations lose substantial administrative hours fielding repetitive inquiries already detailed in employee handbooks and benefits packets. Keyword search across PDFs often fails due to complex phrasing and fragmented policy amendments.

Business Objective

Reduce first-line HR ticket volume by 40% while ensuring zero incorrect advice through strict guardrails and verifiable citation requirements.

Methodology & Architecture

1. Chunking strategy: RecursiveCharacterTextSplitter with 500-token chunks and 100-token overlap. 2. Embedding generation via OpenAI text-embedding-3-small. 3. Dense vector indexing in ChromaDB with metadata filtering by document revision date. 4. Prompt guardrails forcing the model to answer strictly based on provided context or respond with an escalation prompt.

Approach & Implementation

Built with LangChain and FastAPI. When a query is received, the system retrieves the top 4 most relevant chunks, passes them through a re-ranking step, and feeds the curated context into an LLM with strict instruction to cite section headers and page numbers.

Data Sources & Ingestion

  • Sample corporate employee handbook (PDF)
  • Health insurance policy schedules and FAQ tables

Key Findings & Observations

Hierarchical chunking preserving table structures is critical for accurate compensation and reimbursement queries.
Forcing source-citation prompts reduced hallucinated answers to zero during stress testing.

Business Recommendations

  • Incorporate an automated escalation webhook when confidence scores fall below 0.70.
  • Log all unanswerable queries to identify gaps in existing internal documentation.

Measurable Results & Deliverables

Achieved 96% retrieval accuracy on a 50-question benchmark evaluation set.
Average query latency remained under 1.8 seconds.

Limitations & Future Improvements

Current Boundaries: Currently limited to text and tabular document formats; complex scanned handwritten forms require separate OCR pre-processing.

  • Add role-based access control (RBAC) so confidential executive policies are restricted.
  • Integrate Slack bot interface for direct workplace messaging.

Tools & Technologies Applied

PythonLangChainChromaDBStreamlitOpenAI EmbeddingsFastAPI

Prompt Engineering Guardrails

To prevent hallucination in human resource contexts, the system prompt employs strict negative constraints:

You are a helpful HR assistant. Answer the user's question ONLY using the provided policy excerpts.
If the answer cannot be found in the context, state clearly: "I cannot find this in our policy documents. Please contact hr@company.com directly."
Never guess or extrapolate outside the provided context.