PolicyPilot RAG
Enterprise HR policy intelligence and contextual RAG assistant
PolicyPilot RAG is an enterprise HR knowledge assistant that turns unstructured policy documents into context-aware, source-backed answers by combining document ingestion, semantic retrieval, employee metadata filtering, and controlled LLM response generation.
Problem
Employees often need policy answers that depend on role, location, employment type, work mode, grade, and business unit. Traditional document repositories force people to manually search long HR PDFs, while generic chatbots risk giving broad answers without source grounding or policy applicability.
What I'm Building
I'm building a RAG-based HR assistant where policy documents are ingested, parsed, chunked, embedded, and retrieved through semantic search. The system filters retrieved policy context using employee metadata before generating a concise answer with source references, helping employees understand which policy sections actually apply to them.
Architecture
- RAG pipeline for policy-grounded answers
- Embedding generation for HR policy chunks
- Vector search over structured policy knowledge
- Employee metadata filtering layer
- Controlled LLM response generation
- Source citation and confidence-aware responses
- Admin policy upload and version control
- Role-based access and audit logging
- Next.js chat interface
- FastAPI backend orchestration
- PostgreSQL employee metadata store
- FAISS / Pinecone / Weaviate-ready vector layer
- Local Ollama mode for private development
- Cloud LLM mode for production scalability
Core Features
- Natural-language HR policy chat
- Source-backed answers
- Multi-policy querying
- Context-aware policy interpretation
- Role, department, location, employment type, grade, and work-mode filtering
- Admin policy upload and update
- Employee metadata management
- Access-level controls
- Query logs and monitoring
- Feedback loop for answer improvement
RAG Flow
PolicyPilot separates retrieval from generation so the LLM answers from controlled policy context instead of guessing. The system embeds the employee query, retrieves top policy chunks, filters them by user metadata, assembles grounded context, and generates an answer with policy references.
- User query normalization
- Query embedding generation
- Top-K semantic retrieval
- Policy metadata filtering
- Employee context enrichment
- Prompt construction
- LLM answer generation
- Response validation
- Source reference display
- Feedback logging
Knowledge Management
- PDF / DOCX policy ingestion
- Policy parsing and section detection
- Chunking with section boundaries
- Metadata tagging by policy, version, role, location, and employment type
- Embedding and vector indexing
- Active / archived policy versioning
- Selective re-indexing for updated documents
- Admin approval and audit trail
Validation and Governance
- Unsupported query fallback
- Low-confidence escalation path
- Restricted query handling
- Role-based access control
- Sensitive policy masking
- Audit logs
- Secure data handling
- Human HR fallback for complex legal interpretation
Tech Stack
RAG, semantic search, embeddings, LangChain, LlamaIndex, OpenAI, Ollama, LLaMA/Mistral, React, Next.js, FastAPI, PostgreSQL, FAISS/Pinecone/Weaviate, Docker, AWS
Current Status
Active build - architecture and product specification completed, with RAG ingestion, retrieval, metadata filtering, and admin workflows defined for implementation.
Next Steps
- Implement document ingestion pipeline
- Build employee metadata filtering layer
- Add source citation UI
- Implement admin upload and versioning
- Add evaluation set for policy-answer accuracy
- Deploy local Ollama development mode before cloud LLM integration