Natarajan-Networks/grading-env
EduEval โ Automated Answer Sheet Grading Environment
An OpenEnv-compatible reinforcement learning environment for training and evaluating AI agents on automated answer sheet grading tasks.
๐ฏ Motivation
Manual grading of student answer sheets is time-consuming, inconsistent, and does not scale. EduEval provides a structured RL environment where an AI agent learns to grade three distinct types of student answers โ factual, conceptual, and essay โ matching human expert graders across varying complexity levels.
๐ Environment Description
EduEval simulates a real-world educational grading pipeline with 3 distinct grading tasks. Each task requires a different grading strategy:
- Task 1 (Factual): Objective questions with clear right/wrong answers
- Task 2 (Conceptual): Questions requiring partial credit based on concept coverage
- Task 3 (Essay): Complex descriptive answers requiring holistic evaluation
Each episode randomly selects 3 questions from a pool of 10, making every episode unique and preventing overfitting.
๐ Action Space
๐๏ธ Observation Space
๐ Tasks
Task 1 โ Factual Grading (Easy)
Grade objective factual questions with clear right or wrong answers. The agent must identify whether the student answer matches the correct answer and award full or zero marks with strict accuracy.
Example:
- Question: "What is the chemical formula for water?"
- Student Answer: "H2O"
- Expected Mark: 1.0
Task 2 โ Conceptual Grading (Medium)
Grade concept-based answers requiring partial credit scoring. The agent must evaluate how well the student covers key concepts and award graduated marks based on concept coverage.
Example:
- Question: "Explain how vaccines work."
- Student Answer: "Vaccines introduce weak viruses so the immune system learns to fight them."
- Expected Mark: 0.8 (covers main idea but misses immunological memory)
Task 3 โ Essay Grading (Hard)
Grade complex descriptive essays requiring holistic evaluation of content accuracy, concept coverage, and critical analysis depth.
Example:
- Question: "Critically analyze the impact of the Industrial Revolution."
- Student Answer: "The Industrial Revolution changed working conditions and urbanization..."
- Expected Mark: 0.65 (partial coverage, lacks critical analysis depth)
๐ Reward Functions
Task 1 โ Factual (Strict)
Task 2 โ Conceptual (Graduated)
Task 3 โ Essay (Holistic)
All tasks include:
- Penalty of -0.4 for extreme over-grading
- Penalty of -0.4 for extreme under-grading
- Bonus of up to +0.1 for semantic signal alignment
- Bonus of +0.05 for consecutive accurate gradings
๐ Setup & Usage
Run locally
git clone https://github.com/natarajannetworks/edueval-grading-env
cd edueval-grading-env
pip install -r requirements.txt
set PYTHONPATH=src # Windows
# export PYTHONPATH=src # Linux/Mac
uvicorn src.envs.grading_env.server.app:app --reloadRun inference
export HF_TOKEN=your_huggingface_token
export API_BASE_URL=https://router.huggingface.co/v1
export MODEL_NAME=Qwen/Qwen2.5-72B-Instruct
python inference.pyRun with Docker
docker build -t edueval .
docker run -p 7860:7860 -e HF_TOKEN=your_token edueval๐ Baseline Scores
Scores from running inference.py with Qwen/Qwen2.5-72B-Instruct:
๐ API Endpoints
๐๏ธ Project Structure
edueval-grading-env/
โโโ inference.py # Baseline inference script
โโโ Dockerfile # Container configuration
โโโ requirements.txt # Python dependencies
โโโ openenv.yaml # OpenEnv metadata
โโโ src/
โโโ data/sample_papers/ # Question banks (10 questions each)
โ โโโ task1_easy.json # Factual questions
โ โโโ task2_medium.json # Conceptual questions
โ โโโ task3_hard.json # Essay questions
โโโ envs/grading_env/
โโโ models.py # Pydantic models
โโโ server/
โโโ app.py # FastAPI application
โโโ environment.py # Core RL environment