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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ai_essay_evaluator-1.3.3.tar.gz
  • Upload date:
  • Size: 41.6 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.3.tar.gz
Algorithm Hash digest
SHA256 297509246cc32fe96676c581e27b6f3d93a2155fcd0e51777ee067cf438da288
MD5 b8f5750d1eea2f1be56e12303d45b027
BLAKE2b-256 5a6c57873f5e634d80e92569a2ee9502c97bef75aaf044075c5dde1bc9601ab1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ai_essay_evaluator-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1d961164828eb86a12d038520169badd432c8c1541e1e866b0c0b6a7eae6a8df
MD5 e289db7779df751c58e756282756f5ed
BLAKE2b-256 5b4183b17d7f5371b3ce1b87e0130c20c29b83add83284f8448cdff5b25ba62f

See more details on using hashes here.

Provenance

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