Back to projects
CASE STUDY · PYTHON · LOCAL RAG · TEAM PROJECT

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.

Question Paper Generator
TECHNOLOGIES
PythonStreamlitOllamaLlama 3.1PyMuPDFRAGpytest
KEY FEATURES
  • Local LLM
  • CO and Bloom's mapping
  • Model answers
  • Multi-textbook input
RESULTS
  • 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
THE INTERFACE

Screens.

Key screens, grouped by the flow they belong to.

Syllabus and Course Outcomes

Course / Learning Outcomes: Upload syllabus scheme or paste directly to parse COs and unit modules.

Blueprint and Question Configuration

Question Paper Blueprint: Configure 50 or 100-mark presets, sub-question structure, and live mark balancing across units.

Textbook Ingestion and Chapter Selection

Document Ingestion: Upload multiple textbooks, view extracted text chunks, and select target chapters.

Paper Export and Evaluation Scheme

Export Formatted Paper: Generate exam-ready student copies and comprehensive faculty master copies with model answers and evaluation schemes.
UNDER THE HOOD

How it works.

From the problem to the decisions and trade-offs behind the build.

01

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.

02

Problem

Setting a balanced question paper from textbooks by hand is slow and hard to keep aligned with Course Outcomes and Bloom's levels.

03

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.

04

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.

05

Tech Stack

Python, Streamlit, Ollama, Llama 3.1 8B, PyMuPDF, RAG, and pytest.

06

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.

KEEP EXPLORINGNext projectAlgoLens
View source on GitHub