An AI-powered system that generates university-level exam question papers using modern AI techniques like RAG (Retrieval-Augmented Generation) and Agent-based logic.
- π§ Generate exam papers from syllabus input
- π― Difficulty control (Easy / Medium / Hard)
- π Automatic marks distribution (2, 5, 10 marks)
- π« Anna University-style question paper format
- π Auto total marks calculation
- π Export as PDF and DOCX
- π¨ Modern glassmorphism interface
-
User Input
- Subject, syllabus, difficulty, marks pattern
-
RAG (Retrieval-Augmented Generation)
- Extracts relevant topics using FAISS
-
AI Agent
- Decides paper structure (sections & marks)
-
LLM (Groq API)
- Generates structured question paper
-
Export Tools
- Converts output to PDF and DOCX
- Frontend: Streamlit
- Backend: Python
- AI Model: Groq (Llama 3.1)
- RAG: FAISS + SentenceTransformers
- PDF: FPDF
- DOCX: python-docx
exam_generator/
βββ app.py
βββ config.py
β
βββ rag/
β βββ rag_engine.py
β
βββ agent/
β βββ planner.py
β
βββ llm/
β βββ generator.py
β
βββ tools/
β βββ pdf_tool.py
β βββ docx_tool.py
β
βββ .env
βββ requirements.txt
git clone https://github.com/yourusername/ai-exam-generator.git
cd ai-exam-generatorpython -m venv venv
venv\Scripts\activate # Windowspip install -r requirements.txtCreate a .env file in the root directory:
GROQ_API_KEY=your_api_key_here
streamlit run app.py- Enter subject and syllabus
- Select difficulty level and total marks
- Provide exam details (year, time, duration)
- Click Generate Question Paper
- Download as PDF or DOCX
- π€ Combines RAG + Agent + LLM for intelligent generation
- π Real-world education use case
- ποΈ Clean and scalable architecture
- π¨ Interactive UI with modern design
.envfile is excluded from version control via.gitignore- API keys are never exposed in the codebase
Priyadharshini V
Computer Science Engineering Student
- π Question difficulty tuning slider
- π§ Save & history of generated papers
- π Deploy as a web app
- π Voice-based input