Skip to content

prajjwalbajpai/exam_helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Exam Helper

A powerful exam preparation assistant that allows students to upload their notes in the form of PDF, DOCX, or PPTX documents, submit multiple previous year questions in a single batch, and receive context-aware, accurate answers and a list of important topics using Retrieval-Augmented Generation (RAG) with LLMs.

πŸš€ Key Features

  • Multi-Document Upload: Supports PDF, DOCX, and PPTX formats.
  • Multi-Question Input: Add multiple previous year questions at once β€” answers are batch-processed for speed and clarity.
  • RAG Pipeline: Embeds documents using open-source models (e.g. bge-base-en), stores them in a vector store using langgraph's InMemoryStore, and retrieves context based on the questions.
  • LLM Integration: Uses Groq + llama-3.1-8b-instant for grounded answer generation while using the context provided by RAG.
  • Important Topics: Extracts most frequently occuring topics from the answers and displays a concise summary.
  • Automatic Cleanup: All uploaded files are removed after processing to keep your workspace clean.

πŸ’» Technologies Used

  • Frontend - HTML, CSS, JS
  • Backend - Flask(Python), RAG Pipeline
  • LLM Stack - LangChain, Groq, HuggingFace Embeddings

πŸ“¦ File Structure

rag-project/
β”œβ”€β”€ app.py                      # Flask app entry point
β”œβ”€β”€ .env                        # API key (not tracked by Git)
β”œβ”€β”€ uploads/                    # Temporary upload folder (auto-cleaned)
β”œβ”€β”€ templates/
β”‚   └── index.html              # Frontend HTML
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ css/style.css           # Custom dark theme styles
β”‚   └── js/script.js            # AJAX + DOM updates
β”œβ”€β”€ llm_utils/
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── pipeline.py             # RAG + embedding logic
└── requirements.txt            # Python dependencies

βš™οΈ Local Setup Instructions

  1. Clone the repository:
git clone https://github.com/your-username/rag-doc-qa.git
cd rag-doc-qa
  1. Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate  # For Windows: venv\Scripts\activate
pip install -r requirements.txt
  1. Set up your .env file:
GROQ_API_KEY=your_groq_key_here
  1. Run the app:
flask run

πŸ“¬ Future Enhancements

  • Generate important questions based on previous year papers
  • Add handwritten notes support with OCR
  • Add multi-user session support
  • Enable document history and downloads
  • Summarization refinement via separate LLM
  • Deploy to cloud

πŸ“Έ Working Images

An example use case (I have used notes for my Mechanical Engineering Course):

Notes Upload Interface

Answer and Summary

Answers and Summary

About

An exam preparation assistant. πŸŽ“

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published