Quiz Me banner
lfnovo lfnovo

Quiz Me

Development community

Description

A simple library to extract questions from any content / prompt for studying and learning purposes

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

quiz-me

AI-powered question generation library using Langgraph flows. Generate high-quality educational questions from content or topics with optional AI supervision.

Features

  • Single & Multi-Question Generation - Generate one or multiple questions from content or topics
  • Three Question Types - Multiple choice, open-ended (with grading rubric), and fill-in-the-blank
  • Optional AI Supervision - A second model reviews and validates generated questions
  • Question Improvement - Regenerate questions based on user feedback
  • Multi-Language Support - Generate questions in any language
  • Automatic Retry Logic - Retries on validation errors or supervision rejection
  • Domain-Specific Instructions - Customize generation and supervision for your domain
  • LangChain Compatible - Works with any LangChain-compatible model

Installation

pip install quiz-me

Or with uv:

uv add quiz-me

Quick Start

from quiz_me import generate_question, SingleQuestionConfig, QuestionType

# Use any LangChain-compatible model
from langchain_openai import ChatOpenAI
model = ChatOpenAI(model="gpt-4o-mini")

# Generate a multiple choice question
config = SingleQuestionConfig(
    content="Python is a high-level programming language...",
    question_type=QuestionType.MULTIPLE_CHOICE,
    generator_model=model,
)

result = await generate_question(config)
print(result.question.statement)
print(result.question.alternatives)
print(result.question.correct_answer)

Topic-Based Generation

Generate questions from a topic using the model's knowledge (no content required):

config = SingleQuestionConfig(
    topic="The French Revolution and its impact on European politics",
    question_type=QuestionType.MULTIPLE_CHOICE,
    generator_model=model,
)

result = await generate_question(config)

Multi-Question Generation

from quiz_me import generate_questions, MultiQuestionConfig, QuestionTypeMix

con