Practice Question Generator
Generate comprehensive practice questions from lecture notes to test student understanding of learning objectives and key concepts.
Input
Supported formats: LaTeX (.tex), PDF, Markdown (.md), plain text (.txt)
PDF: Use pdfplumber for text extraction
LaTeX: Read as text, strip preamble (everything before \begin{document}), preserve math environments ($...$, \[...\], \begin{equation}, etc.)
Markdown/Text
Content to extract:
- Learning objectives - Usually at beginning: "After this lecture, you should be able to..." or may be in section: "Learning Outcomes","Objectives", "Goals". If absent, derive from main topics.
- Main topics - Section headings, bold terms, definitions, algorithms.
- Examples - Use for realistic scenarios in questions.
Question Structure
Generate questions in this order:
- True/False (one per learning objective, or 3-5 if no objectives)
- Explanatory Questions (3-5 covering main topics)
- Coding Question (1 algorithm implementation or concept simulation)
- Use Case (1 realistic application)
For each question type, follow guidelines below. Do not include an answer key — students need to arrive at answers independently, and providing one on the same document defeats the purpose of self-testing.
Question Guidelines
Type 1: True/False
Test factual understanding and common misconceptions.
Coverage:
- One per learning objective, or 3-5 covering main topics if no objectives
Difficulty progression:
- Start with 1-2 simple definitional questions
- Include 2-3 reasoning-based questions requiring concept application or testing relationships between concepts
Quality criteria:
- Unambiguous with one correct interpretation
- Clear language without complex nested clauses
- Answer directly found in lecture notes
- Wrong answer reveals common misconception
Examples:
- Easy: "In supervised learning, the training data includes both input features and their corresponding labels."
- Medium: "A model with high training accuracy but low test accuracy is likely underfitting the data."
Type 2: Explanatory Questions
Test deeper understanding by requiring students to articulate concepts, compare approaches, and explain reasoning.
Topic selection:
- Choose 3-5 main topics (key algorithms and their implementations, Advantages/limitations of approaches, Relationships between concepts)
- Avoid repetition: If topic appears in T/F, ask about a different aspect
Question formulations:
- "Explain..." - requires description in student's words
- "Compare and contrast..." - tests understanding of differences
- "Why does..." - tests causal reasoning
- "What are the advantages/disadvantages..." - tests critical analysis
- "Describe the steps..." - tests procedural knowledge
Quality criteria:
- Open-ended but focused
- Cannot be answered with simple yes/no
- Requires 3-5 sentences to answer well
Examples:
- "Explain the bias-variance tradeoff. How does increasing model complexity affect bias and variance?"
- "Compare K-Nearest Neighbors and Decision Trees in terms of decision boundaries, training time, and prediction time."
Type 3: Coding Question
Test practical implementation through code.
Scope:
- Implementation of an algorithm discussed in lecture
- Simulation of a concept or process
- Must be achievable with lecture knowledge only
- Should take 15-30 minutes for prepared student
Required structure:
- Clear objective
- Step-by-step instructions (3-5 steps)
- Function signature (if applicable)
- Expected behavior with input/output examples
- Hints (optional but helpful)
Language:
- Python (default) with standard library.
- If using external libraries: NumPy, pandas, matplotlib, scikit-learn.
- Should not require advanced Python features
Type 4: Use Case Question
Test ability to apply concepts or algorithms explained in lecture notes to realistic scenarios.
Components:
- Context - Realistic scenario description
- Data description - What data is available (provide generation code if needed)
- Task - What needs accomplishment
- Constraints (optional) - Time, space, accuracy requirements
- Hints (2-3) - Guidance without giving solution
- Libraries - Can use scikit-learn, pandas, NumPy
Data generation: If needed, provide simple, clear code to generate appropriate data.
Output Format Guidelines
Output format depends on user request (LaTeX, PDF, Markdown, plain text).
General structure for all formats:
- Title with document name
- Instructions section
- Part 1: True/False Questions (numbered sequentially)
- Part 2: Explanatory Questions (numbered sequentially)
- Part 3: Coding Question (with steps, signature, examples, hints)
- Part 4: Use Case Application (with scenario, data, task, requirements, hints)
For specific formats:
- If the user requests LaTeX output, read
assets/questions_template.tex before generating — use it as the document skeleton.
- If the user requests Markdown output, read
assets/markdown_template.md before generating — use it as the document skeleton.
- For plain text, no template is needed.
Supporting Resources
References (in references/ folder):
examples_by_topic.md — Domain-specific question examples for ML topics (algorithms, preprocessing, evaluation, linear algebra, etc.). Read this file if the lecture covers any ML topic to get calibrated examples before generating questions. Note: this file covers ML only — skip it for non-ML lectures (history, biology, economics, etc.).
1---2name: generating-practice-questions3description: Generates structured practice questions (True/False, explanatory, coding, use case) from lecture notes, slides, or any educational document. Use this skill whenever a user wants to quiz themselves or students, create exam prep materials, make study guides, or turn any lecture content into a question set — regardless of phrasing or output format. Trigger on phrases like "make practice questions from my notes", "quiz me on this lecture", "create exam prep from my slides", "I need to test my students on this chapter", or any request to turn educational content into questions.4---56# Practice Question Generator78Generate comprehensive practice questions from lecture notes to test student understanding of learning objectives and key concepts.910## Input 1112**Supported formats**: LaTeX (.tex), PDF, Markdown (.md), plain text (.txt)1314- **PDF**: Use `pdfplumber` for text extraction1516- **LaTeX**: Read as text, strip preamble (everything before `\begin{document}`), preserve math environments (`$...$`, `\[...\]`, `\begin{equation}`, etc.)1718- **Markdown/Text**1920**Content to extract**:21221. **Learning objectives** - Usually at beginning: "After this lecture, you should be able to..." or may be in section: "Learning Outcomes","Objectives", "Goals". If absent, derive from main topics.232. **Main topics** - Section headings, bold terms, definitions, algorithms.243. **Examples** - Use for realistic scenarios in questions.2526## Question Structure2728Generate questions in this order:29301. **True/False** (one per learning objective, or 3-5 if no objectives) 312. **Explanatory Questions** (3-5 covering main topics)323. **Coding Question** (1 algorithm implementation or concept simulation)334. **Use Case** (1 realistic application)3435For each question type, follow guidelines below. Do not include an answer key — students need to arrive at answers independently, and providing one on the same document defeats the purpose of self-testing.3637## Question Guidelines3839### Type 1: True/False4041Test factual understanding and common misconceptions.4243**Coverage**:4445- One per learning objective, or 3-5 covering main topics if no objectives4647**Difficulty progression**:4849- Start with 1-2 simple definitional questions50- Include 2-3 reasoning-based questions requiring concept application or testing relationships between concepts5152**Quality criteria**:5354- Unambiguous with one correct interpretation55- Clear language without complex nested clauses56- Answer directly found in lecture notes57- Wrong answer reveals common misconception5859**Examples**:6061- *Easy*: "In supervised learning, the training data includes both input features and their corresponding labels."62- *Medium*: "A model with high training accuracy but low test accuracy is likely underfitting the data."6364### Type 2: Explanatory Questions6566Test deeper understanding by requiring students to articulate concepts, compare approaches, and explain reasoning.6768**Topic selection**:6970- Choose 3-5 main topics (key algorithms and their implementations, Advantages/limitations of approaches, Relationships between concepts)71- Avoid repetition: If topic appears in T/F, ask about a *different aspect*7273**Question formulations**:7475- "Explain..." - requires description in student's words76- "Compare and contrast..." - tests understanding of differences77- "Why does..." - tests causal reasoning78- "What are the advantages/disadvantages..." - tests critical analysis79- "Describe the steps..." - tests procedural knowledge8081**Quality criteria**:8283- Open-ended but focused84- Cannot be answered with simple yes/no85- Requires 3-5 sentences to answer well8687**Examples**:8889- "Explain the bias-variance tradeoff. How does increasing model complexity affect bias and variance?"90- "Compare K-Nearest Neighbors and Decision Trees in terms of decision boundaries, training time, and prediction time."9192### Type 3: Coding Question9394Test practical implementation through code.9596**Scope**:9798- Implementation of an algorithm discussed in lecture99- Simulation of a concept or process100- Must be achievable with lecture knowledge only101- Should take 15-30 minutes for prepared student102103**Required structure**:1041051. Clear objective1062. Step-by-step instructions (3-5 steps)1073. Function signature (if applicable)1084. Expected behavior with input/output examples1095. Hints (optional but helpful)110111**Language**:112113- Python (default) with standard library.114- If using external libraries: NumPy, pandas, matplotlib, scikit-learn.115- Should not require advanced Python features116117### Type 4: Use Case Question118119Test ability to apply concepts or algorithms explained in lecture notes to realistic scenarios.120121**Components**:1221231. **Context** - Realistic scenario description1242. **Data description** - What data is available (provide generation code if needed)1253. **Task** - What needs accomplishment1264. **Constraints** (optional) - Time, space, accuracy requirements1275. **Hints** (2-3) - Guidance without giving solution1286. **Libraries** - Can use scikit-learn, pandas, NumPy129130**Data generation**: If needed, provide simple, clear code to generate appropriate data.131132## Output Format Guidelines133134Output format depends on user request (LaTeX, PDF, Markdown, plain text).135136**General structure for all formats**:1371381. Title with document name1392. Instructions section1403. Part 1: True/False Questions (numbered sequentially)1414. Part 2: Explanatory Questions (numbered sequentially)1425. Part 3: Coding Question (with steps, signature, examples, hints)1436. Part 4: Use Case Application (with scenario, data, task, requirements, hints)144145**For specific formats**:146- If the user requests **LaTeX output**, read `assets/questions_template.tex` before generating — use it as the document skeleton.147- If the user requests **Markdown output**, read `assets/markdown_template.md` before generating — use it as the document skeleton.148- For plain text, no template is needed.149150## Supporting Resources151152**References** (in `references/` folder):153154- `examples_by_topic.md` — Domain-specific question examples for ML topics (algorithms, preprocessing, evaluation, linear algebra, etc.). Read this file if the lecture covers any ML topic to get calibrated examples before generating questions. Note: this file covers ML only — skip it for non-ML lectures (history, biology, economics, etc.).