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.1.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.1-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ai_essay_evaluator-1.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 caf55e82283b06f0f31fd2c805a2bb9996e9ba912791141edb6dbb2be23dac17
MD5 dd3a87ac8b46b2e3c4b3c8113d36062a
BLAKE2b-256 955a746f152f7dfab8400b6649b9fb7af385363c2bdee9be94ddb0a852ae554a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ai_essay_evaluator-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7394d2ba226c32bab3f637c341bc994feb399998bb63dcc9171dfead0d4af15f
MD5 a29a84e7f95e450f3fe7faffa3155e35
BLAKE2b-256 03efa68061da4a60e066f479f57b6030784754d0d0e493b2ba316dd64bd3a17f

See more details on using hashes here.

Provenance

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