AI-Based PDF Chat and Summarization Engine Using Retrieval-Augmented Generation
Abstract
Portable Document Format (PDF) files are the most common way of storing reports, research papers, manuals, and legal documents, but their layout-oriented structure makes them difficult to search and to query conversationally. Large Language Models (LLMs) can answer questions fluently, but they may hallucinate and cannot process long documents that exceed a fixed context window. This study presents the design, implementation, and preliminary testing of a PDF chat and summarization system based on Retrieval-Augmented Generation (RAG). The system uses a three-stage data pipeline (raw, processed, and RAG-ready) that parses PDFs, removes repeating headers and footers, converts content to Markdown, and applies structure-aware chunking, which attaches section-path metadata to every chunk. Answers are generated by the openai/gpt-oss-120b model (served through the Groq API) using passages retrieved from a local ChromaDB vector store with all-MiniLM-L6-v2 sentence embeddings, and are returned with page references. Three chunking strategies (fixed-size, Markdown-aware, and hierarchical) are defined, and an evaluation protocol based on answer accuracy, faithfulness, hit rate at k, unsupported-answer rate, and response time is specified for comparing them. In preliminary testing, the system processed uploaded PDFs and answered natural-language questions with an average response time of approximately 2–5 seconds. A full comparative evaluation is left for future work. The study provides a reproducible, small-scale baseline that student and small-team developers can extend, and it argues that document preprocessing and chunking quality are central to the reliability of PDF question answering