name: grading-assistant description: Grade student weekly summaries against a rubric. Extracts text from submissions (PDF/DOCX/PPTX), evaluates against lecture content and midterm key, and generates formatted reports with scores and feedback. Use when grading student weekly summaries for a course.
Grading Assistant
Grades student weekly summaries by extracting text, applying a rubric, and generating structured reports.
Workflow
Step 1: Collect Inputs
Ask these questions IN ORDER:
- Submission Folder Path: Where are the student submissions? (Required)
- Lecture PPT Path: Where is the lecture PPT file? (Required)
- PPT Page Range: Which slides for this week? (e.g., "22-44") (Required)
- Midterm File Path: Midterm key file? (Optional)
Step 2: Extract Content
Priority order: PPT → Midterm → Student Submissions
# 1. Extract PPT (MUST specify page range)
python3 ~/.gemini/antigravity/skills/grading-assistant/scripts/extract_ppt.py "<PPT>" <START> <END> > lecture_content.txt
# 2. Extract midterm (if provided)
[Use appropriate text extraction method]
# 3. Extract student submissions
python3 ~/.gemini/antigravity/skills/grading-assistant/scripts/process_submissions.py "<FOLDER>" > extracted_submissions.txt
Content Source Rules:
- PPT = Ground truth for this week's content
- Midterm = Identifies exam-relevant concepts
- Students = Reference only, do NOT derive coverage from them
Step 3: Propose Coverage → STOP
Generate proposed_coverage.md in the submission folder with 3-5 BIG concepts (not granular details).
How to identify Core Concepts:
- Extract from PPT (specified pages only) → list all topics
- Count student mentions → topics mentioned by most students = more "core"
- Group related topics → e.g., Isostasy, Airy Model, Local Isostasy, Glacial Rebound → all under "Isostasy"
- Include midterm reasoning → if midterm has reasoning about a concept, add it to that concept's description
Template:
# Proposed Coverage for [Week Name]
**Lecture Slides**: [START]-[END]
## Core Concepts (3-5 big concepts)
### 1. [Big Concept Name] (mentioned by X/Y students)
- Definition: [from PPT]
- Key sub-topics: [list related topics grouped here]
- Midterm reasoning: [if applicable, how this concept is tested]
### 2. [Big Concept Name] (mentioned by X/Y students)
...
## Midterm Terms/Reasoning (for scoring)
[Key terms from midterm that students should define/explain correctly]
[Student gets Midterm point if they demonstrate understanding of ANY of these]
Examples:
- Isostasy: lithosphere floats on asthenosphere; uniform pressure at depth
- Lithosphere: rigid outer part, T < 1300°C
- Asthenosphere: low viscosity mantle, T > 1300°C
- Moho: seismic velocity change at crust-mantle boundary
## Midterm-Relevant Facts (for TA hints ONLY)
[Specific values students must MEMORIZE - used for "I suggest you review..." hints]
[Student does NOT need these for Midterm point if they have Terms above]
✅ Facts to include:
- Oceanic crust thickness: 7 km
- Continental crust thickness: 40 km
- Lithosphere boundary: 1300°C
- Reference thicknesses: 21 km oceanic, 19 km continental
❌ Do NOT include:
- Densities (given in exam)
- Scaling ratios (derived in exam)
- Geological examples
Rules:
- Core Concepts = 3-5 big umbrella concepts, not 10+ granular items
- Student frequency determines which concepts are "core" (most mentioned = most core)
- Group related concepts under one big concept
- Midterm scoring = student gets 1 point if:
- ✅ Correctly defines/explains a Midterm Term, OR
- ✅ Includes a specific Midterm Fact
- TA hints = only use missing Facts for hints (not term definitions)
- NO separate "Quantitative Data" section
STOP and wait for user approval.
Step 4: Grade Each Student
⚠️ MANDATORY: Grade ALL students with FULL details. No exceptions.
Before Starting:
- Count total number of students from
extracted_submissions.txt - Create a checklist:
[ ] Student 1, [ ] Student 2, ... [ ] Student N - NEVER write "Summary evaluation for remaining students" - each student needs full table + comments
For EACH student (1 to N):
- Extract Evidence: Quote relevant passages from their submission
- Score Each Category: CRITICAL: You MUST use the exact decision rules in
references/rubric.md. Do not rely on assumptions or intuition.- Logic/Reasoning: Carefully check for logical consistency, conceptual accuracy, and typos. Do not be lazy. If there are typos, flag them. If concepts are incorrectly described, deduct points as per the rubric.
- Personal Interest: Remember that citing external references/literature explicitly counts toward this point.
- Midterm Relevance: You MUST check if the quantitative or reasoning content provided is explicitly related to this week's midterm material (as defined in
proposed_coverage.md). Do not just list random facts. If no midterm topics relate to their summary, explicitly state "No relevant topics found for this week's midterm" and automatically give them 1 point for the Midterm category.
- Write TA Comment: Follow template in
references/grading_report_template.md - Check off: Mark student complete in checklist
Batch Processing (for >10 students):
If there are more than 10 students, process in batches:
Batch 1: Students 1-10 → Write to report, save
Batch 2: Students 11-20 → Append to report, save
Batch 3: Students 21-N → Append to report, save
After each batch, verify the report file contains all graded students.
FORBIDDEN:
- ❌ "Summary evaluation for remaining students"
- ❌ "Detailed reports available upon request"
- ❌ Skipping any student
- ❌ Giving only statistics without individual scores
- ❌ Stopping before all N students have individual entries
Output Location:
- Output files go in the submission folder (the folder user provided, NOT inside the
submissions/subfolder) - File name:
{foldername}_grading_report.md
Report Structure:
- Summary Table (at TOP of report):
# Grade Summary
| Student | Coverage | Logic | Personal | Creativity | Midterm | Total | Brief Note |
|---------|----------|-------|----------|------------|---------|-------|------------|
| Name 1 | 4 | 3 | 1 | 2 | 1 | 11/11 | Excellent reasoning + research |
| Name 2 | 3 | 2 | 0 | 1 | 0 | 6/11 | Missing midterm terms, needs more personal connection |
...
- Individual Student Reports: Full score table + TA comments for each student
Final Check: Before finishing, verify report contains summary table + N individual student entries.
Step 5: Aggregate Questions
⚠️ IMPORTANT: Collect ALL questions from ALL students.
How to identify questions:
- Explicit questions: Sentences ending with
? - Implicit questions: Phrases like "I wonder...", "I'm curious about...", "I'd like to know..."
- Embedded questions: Questions within paragraphs (not just in a dedicated "Questions" section)
Process:
- Re-read each student's submission in
extracted_submissions.txt - Search for
?and question indicators - Include ALL questions, even if the student asked multiple questions
- Group by topic for the professor
Output format:
## Questions for Professor
### [Topic 1] (X questions)
- **[Student Name]**: [Question text]
- **[Student Name]**: [Question text]
### [Topic 2] (X questions)
- **[Student Name]**: [Question text]
...
Common issue to avoid:
- ❌ Only listing questions from students who have a "Questions:" section
- ✅ Finding questions embedded in paragraphs (e.g., "This makes me wonder: why does X happen?")
Verification step:
After identifying potential questions, verify each is a genuine question for the professor:
- ✅ Include: Questions the student genuinely wants answered
- ✅ Include: Curiosity-driven questions about the material
- ❌ Exclude: Rhetorical questions the student answers themselves
- ❌ Exclude: Quotes from lecture ("Professor asked: why...")
- ❌ Exclude: Self-answered questions ("Why does X happen? Because Y.")
Example questions to look for:
- "What exactly is the timescale for observing isostatic rebound?"
- "How can we apply our understanding of isostasy to analyzing plate movements?"
- "Why is Iceland 'on steroids'?"
- "How do geologists measure how deep into the asthenosphere..."
Key References
references/rubric.md: Detailed scoring criteria with decision tablesreferences/grading_report_template.md: TA comment structure and examples
Critical Rules
Grading Rules:
- Rubric: Use
references/rubric.mddecision tables, not memory - Coverage: Judge against
proposed_coverage.md(located in the submission folder), not absolute completeness - Off-topic submissions: If a submission covers topics NOT in the submission folder's
proposed_coverage.mdCore Concepts (i.e., content from a different week's lecture):- Give Coverage = 0
- Still grade ALL other categories normally (Logic/Reasoning, Personal Interest, Creativity, Midterm)
- Example: Student wrote about subduction zones instead of Isostasy → Coverage=0, but if their reasoning is good → Logic=3, if they asked questions → Creativity=1, etc.
- Logic & Accuracy Check: Be meticulous in checking for logical errors, conceptual misunderstandings, and typos.
- Personal Interest citations: Citing outside literature gets the Personal Interest point.
- Midterm Relevance: Midterm content must be relevant to the current week's topics. If you determine there are no relevant midterm topics to test them on based on their summary subject, explicitly output "No relevant topics found" and give them the 1 point anyway.
Text Extraction Failures:
- If
extracted_submissions.txtshows[TEXT EXTRACTION FAILED]for a student, useview_filetool to read the PDF directly from the path provided. - DO NOT give 0/10 for extraction errors without first trying to read the original PDF.
TA Comments (3 parts):
- Praise (always)
- Improvement (only if score < 7, never say "deducted")
- Study Hint (always: "To further perfect your understanding of this week's material, I suggest you review [topic]")
Forbidden Terms:
- "exam", "midterm", "test", "deducted", "lost points"
Formatting:
- Plain text only in TA comments (no bold/italic)
- Formulas in plain text (e.g.,
h/b = 1/7), no LaTeX