Exam Paper Generator Using AI
Exam Paper Generator using AI
Dr. Vijay Dhaku Dhangar
T. Chenna Keshava
D. Karthik
M. Prashanth,
Y. Venu Kumar
Sandip University, India
Abstract:Manually constructing examination question papers is repetitive, time-consuming, and vulnerable to uneven topic coverage. This paper presents an AI-powered question paper generator that combines a local large language model with retrieval-augmented generation (RAG) to automate the creation of exam papers from textbook PDFs. The system accepts a textbook PDF, extracts and cleans the text, splits it into semantic chunks, and stores embeddings in a vector database. For each requested topic or exam pattern, the system retrieves the most relevant chunks and supplies them to a quantized local language model for question synthesis. Three generation modes are supported: a standard exam mode with fixed part-wise marks, a custom-topic mode where the user specifies the number of questions and marks, and a question-bank mode without marks. The complete pipeline runs offline on a standard CPU-based workstation, protecting institutional content and avoiding dependence on cloud APIs. A Flask-based interface provides authentication, paper history, and export to TXT, PDF, and DOCX formats. Prototype evaluation reported an average generation time of roughly 105 seconds for a 19-question paper, with high relevance and stable parsing for shorter requests. The results indicate that a local LLM, when combined with RAG and careful prompt design, can produce coherent, syllabus-grounded question papers while reducing faculty workload and preserving privacy. The paper concludes with limitations, including OCR dependence for scanned PDFs and occasional count mismatches, and outlines future work for multimodal inputs and learning management system integration.Keywords: Question Paper Generator, Local LLM, Retrieval-Augmented Generation, RAG, ChromaDB, Flask Web Application, Educational Technology, Natural Language Processing.