Case Study // sutra

SUTRA

Production RAG-based knowledge assistant built for IIT Roorkee's Academic Affairs department.

ArchitectureHybrid RAG
RetrievalDense+Sparse
Pipeline4-Stage LLM
SecurityHardened
DEMO_RECORDING

02 // Architecture Execution

Architected a hybrid RAG system using FastAPI and Qdrant native hybrid search with server-side RRF. Offloaded embeddings and reranking to HuggingFace TEI containers. Built a 4-stage LLM pipeline (rewrite → extract → generate → verify) utilizing quantized Qwen 3 14B for precise instruction following. Hardened the deployment with Docker Compose on the Param Ganga HPC cluster.

01 // The Problem Context

IIT Roorkee's Academic Affairs department needed a production-grade knowledge assistant. The system had to support complex queries over regulatory texts, necessitating a highly accurate retrieval pipeline and robust security against path traversal and XSS.

System Stack

FastAPIQdrantTEIDockerDocling
core_module.ts
# TEI & Qdrant Hybrid Retrieval Pipeline
def retrieve_evidence(query):
    # Dense + Sparse (BM25) search with RRF
    results = qdrant.search_hybrid(query, limit=10)
    # TEI Cross-Encoder Reranking
    reranked = tei_client.rerank(query, results)
    return apply_sigmoid_threshold(reranked)
Live Link Soon