A step-by-step guide for a 3–5 minute walkthrough. Each section is a distinct scene you can record independently.
Setup checklist:
- Backend running:
cd backend && source .venv/bin/activate && uvicorn app.main:app --port 3001 --reload - Frontend running:
cd frontend && npm run dev - Browser open at
http://localhost:5173 - A real PDF ready — a technical doc, research paper, or product spec with specific facts
- Browser devtools closed, zoom at 100%, window maximised
Show: Empty application state.
"This is PDF Chat — a document assistant that uses Corrective RAG to answer questions grounded strictly in your uploaded PDF. It never guesses, never uses outside knowledge, and self-corrects its own retrieval when it detects it fetched the wrong passages."
- Show the full app in its empty state.
- Point to the disabled chat input: "No PDF loaded — chat is disabled."
Show: Drag-and-drop → status badge → ready.
- Drag a PDF onto the upload zone.
- Watch the upload card appear: filename, page count.
- Wait for the "Ready" status (1–3 seconds).
"When you upload a PDF, the backend extracts text page-by-page using PyMuPDF, splits it into overlapping 800-token chunks, and builds a BM25 keyword index. No embedding model, no GPU, no cloud ML service — this runs in ~100 MB of RAM and deploys on a free 512 MB server."
Show: Factual question → answer → citation expand → RAG trace.
- Type a specific factual question you know the answer to.
- Press Enter; watch the loading indicator.
- Answer appears — point out the page citation chip.
- Click the citation chip to expand the source snippet.
- Click "Why this answer?" to open the RAG trace drawer.
- Show the retrieved passages: "These are the only passages the model had access to."
"The model cannot see any part of the PDF except these retrieved passages."
Show: A query using informal vocabulary — CRAG detects the mismatch and fixes it.
- Type a question using informal or abbreviated terms. On the Attention paper:
Why is the Transformer better than RNNs? - Show the answer arriving with citations from the correct section.
"This is Corrective RAG. BM25 initially retrieves chunks about architecture diagrams and results tables — not what we need. A fast LLM evaluator detects the mismatch. It rewrites the query — expanding 'RNNs' to 'recurrent neural networks' and replacing 'better' with 'advantages over' — then re-retrieves. The second pass finds the right section and the answer comes through with citations."
(Optional: show backend terminal — you'll see CRAG relevance verdict: irrelevant → CRAG rewritten query → correct chunks retrieved)
Show: "Summarise in 5 points" works correctly.
- Type:
Summarise in 5 pointsand press Enter. - A structured summary appears with citations.
"Broad document-level questions skip the CRAG evaluator and retrieve context from across the whole PDF."
Show: The grounding gate refusing a question the PDF can't answer.
- Type:
What is the capital of France?and press Enter. - The refusal message appears; citations are empty.
"BM25 returns zero matching chunks — 'capital' doesn't appear in this PDF. The query is refused before any LLM call is made."
Show: Swapping PDFs creates an isolated new session.
- Click "Replace document".
- Upload a second, different PDF.
- Ask the same factual question from Scene 3 — show the answer is about the new document (or refused if that information isn't there).
"Each upload is a completely isolated session. No cross-contamination."
"React frontend, FastAPI backend, PyMuPDF for extraction, BM25 for retrieval, Corrective RAG for self-correcting retrieval, Groq Llama for generation. The entire stack runs on Render's free 512 MB tier. No OpenAI, no paid API, no GPU. Every answer is traceable to a specific passage, or it's refused."