A "chat with your PDF" RAG app: upload a PDF, ask questions in natural language and get answers grounded in the document, with page-number citations. Built with ChromaDB, sentence-transformers, Groq and Streamlit, and deployed live.
Finding specific information in long PDFs such as research papers, reports and policy documents is slow and relies on manual reading and keyword search. General-purpose chatbots can answer questions about a document, but without grounding they may hallucinate and give no way to check where an answer came from. Users need a lightweight tool that answers questions strictly from their own document and shows the source pages, so answers can be verified quickly.
I built a Retrieval-Augmented Generation (RAG) application in Python. An uploaded PDF is parsed with pypdf and split into chunks. Each chunk is embedded with the sentence-transformers model all-MiniLM-L6-v2 and stored in a ChromaDB vector store. For each question, the most relevant chunks are retrieved by semantic similarity and passed as context to an LLM served through the Groq API, which generates an answer based only on that context. Every answer includes page-number citations, so the user can check the original page. The interface is a Streamlit app. I kept the pipeline framework-free (no LangChain) to keep it simple and transparent. API keys are stored in environment variables and Streamlit Secrets, not in the code. The app is deployed on Streamlit Community Cloud at no hosting cost. Live app: https://rag-pdf-chatbot-laiba.streamlit.app Source code: https://github.com/laibaghalib/rag-pdf-chatbot
The project delivers a working, publicly accessible RAG assistant that answers questions from a user's own PDF and cites the source pages. It improves knowledge access by reducing the need to manually search long documents, and improves answer trustworthiness by grounding responses in retrieved text with page references. It was tested on two real documents (a CV and a research paper) and runs end to end on a free hosting tier.
Answers are grounded in retrieved document chunks and include page-number citations for verification. Tested on two real documents (a CV and a research paper). Deployed live at zero hosting cost, with no manual setup needed by the end user.