ExamPulse AI: Past-Paper Pattern Analyzer & Study Assistant
Inspiration
I am currently pursuing my undergraduate in computer science. So each semester i face a problem that keeps me overthinking: "What will actually appear on the final exam?"
To prepare, i typically spend hours manually flipping through 3 to 5 years of past exam papers, trying to decipher which chapters appear every year and which questions are cyclical. However, manual revision has huge blind spots:
- It is time-consuming and unstructured.
- Diagram-heavy questions (graphs, trees, circuits) and scanned question photos are hard to catalog.
- Then i endup preparing with unstructured way.
So i built ExamPulse AI to automate this entire process—giving students data-backed clarity on what to study, saving hours of manual prep, and boosting exam confidence.
What It Does
ExamPulse AI is a multimodal AI study assistant and dashboard that:
- Ingests Any Format: Accepts digital PDFs, plain text, and smartphone photos/scans (
.png,.jpg,.jpeg,.webp). - Understands Diagrams & Multimodal Questions: Natively recognizes charts, binary trees, flowcharts, and circuit diagrams using Gemini Vision.
- Identifies Repeating Patterns: Computes exact topic frequency, coverage percentages, and year-over-year heatmaps.
- Predicts Upcoming Exam Topics: Generates data-backed predictions for the next exam (rated High, Medium, or Low probability) with detailed rationale.
- Generates Instant Model Answers: Produces examiner-grade model answers and key evaluation bullet points for any recurring or predicted question.
How I Built It
I structured the application as a 4-stage hybrid AI & data analysis pipeline:
- Multimodal Ingestion (
extractor.py): Handles MIME classification, best-effort digital text extraction usingpypdf, and automatic year deduction from filenames via regex. - Structured Vision Parsing (
analyzer.py): Sends raw document bytes and images directly to Google's Gemini 3.5 Flash-Lite multimodal API. I enforce strict JSON output using Pydantic schemas (response_mime_type="application/json") to categorize each question into:- Question summary & normalized topic name
- Question type (Theory, Numerical, Coding, Case Study)
- Diagram flag (
has_diagram) and visual description (diagram_description)
- Quantitative Pattern Engine (
pandas): Calculates exact statistics across past exam sessions: $$\text{Topic Share (\%)} = \left( \frac{\text{Questions on Topic}}{\text{Total Questions Analyzed}} \right) \times 100$$ $$\text{Year Coverage (\%)} = \left( \frac{\text{Years Topic Appeared}}{\text{Total Exam Years}} \right) \times 100$$ Topics are algorithmically classified into:Every Year,Recurring,Recent Focus, orOccasional. - Interactive Dashboard (
app.py): Built in pure Python with Streamlit and Plotly. Features KPI metric cards, an interactive topic heatmap, expandable model answers with session caching, and an instant Markdown study guide export.
Challenges I Faced & How I Resolved Them (AI-Assisted)
Building a production-ready multimodal pipeline revealed several non-trivial engineering hurdles :
- Model Deprecation & High Traffic (503 / 429 Errors):
Early iterations hit
404 NOT_FOUNDfor deprecated model aliases and repeated503 UNAVAILABLEerrors during peak global demand ongemini-3.8-flash. After facing repeated API failures across different model options, I used an AI coding assistant to run real-time diagnostic benchmarks on my active account quotas. Based on the benchmark data, I directed the implementation of an automated model fallback system with exponential backoff and selectedgemini-3.5-flash-lite, which brought response times down to under 3 seconds while ensuring 100% uptime. - SDK Retry Hangs: Underlying API retry loops caused the dashboard to freeze for minutes when free-tier quotas were exhausted. I isolated the bottleneck by running standalone Python integration tests outside of Streamlit and reconfigured the retry logic to decouple API calls, keeping the dashboard responsive.
- Parsing Diagrams Without Heavy OCR Libraries:
Traditional OCR engines failed to parse non-text structures like weighted graphs, binary trees, and flowcharts. Instead of bloating the app with heavy local OCR dependencies, I re-architected the ingestion pipeline to leverage Gemini's native multimodal vision capabilities, passing raw image and PDF bytes directly via
types.Part.from_bytes()for holistic visual understanding. - Zero-Dependency Markdown Export:
During report export,
pandas.to_markdown()crashed due to an uninstalled optionaltabulatelibrary. Rather than introducing additional system dependencies that could complicate cloud deployment, I replaced it with a custom, pure-Python table generator to keep the application lightweight and deployment-ready.
Accomplishments that i'm proud of
- Built a Complete End-to-End Pipeline: Seamlessly connected multimodal ingestion, structured AI extraction, Pandas statistical analysis, and an interactive Streamlit UI in a single lightweight app.
- Multimodal Diagram Recognition: Successfully recognized and summarized visual exam questions containing graphs, trees, and charts from both PDFs and uploaded images without heavy OCR libraries.
- Sub-3-Second AI Processing: Optimized model selection with
gemini-3.5-flash-liteand strict Pydantic JSON schemas, achieving reliable structured parsing in under 3 seconds per paper. - Zero Hallucination Numbers: Combined deterministic Pandas math for exact frequency metrics with Gemini's qualitative reasoning, ensuring trends and predictions are grounded in real data.
- Cloud-Ready & Privacy-Conscious: Implemented a secure key hierarchy (
Streamlit Secrets$\rightarrow$.env$\rightarrow$ UI input) with built-in sample papers so anyone can test the app with zero setup.
What I Learned
- Structured Outputs are Essential: Enforcing Pydantic schemas eliminates prompt fragility and prevents hallucinated schemas, turning an LLM into a reliable API endpoint.
- Multimodal AI Beats Traditional OCR: Modern vision models can understand the semantic meaning of diagrams and charts far better than traditional bounding-box OCR tools.
- Hybrid Pipelines Work Best: Combining quantitative math (Pandas) with qualitative reasoning (Gemini) produces far more trustworthy predictions than asking an LLM to guess numbers on its own.
What's Next for ExamPulse AI
- Syllabus Cross-Referencing: Uploading course syllabi alongside past papers to highlight untouched topics.
- Custom Flashcard & Quiz Mode: Automatically generating interactive multiple-choice practice quizzes from predicted topics.
- Multi-University Benchmarking: Aggregating question patterns across different universities for standardized national exams.
Built With
- ai-study-assistant
- computer-vision
- data-analysis
- data-visualization
- document-processing
- edtech
- gemini-api
- generative-ai
- git
- github
- google-gemini
- google-genai
- large-language-models
- multimodal-ai
- pandas
- pattern-recognition
- pdf-extraction
- plotly
- predictive-analytics
- pydantic
- pypdf
- python
- statistical-analysis
- streamlit
- streamlit-cloud