A retrieval-augmented generation (RAG) assistant prototype enabling employees to instantly query complex internal leave, insurance, and compliance policy documents.
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.
Reduce first-line HR ticket volume by 40% while ensuring zero incorrect advice through strict guardrails and verifiable citation requirements.
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.
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.
Current Boundaries: Currently limited to text and tabular document formats; complex scanned handwritten forms require separate OCR pre-processing.
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.