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.3.2.tar.gz (41.7 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.3.2-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ai_essay_evaluator-1.3.2.tar.gz
  • Upload date:
  • Size: 41.7 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.3.2.tar.gz
Algorithm Hash digest
SHA256 5a63cef27bc0fc32b119933bb6302856a9b442f9c769228a1f64890e63645434
MD5 aa19ec6d8c73ebcf61146cb91158ce24
BLAKE2b-256 44b25f345753a667c99022359315573318b8a240b435ac31aa2da757cba6a536

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_essay_evaluator-1.3.2.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.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_essay_evaluator-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3b65b3ee23cb20791e295a6cfdb24c920d9c8463d2bae3f49bfcd1b5e332c619
MD5 e589f7c44cf6a224f80da390c933f17b
BLAKE2b-256 eb61a2e7ae38091d562a98cd24a1e1e5990c075e161d2e5bf5fbceaf847e389d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_essay_evaluator-1.3.2-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