Skip to main content

This repository provides a modular framework for generating, validating, merging, uploading, and fine-tuning OpenAI GPT-4o-mini models using structured JSONL datasets.

Project description

AI Essay Evaluator

CI Status Documentation Status Test coverage percentage

uv Ruff pre-commit

PyPI Version Supported Python versions License


Documentation: https://ai-essay-evaluator.readthedocs.io

Source Code: https://github.com/markm-io/ai-essay-evaluator


A comprehensive Python framework for automated essay evaluation using OpenAI's GPT models. This tool enables educators to grade student essays at scale with customizable scoring rubrics, fine-tune models with their own grading data, and generate detailed feedback across multiple scoring dimensions.

Features

  • Automated Essay Grading - Evaluate student essays using fine-tuned OpenAI GPT-4o-mini models
  • Multiple Scoring Formats - Choose from extended (multi-dimensional), item-specific, or short scoring formats
  • Custom Model Training - Generate training datasets and fine-tune models with your own grading examples
  • Project Folder Mode - Simple folder structure for organizing essays, rubrics, and prompts
  • Cost Tracking - Built-in token usage and cost analysis for OpenAI API calls
  • Batch Processing - Grade hundreds of essays with progress tracking and async processing
  • Multi-Pass Grading - Run multiple grading passes for consistency checking
  • Rate Limit Handling - Automatic retry logic and adaptive rate limiting
  • Comprehensive Logging - Async logging for debugging and auditing

Quick Start

Installation

Install via pip:

pip install ai-essay-evaluator

Or using uv (recommended for development):

uv pip install ai-essay-evaluator

Basic Usage

  1. Set up your project folder:
my_project/
├── input.csv              # Student responses
├── question.txt           # Essay prompt
├── story/                 # Story files
│   └── story1.txt
└── rubric/                # Rubric files
    └── rubric1.txt
  1. Run the evaluator:
python -m ai_essay_evaluator evaluator grader \
  --project-folder ./my_project \
  --scoring-format extended \
  --api-key YOUR_OPENAI_API_KEY
  1. Check results in my_project/output/

Training Your Own Model

# Generate training data from graded examples
python -m ai_essay_evaluator trainer generate \
  --story-folder ./training/story \
  --question ./training/question.txt \
  --rubric ./training/rubric.txt \
  --csv ./training/graded_samples.csv \
  --output training.jsonl \
  --scoring-format extended

# Validate and fine-tune
python -m ai_essay_evaluator trainer validate --file training.jsonl
python -m ai_essay_evaluator trainer fine-tune \
  --file training.jsonl \
  --scoring-format extended \
  --api-key YOUR_OPENAI_API_KEY

For detailed documentation, visit the full usage guide.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Mark Moreno
Mark Moreno

💻 🤔 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

Copier

This package was created with Copier and the browniebroke/pypackage-template project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_essay_evaluator-1.1.0.tar.gz (39.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_essay_evaluator-1.1.0-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file ai_essay_evaluator-1.1.0.tar.gz.

File metadata

  • Download URL: ai_essay_evaluator-1.1.0.tar.gz
  • Upload date:
  • Size: 39.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ai_essay_evaluator-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4565b47bbdc066a0a3b4cfbb6efb3064aa532522fb263de2aeb9b2aa52c8ec9b
MD5 f8c96eb8c5e220ded41a1832d584e3a8
BLAKE2b-256 5ecc8f3042b6088688d7aab18c8b5aa7a4ec4ef6a5ddf1a65b719f5c97a2d64a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_essay_evaluator-1.1.0.tar.gz:

Publisher: ci.yml on markm-io/ai-essay-evaluator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ai_essay_evaluator-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_essay_evaluator-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1097f49997491ec33b7da3907dee7127975ec3260df880f1040828710a03a870
MD5 836d5daf81084d8ebe71f55f90e83616
BLAKE2b-256 6186822a628005123ab2cd7b46694b55577b18b07099b8f38c728291a6b1449f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_essay_evaluator-1.1.0-py3-none-any.whl:

Publisher: ci.yml on markm-io/ai-essay-evaluator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page