Skip to main content

option-order-check

Does your multiple-choice LLM eval depend on where the answers are placed?

option-order-check shows every question to your model once per cyclic rotation of its options (A-B-C-D, B-C-D-A, ...) and reports, with uncertainty:

  • mean accuracy over all rotations (95% Wilson interval)
  • the flip rate: the share of questions whose chosen answer changes with option order
  • accuracy by the slot the correct answer sits in (position bias shows up here)
  • the share of questions answered correctly under every ordering

Pure standard library, no dependencies. Works offline with a built-in mock model, or with any OpenAI-compatible chat endpoint (OpenAI, Ollama, vLLM, LM Studio).

Install and try it (no API key)

pip install option-order-check
option-order-check --demo --provider mock

The mock model has a deliberate lean toward one answer slot, so you can see what a biased model looks like in the output.

Run it on your own model

Your file is JSONL, one question per line, with the correct option as a 0-based index:

{"question": "Which gas do plants absorb?", "options": ["Oxygen", "Carbon dioxide", "Helium", "Neon"], "answer": 1}
# OpenAI
export OPENAI_API_KEY=...
option-order-check mytests.jsonl --provider openai --model gpt-4o-mini

# A local model through any OpenAI-compatible server (Ollama shown)
option-order-check mytests.jsonl --provider openai --model llama3 \
    --base-url http://localhost:11434/v1 --api-key-env NONE

Add --json-out report.json to save the numbers.

Reading the output

A high flip rate at decent accuracy means your score depends on where answers are placed. A large spread between the best and worst correct-answer slot means the model has a position preference. See the audit this tool came from: Shuffle the answers and small models change their minds.

Limits

The Wilson interval treats the rotations of one question as independent, which they are not, so read it as a rough guide. The flip-rate interval resamples questions. This tool measures option-order sensitivity only. It is not a full reliability audit, and it says nothing about safety, bias or domain correctness.

License

MIT. Part of the free tooling at https://robert-morong-research.netlify.app/free/

Metadata

Release files for option-order-check 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for option-order-check 0.1.0
File Size Uploaded Provenance
option_order_check-0.1.0.tar.gz 8.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for option-order-check 0.1.0
File Interpreter ABI Platform
option_order_check-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.0 kB

Release files / option_order_check-0.1.0.tar.gz

Download URL option_order_check-0.1.0.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d54666c76b0a71f870642082dc5d8fcd053d2954056f12e5e4b6c7743196e683
BLAKE2b-256 checksum
How to use checksums
bf8af7957bf033d52dd2e71aa0863dff08f0b1ad604c2ed660a4ebba2a5addc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / option_order_check-0.1.0-py3-none-any.whl

Download URL option_order_check-0.1.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d82f03ed27b6b24da30db0085e5c281b914cff5805a4593603f83c58dc47142
BLAKE2b-256 checksum
How to use checksums
46c97a2cf1afb1e1ba8c3d218e5ae6cfa43821b2db1716a7d19bbd2cd725d766
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for option-order-check 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for option_order_check-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page