MNK/portfolio
GenAI & agents

Document Summarizer

~50% lower latency · 99% factual consistency

Production-grade, multi-strategy document summarization platform. Upload a PDF, DOCX, TXT, Markdown, HTML file or URL and get a structured summary streamed live, with automatic strategy routing (Stuff / Map-Reduce / Refine / Recursive), PII scanning, and LLM-as-judge faithfulness scoring.

Problem

Long documents need summaries that stay faithful to the source, whatever the format or length.

Approach

  1. Upload PDF, DOCX, TXT, Markdown, HTML or a URL
  2. Automatic strategy router: Stuff, Map-Reduce, Refine and Recursive
  3. PII scanning before summarization
  4. Summary streamed live over SSE, scored by an LLM-as-judge for faithfulness
  5. FastAPI, Celery, Next.js 14 and LangChain with JWT auth
Document Summarizer workflow: 5 stages from input to result
Workflow

Screens

Document Summarizer screenshot 1 of 9Document Summarizer screenshot 2 of 9Document Summarizer screenshot 3 of 9Document Summarizer screenshot 4 of 9Document Summarizer screenshot 5 of 9Document Summarizer screenshot 6 of 9Document Summarizer screenshot 7 of 9Document Summarizer screenshot 8 of 9Document Summarizer screenshot 9 of 9

Results

  • ~50% lower latency
  • 99% factual consistency

Stack

  • FastAPI
  • Next.js 14
  • LangChain
  • ChromaDB
  • Celery
  • SSE

By Muzammil Nawaz Khan, AI Engineer.