PDF Q&A Agent (ChatPDF)
A RAG assistant that answers from inside your documents
- RAG
- Architecture
- 2024
- Year
- Kaynak izlenebilir
- Answers
Overview
In a long contract, technical specification or regulation, the information you need is usually in a single paragraph — the problem is finding it. Classic search matches words, whereas people search for meaning.
This tool works on a RAG (retrieval-augmented generation) approach. An uploaded PDF is first split into meaningful chunks, each chunk is converted into a vector representation and stored in an index. When the user asks a question, the closest chunks are retrieved first, and the language model then produces an answer grounded only in those chunks.
The critical benefit of this design: rather than being pushed into fabrication, the model can say "this information is not in the document" when it finds no match. Because answers are sourced from the document, the user can trace which section they came from.
Highlights
- Splitting PDF content into meaningful chunks and vectorising them
- Retrieving the sections closest to the question
- Document-grounded answers with traceable sources
- An explicit "not in the document" behaviour
Objectives
- Cut the time it takes to find information in long documents
- Stop the model from straying outside the document and fabricating
- Offer a simple interface for non-technical users
Solution
- Tuning the chunking strategy to the document structure
- Similarity search over a vector index
- Prompt design that limits the answer to the retrieved context
- A Streamlit drag-and-drop upload interface
Approach
- 01Chunking experiments across different document types
- 02Evaluating answer quality against real questions
- 03Deploying on Hugging Face Spaces
Outcomes
- Information in hundreds of pages is found in seconds
- Answers are verifiable because they are grounded in the document
- Non-technical users can query the document as well
Challenges
- Balancing chunk size against context integrity
- Reading tables and multi-column PDF layouts correctly
- Suppressing model hallucination
Selected Work
Similar projects

Audio-to-News-Article Agent
An AI tool that turns an audio recording first into text, then into a structured news article, combining speech recognition and natural language processing in a single pipeline.
Rice Classification Model
A deep learning model trained with TensorFlow and Keras that classifies rice varieties from grain images, reaching 98% accuracy on the test set.

Real-time Object Detection System
A computer vision application that detects objects in a camera feed in real time using OpenCV and a pre-trained YOLOv3 model.
