ai-quizgenie avatar
ai-quizgenie

Under maintenance

Pricing

Pay per event

Go to Store
ai-quizgenie

ai-quizgenie

Under maintenance

Developed by

Balaji Seetharaman

Balaji Seetharaman

Maintained by Community

ai-quizgenie is an Apify Actor that extracts content from webpages and PDFs to generate multiple-choice quiz questions (MCQs) using LLMs (GPT-3.5, GPT-4, etc.).

0.0 (0)

Pricing

Pay per event

0

Total users

4

Monthly users

4

Runs succeeded

0%

Last modified

3 months ago

AI Quiz Genie – Generate AI-Powered Quizzes

ai-quizgenie is an Apify Actor that extracts content from webpages and PDFs to generate multiple-choice quiz questions (MCQs) using LLMs (GPT-3.5, GPT-4, etc.).

Supports Web & PDF Extraction
Dynamic Model Selection (GPT-3.5, GPT-4, etc.)
LangGraph for Workflow Automation
Apify-Compatible for Deployment


📂 Project Structure

/ai-quizgenie/
│── src/
│ ├── __main__.py # Executes main.py
│ ├── main.py # Apify Actor Execution and Langgraph flow
│ ├── tools.py # Web & PDF Extraction
│ ├── utils.py # Quiz Generation Logic
│ ├── models.py # Pydantic Schema
│── dataset_schema.json # Defines Output Format
│── requirements.txt # Python Dependencies
│── Dockerfile # Containerized Deployment
│── input.json # Example Input
│── README.md # Documentation

🛠 Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/yourusername/ai-quizgenie.git
cd ai-quizgenie

2️⃣ Install Dependencies

$pip install -r requirements.txt

3️⃣ Set API Keys (Optional)

If using OpenAI, set your API keys:

export OPENAI_API_KEY="your-api-key-here"
export OPENAI_API_BASE="your-base-url"

🚀 Running the Actor Locally

Run with Sample Input

$apify run -i input.json

Example input.json

{
"url": "https://en.wikipedia.org/wiki/Artificial_intelligence",
"num_questions": 5,
"difficulty": "Medium",
"model": "gpt-4-turbo"
}

🔧 How It Works

  1. Extracts content from webpage/PDF
  2. Uses LLM to generate quiz questions
  3. Outputs structured MCQs in JSON format

📜 Example Output (dataset_schema.json)

{
"model": "gpt-4-turbo",
"questions": [
{
"question": "Who is considered the father of AI?",
"options": ["Alan Turing", "John McCarthy", "Geoffrey Hinton", "Yann LeCun"],
"answer": "John McCarthy",
"explanation": "John McCarthy coined the term 'Artificial Intelligence' in 1956."
}
]
}

📦 Deploying to Apify

1️⃣ Push to Apify

$apify push

2️⃣ Run on Apify Cloud

$apify call ball-ceg/ai-quizgenie -i input.json

📜 Customization

  • Modify input.json to change the difficulty, number of questions, or LLM model
  • Edit utils.py to tweak the quiz generation prompt
  • Extend graph.py to add more processing steps

🤝 Contributing

Want to improve AI QuizGenie? Open a PR or suggest features! 🚀


Apify Screenshots

Screenshot 2025-03-07 at 9 43 06 PM
Screenshot 2025-03-07 at 9 39 04 PM
Screenshot 2025-03-07 at 9 41 08 PM