Question Paper Generator.
Local RAG system for textbook-based exam papers
Problem: Setting a balanced question paper from textbooks by hand is slow and hard to keep aligned with Course Outcomes and Bloom's levels. Solution: A fully local RAG system that reads uploaded textbooks and generates a paper with a Course Outcome (CO) and Bloom's Taxonomy (BT) level for every question.
Team project (3 members). Upload one or more textbooks (and optionally a syllabus), choose the marks and distribution, and the app generates a complete question paper with model answers. It runs entirely on a local LLM, so it has zero API cost.
- Local LLM
- CO and Bloom's mapping
- Model answers
- Multi-textbook input
- Runs fully offline with a local Llama 3.1 8B model through Ollama, with no paid APIs
- Every question is tagged with a CO and a Bloom's level, with configurable BT and CO weightage
- Presets for 50-mark and 100-mark papers, with model answers for every question
- Accepts multiple textbooks and an optional syllabus for more precise papers
- pytest test suite for the generation logic
Screens.
Key screens, grouped by the flow they belong to.
Syllabus and Course Outcomes
Blueprint and Question Configuration
Textbook Ingestion and Chapter Selection
Paper Export and Evaluation Scheme
How it works.
From the problem to the decisions and trade-offs behind the build.
Overview
A local RAG system built as a 3-member team project that enables instructors to generate complete, balanced question papers with model answers directly from uploaded textbooks and optional syllabi without incurring API costs.
Problem
Setting a balanced question paper from textbooks by hand is slow and hard to keep aligned with Course Outcomes and Bloom's levels.
How It Works
Upload and parse the PDFs with PyMuPDF, retrieve the relevant text, prompt the local LLM through Ollama, and produce a structured paper with Course Outcome (CO) and Bloom's Taxonomy (BT) level per question.
Features
Upload one or more textbooks (and optionally a syllabus), choose mark presets (50-mark and 100-mark) and weightage distribution, tag every question with CO and BT levels, and generate model answers with test suite coverage.
Tech Stack
Python, Streamlit, Ollama, Llama 3.1 8B, PyMuPDF, RAG, and pytest.
My Contribution
Contributed as part of a 3-member team to build the local RAG pipeline, textbook parsing, prompt workflow with Ollama, and automated testing with pytest.