This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "student_name": "Alex Johnson", | |
| "student_id": "DS2024-999", | |
| "exam_date": "2024-11-30", | |
| "submission_timestamp": "2024-11-30T14:30:00", | |
| "answers": [ | |
| { | |
| "question_number": 1, | |
| "student_answer": "Filtered ecommerce_sales.csv for category='Electronics' and dates in Q4 2024 (Oct-Dec). Calculated revenue as quantity × unit_price for each order, then summed. Found 17 orders totaling $9,149.76. $9,149.76", | |
| "work_shown": "Filtered ecommerce_sales.csv for category='Electronics' and dates in Q4 2024 (Oct-Dec). Calculated revenue as quantity × unit_price for each order, then summed. Found 17 orders totaling $9,149.76." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "student_name": "Alex Johnson", | |
| "exam_date": "2024-11-30", | |
| "total_questions": 1, | |
| "total_points_earned": 10.0, | |
| "total_points_possible": 10, | |
| "percentage": 100.0, | |
| "letter_grade": "A", | |
| "question_results": [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Main Entry Point for LLM Grading System | |
| ======================================== | |
| Command-line interface for grading student submissions. | |
| """ | |
| import argparse | |
| import json | |
| import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import pandas as pd | |
| from pathlib import Path | |
| from typing import Dict, List, Optional, Any | |
| class GradingTools: | |
| """Collection of tools for the LLM grader to access data and resources.""" | |
| def __init__(self, data_dir: str = "data"): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pydantic import BaseModel, Field, validator | |
| from typing import List, Optional, Literal | |
| from enum import Enum | |
| class QuestionType(str, Enum): | |
| """Types of questions on the exam""" | |
| CALCULATION = "calculation" | |
| ANALYSIS = "analysis" | |
| INTERPRETATION = "interpretation" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SYSTEM_PROMPT = """You are an expert Data Science instructor and grader with 10+ years of experience evaluating student work. | |
| Your role is to grade student exam submissions fairly, accurately, and with detailed feedback. You must: | |
| 1. Be objective and consistent in your grading | |
| 2. Always verify calculations against the actual datasets | |
| 3. Award partial credit for correct methodology even if the final answer is wrong | |
| 4. Provide specific, actionable feedback that helps students learn | |
| 5. Reference exact data points when explaining errors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SYSTEM_PROMPT = """You are an expert Data Science instructor and grader with 10+ years of experience evaluating student work. | |
| Your role is to grade student exam submissions fairly, accurately, and with detailed feedback. You must: | |
| 1. Be objective and consistent in your grading | |
| 2. Always verify calculations against the actual datasets | |
| 3. Award partial credit for correct methodology even if the final answer is wrong | |
| 4. Provide specific, actionable feedback that helps students learn | |
| 5. Reference exact data points when explaining errors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| # Load the test file | |
| with open('data/test.json', 'r') as f: | |
| test_data = json.load(f) | |
| # Display a few example questions | |
| print("📝 EXAMPLE QUESTIONS FROM THE EXAM\n") | |
| print("="*70) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 📝 EXAMPLE QUESTIONS FROM THE EXAM | |
| ====================================================================== | |
| 🔹 Section A: E-COMMERCE ANALYSIS | |
| Dataset: ecommerce_sales.csv | |
| Question 1 (10 points): | |
| What is the total revenue generated from the "Electronics" category in Q4 2024? Show your calculation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 📝 EXAMPLE QUESTIONS FROM THE EXAM | |
| ====================================================================== | |
| 🔹 Section A: E-COMMERCE ANALYSIS | |
| Dataset: ecommerce_sales.csv | |
| Question 1 (10 points): | |
| What is the total revenue generated from the "Electronics" category in Q4 2024? Show your calculation. |
NewerOlder