RAG · IN PROGRESS
Document Q&A that shows its sources.
A retrieval-augmented generation pipeline for asking questions across large PDF collections — every answer points back to the exact page it came from.
Demo runs on Streamlit Community Cloud with a sample PDF. The full 1K+ document pipeline runs locally.
Source · warranty.pdf · p. 4
5.1 Coverage Terms
All registered products are covered under standard terms. The warranty period extends to 24 months from the date of purchase, provided proof of purchase is supplied.
Claims outside this window are handled under the extended-service policy, see section 6.2.
→
Q: How long is the warranty?
24 months from the date of purchase, as long as proof of purchase is provided.
📄 warranty.pdf · p.4
Where this stands today
~55% complete
The core pipeline is built and the demo is live — upload a PDF, ask a question, get a grounded answer with a citation. What's left is making it provably good: a real evaluation set, hybrid retrieval, re-ranking, and testing at the full 1K+ document scale.
Early numbers
Measured during development on a small labeled test set — not yet a formal benchmark. Treat these as a direction, not a final score.
BLEU score
0.81
vs. 0.41 for plain keyword search
Corpus size
1,000+
PDFs targeted for the full pipeline
End-to-end latency
1.2s
retrieval + generation, current build
How a question becomes an answer
One linear path from raw PDF to a cited answer — no step is hidden.
→
Chunker
512 tok · 50 overlap
→
→
→
→
Model card
The honest specs — what the system is actually running on right now.
Dataset
1K+ PDFs, semantic chunking (512 tokens)
Embeddings
all-MiniLM-L6-v2 via HuggingFace
Vector store
FAISS — flat index, top‑5 retrieval
LLM
Llama 3.3 70B via Groq API
Baseline
Keyword search BLEU 0.41 → RAG pipeline 0.81
Build log
What's shipped, what's underway, and what's next.
Done — demo version
- Streamlit UI — upload, query, results
- Multi-PDF upload & batch ingestion
- Semantic chunking — 512 tok, 50 overlap
- HuggingFace embeddings (MiniLM)
- FAISS store — build, persist, reload
- Top‑5 retrieval with relevance scores
- Context injection into LLM prompt
- Llama 3.3 70B generation via Groq
- Source citations — doc name + page
- Query metrics — latency, chunk count
- Chunk explorer for retrieved context
- One-click sample PDF, no upload needed
In progress
- BLEU evaluation framework, labeled Q&A set
- Latency optimization — targeting <1.2s
- Scale testing across the full 1K+ corpus
Planned
- Hybrid retrieval — BM25 + FAISS fusion
- Re-ranking — cross-encoder on top‑k
- Streaming, token-by-token responses
- Docker containerization
- MLflow experiment tracking
Stack
What's actually running underneath.
LC LangChain · orchestration
FS FAISS · vector store
HF HuggingFace · embeddings
GQ Groq · LLM API
ST Streamlit · frontend
PY Python 3.10+ · core