Skip to main content

Rust-powered LLM essay grading engine

Project description

Qarwyn 🦅

Qarwyn is a simple Python library that uses LLM to grade essays based on your specific rules, utilizing Pipe & Filters architecture on Rust.


🚀 Installation

You can install Qarwyn directly using pip for Python 3.10 and onwards:

pip install qarwyn

Note: You will need an OPENAI_API_KEY to use the grading features.

📖 Tutorial: How to Grade an Essay

Grading an essay takes three simple steps: Define your Criteria, create your Essay, and run the Pipeline.

1. Setup your Rubric

Decide what you are grading and how many points each section is worth.

import qarwyn

# Define what you are looking for
clarity = qarwyn.Criterion("Clarity", 10.0, "How clear is the main argument?")
grammar = qarwyn.Criterion("Grammar", 5.0, "Proper use of punctuation and spelling.")

# Combine them into a Rubric (Total score: 15.0)
my_rubric = qarwyn.Rubric("Classroom Grading", 15.0, [clarity, grammar])

2. Prepare the Essay

Create the essay object with a title and the actual text content.

my_essay = qarwyn.Essay(
    title="My First AI Essay",
    content="This is an essay about how AI helps us code faster.",
    author="Jane Doe"
)

3. Run the Grader

Send everything to the pipeline. Qarwyn handles the AI communication for you.

# Create the payload
payload = qarwyn.Payload(
    api_key="your-api-key-here",
    model="gpt-5.4-nano-2026-03-17",
    name="grading_job_01",
    system_prompt="You are a helpful teacher. Grade the essay based on the rubric.",
    rubric=my_rubric,
    essays=[my_essay]
)

# Get the results
report = qarwyn.run_grading_pipeline(payload)

# Your results come back as a standard Python dictionary
print(report.results)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

qarwyn-0.1.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

qarwyn-0.1.1-cp310-abi3-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.10+Windows x86-64

qarwyn-0.1.1-cp310-abi3-manylinux_2_28_aarch64.whl (2.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

qarwyn-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

qarwyn-0.1.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (5.6 MB view details)

Uploaded CPython 3.10+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file qarwyn-0.1.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qarwyn-0.1.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 16ec274be5b009cef0ec9af52879ecd95236f65cdbd6a74d82c75aa58e0d6a14
MD5 96a339f42bd80dcac4584f39f2f31068
BLAKE2b-256 7f116cc418c749c5028a7eb783a46f36fa387cf49db0ff835d2f9c401c97d098

See more details on using hashes here.

File details

Details for the file qarwyn-0.1.1-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: qarwyn-0.1.1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for qarwyn-0.1.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 617c4df9454a0db740928e30f621d9d95d9fa88741c5ee87a92c31d2d24440cc
MD5 c09f39b430c1aea687b79a7f32a06778
BLAKE2b-256 d7a6fbc54965e0f2ba9c4099a5c13860150530b54773cfdb32235d280f585ae2

See more details on using hashes here.

File details

Details for the file qarwyn-0.1.1-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qarwyn-0.1.1-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 cb238e0c219a03780eea3c5d7bfab34b5ffdb594572ff05387b060bd6885edfb
MD5 8382b1295fff993a56a5ec71ff27f53a
BLAKE2b-256 028b93553d60ad52b0ce983e8fd500d09b877185114949f0734379ef3e077ea7

See more details on using hashes here.

File details

Details for the file qarwyn-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qarwyn-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 56aa93a55f5b29ba5cc1edaeebc4de93380e370bdb07aed0048a83d4c2e411bf
MD5 bf68d1c59861f0f023f1df2197044598
BLAKE2b-256 fbd958d436a63a55eb450b53dfaf70f9d47f531eea13c301e82015b6d5ab332d

See more details on using hashes here.

File details

Details for the file qarwyn-0.1.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qarwyn-0.1.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 5f138156bf78bd1dfd52aa49331126d9c6a107ae405e9d48164481a71ee76fbf
MD5 ad6a09e1bc0682325c920fc1ca537853
BLAKE2b-256 5474f75b924be5366ecf8c4d899a92de8eda411bb06478a6023eeb04ae10ee26

See more details on using hashes here.

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