← All Projects
03 Case Study

PAH - Graduate Policy AI

An intelligent internal assistant built for a large organisation, enabling staff to instantly query complex policy documents, compliance rules, and institutional knowledge, powered by RAG and LLM technology.

Category Full-Stack & AI Systems
Reading Time ~3 min read
02 Case Study Breakdown

The Problem

Hundreds of Policies, Zero Easy Access

Large organisations and academic institutions often have hundreds of complex internal policies: scholarship regulations, compliance rules, leave procedures, and grant guidelines—all scattered across PDFs and handbooks that nobody reads.

Staff and graduate students faced persistent challenges navigating fragmented institutional policies, leading to missed entitlements, suboptimal decisions, and support offices overwhelmed by repetitive queries.


What I Built

Full-Stack AI Knowledge Platform with Dual-AI Engine

A production-grade AI assistant platform where administrative teams upload and manage policy documents, and users interact with an intelligent assistant that answers complex policy questions in real time with exact source document citations.

6 Core Modules Built

  1. Smart Document Management (CRUD): Admins upload institutional PDFs directly stored in MongoDB via GridFS and simultaneously chunked, embedded, and vectorised into Pinecone for low-latency semantic search.
  2. 2-Layer AI Query Classification: Every user query is first passed through a fine-tuned Hugging Face classification model to determine intent: Is it a known FAQ, a valid policy question, or out-of-scope?
  3. Dual AI Response Engine: Known FAQ queries return instant pre-compiled answers; complex policy inquiries stream through a LangChain RAG pipeline, retrieving top-$k$ policy chunks and generating context-grounded LLM responses.
  4. Source Documents Shown as Proof: Responses display the exact policy document name, section, and context snippet used as evidence, ensuring institutional transparency and zero hallucinations.
  5. Integrated Feedback Loop: Users can submit flags or suggestions directly on answers; admins receive real-time alerts, review feedback, and refine document indexing from the dashboard.
  6. Policy Change Notifications: When admins update or upload new handbooks, automated notifications alert users to keep everyone aligned with the latest guidelines.

Key Architectural Features

  • Dual-Layer AI Architecture: FAQ Classifier + LangChain RAG pipeline
  • Institutional Document Management: Full CRUD with MongoDB GridFS storage
  • Multi-Turn Contextual Chat: Session memory with conversational history
  • Source Citations: Real-time reference grounding on every generated answer
  • Admin & User Role-Based Access Control (RBAC): Secure multi-tier access
  • Real-Time Notification Engine: Broadcasts when institutional rules change
  • Document Search & Filtering: Fast multi-attribute filtering across policies

Tech Stack

  • Frontend: Next.js 14, Tailwind CSS, TypeScript
  • Backend: Node.js (ES6), Python 3.11 (FastAPI)
  • AI & ML: LangChain, RAG architecture, Hugging Face (Intent Classifier)
  • Vector Database: Pinecone (Semantic similarity search)
  • Database: MongoDB + GridFS (Document & PDF binary storage)
  • Infrastructure: Hetzner Cloud Server, Docker, Linux
  • Design & Prototyping: Figma

What Made This Complex

Beyond a Standard Chatbot

Most chatbot implementations only perform basic vector lookups. PAH required an enterprise-grade, multi-stage architecture:

The dual-AI approach means the system first classifies intent using a fine-tuned Hugging Face model before hitting LLM inference, ensuring sub-second response times for common queries and reserving full RAG reasoning for deep policy queries.

Combining ML classification, LangChain RAG, MongoDB GridFS binary chunking, and Pinecone vector indexing on a dedicated cloud instance delivered a robust institutional intelligence system rather than a fragile prototype.


The Outcome

PAH eliminated hours of manual policy research by providing instant, accurate, source-backed answers. The organisation experienced a significant reduction in repetitive support tickets, while staff and students gained the ability to self-serve complex compliance and procedural answers with confidence.