Skip to content

ReZaiden/Question-Designer-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Question Designer Agent --- AI-Powered Educational Question Generator

Python OpenAI Agents PDF DOCX Pydantic PyYAML

A powerful AI-driven question generation system that uses a modular Agent-based architecture to analyze educational resources (PDF, text, and more) and automatically generate structured questions in multiple difficulty levels, with output formats in PDF and DOCX.

🎯 Ideal for teachers, educational content creators, exam designers, and intelligent learning platforms.

🚀 Features

  • 🧠 Automatic user request analysis
  • 📚 PDF resource management
  • ✨ Question generation (Easy / Medium / Hard)
  • 📝 Export to DOCX and PDF
  • 🧩 Modular Agent architecture
  • 🔍 Page number extraction from sources
  • 🧪 Full pytest-based test suite
  • 🧾 Comprehensive logging

🧠 System Architecture

Agents

  • User Request Agent -- Understands user input
  • Source Manager Agent -- Loads and manages PDF sources
  • Question Designer Agent -- Generates structured questions
  • Markdown & Document Agent -- Creates PDF and DOCX outputs

🧱 Tech Stack

Technology Description


Python Core language OpenAI LLM Content generation python-docx DOCX creation ReportLab PDF generation Pydantic Validation layer PyYAML Config management pytest Testing framework

⚙️ Prerequisites

  • Python 3.8+\
  • OpenAI API Key\
  • PDF files inside the sources/ directory

🛠️ Installation

git clone https://github.com/yourusername/QuestionDesignerAgent.git
cd QuestionDesignerAgent
pip install -r requirements.txt

🗝️ Edit .env file

  1. Rename .env.sample file to .env
  2. Put your environment variables to it(like AI_API_KEY)

▶️ Run the Project

python app.py

and then go to http://localhost:7860

🧩 Project Structure

app.py
agent/
├── base.py # Core classes for create agent
├── user_request_agent.py
├── source_manager_agent.py
├── question_designer_agent.py
└── markdown_document_agent.py
schemas/ # Schemas for data validation
tools/ # Tools for agents
utils/ # Built-in modeul and functions
sources/ # Directory for saving sources
questions/ # Directory for saving generated questions
logs/ # Log files
tests/ # Test cases
config.yaml # General configuration file(you can edit it)
.env.sample # Sample env file

🔒 Security Notes

  • Keep API keys inside .env\
  • Change values in config.yaml

💡 Future Improvements

  • Admin dashboard\
  • FastAPI-powered web service\
  • Database support\
  • Vector-based PDF search

🧑‍💻 Author

Developed by: ReZaiden 💼 GitHub: @ReZaiden
📧 Contact: rezaidensalmani@gmail.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages