← Back to Projects

Project Detail

Searchable RAG Copilot

An enterprise knowledge retrieval system with a shared FastAPI RAG engine, dual clients (Streamlit & Microsoft Teams), pre-retrieval access control, and a swappable local/Azure hybrid architecture.

AI & RAGBackendPythonFastAPIAzureEnterprise
Completed / UAT ReadyIndustry FYP with Centific (Graduation Dec 2026)

The Problem

Enterprises store operational policies, technical manuals, and sensitive HR/IT documents across disconnected silos (OneDrive, OneNote, PDFs, and file shares). Traditional keyword search returns documents rather than answers, while generic RAG chatbots create data-leakage risks when sensitive documents lack access control. The objective was to build a secure retrieval system that enforces strict Access Control Lists (ACLs) and department boundaries before any context is passed to the language model.

What I Built

An end-to-end enterprise knowledge retrieval platform featuring a shared FastAPI backend that powers two separate interfaces: an administrative & employee Streamlit portal and a Microsoft Teams bot built with Microsoft 365 Agents Toolkit. The system supports a dual runtime profile (fully local via ChromaDB + Ollama/Mistral, or hybrid cloud via Azure Blob + Azure AI Search + Azure OpenAI), automated document ingestion with OCR, SHA-based versioning with automatic archive cycles, Microsoft Graph connectors for OneDrive/OneNote, and a pre-retrieval authorization layer that guarantees unauthorized document chunks never reach the LLM.

Screenshots & Artifacts

Searchable RAG Copilot Academic and Architecture Poster
Academic & Architecture Poster for the Industry FYP with Centific.

Tech Stack

FastAPIPythonLangChainAzure OpenAI (gpt-5.4-nano / GPT-4)Azure AI SearchAzure Blob StorageOllama & Mistral 7BChromaDBHuggingFace (all-MiniLM-L6-v2)SQLite (Governance & Audit)Microsoft Graph API (OneDrive & OneNote)Microsoft 365 Agents Toolkit (Teams Bot)StreamlitPytest & OCR (PyTesseract / pdfplumber)

Decisions I Made

1

Enforced pre-retrieval access control: Applied user role and department ACL filtering in SQLite before vector retrieval, ensuring unauthorized context never enters prompt memory or reaches the LLM.

2

Designed a swappable dual-profile runtime: Decoupled vector stores (Chroma vs Azure AI Search) and LLM providers (Ollama/Mistral vs Azure OpenAI) behind clean adapter abstractions so developers can test locally at zero cloud cost or deploy to Azure using only configuration flags.

3

Engineered a single shared backend for dual clients: Built FastAPI as the central orchestration brain serving both an administrative Streamlit web portal and an employee-facing Microsoft Teams bot over shared HTTP contracts.

4

Implemented deterministic SHA content hashing and versioning: Tracked document lifecycle so re-uploaded documents archive prior versions and clean up obsolete vector records while retaining historical audit logs.

5

Established a staged connector review queue: Required discovered Microsoft Graph items (OneDrive/OneNote) to undergo an admin metadata and ACL verification step before being chunked and indexed into search.

6

Built automated retrieval evaluation & AI Advisor: Created a labelled benchmark query suite to evaluate accuracy, hit rate, and latency, combined with a rule-based AI Advisor to detect knowledge gaps and unindexed queries.

What I Learned

1

Retrieval pipeline design dominates LLM parameter size: Chunking strategies, semantic similarity thresholds, metadata tagging, and embedding quality impact answer fidelity and hallucination reduction far more than model choice alone.

2

Security must live at the data and query layers: LLMs cannot be trusted to self-police authorization; permissions must be strictly verified deterministically prior to retrieval.

3

Decoupling data governance from vector search: Maintaining SQLite as the single source of truth for metadata, ACLs, version lineage, and query audit logs made switching vector stores and cloud providers straightforward.

4

Defensive AI design: Implemented strict citation requirements and fallback handling to gracefully return 'information not found' rather than letting the model speculate.

5

Handling real-world enterprise ingestion: Handled multi-format documents (PDF, DOCX, TXT) with OCR fallbacks, managing inconsistent formatting, tables, and scanned pages in enterprise data.

View GitHub Repository ↗