Skip to main content

Orchid Ranker

PyPI version CI Python License

Orchid Ranker is an adaptive-practice engine for learning products.

It chooses the next eligible exercise, observes the learner's result, and adapts the next recommendation. It is designed for assessed practice, technical-skills training, test preparation, and professional certification— not generic feed or product recommendation.

Your platform owns the curriculum, content, safety rules, and learner experience. Orchid owns the adaptive decision loop and the evidence needed to test whether it improves retained mastery.

Install

pip install orchid-ranker

Python 3.11–3.13 is supported.

Use it

You need four columns: learner, exercise, outcome, and timestamp. In the API these stay domain-neutral as user_id, item_id, outcome, and timestamp.

import pandas as pd
from orchid_ranker import AdaptiveRanker

history = pd.DataFrame({
    "user_id":   ["learner-a", "learner-a", "learner-a", "learner-b", "learner-b", "learner-b"],
    "item_id":   [101, 102, 201, 101, 102, 201],
    "outcome":   [1,   1,   0,   1,   0,   0],  # correct / not yet correct
    "timestamp": [1,   2,   3,   1,   2,   3],
})

ranker = AdaptiveRanker().fit(history)

# Inspect whether this pilot has enough support for knowledge tracing.
print(ranker.learning_readiness())

ranked = ranker.recommend(
    user_id="a",
    candidate_item_ids=[101, 102, 201],
    top_k=2,
)

ranker.observe(
    user_id="a",
    item_id=ranked[0].item_id,
    outcome=1,
    timestamp=4,
)

This is the complete loop. Small pilots automatically use a transparent empirical learner; Orchid uses knowledge tracing only when basic support checks are met. outcome is binary: 1 for a completed/correct practice result and 0 otherwise. Do not use clicks as a learning outcome.

Your application supplies only pedagogically eligible items. It should enforce availability, prerequisites, assessment holdouts, accommodations, and any other hard curriculum rules; Orchid only orders that set.

Learn more

Development

python -m pip install -e '.[dev]'
./scripts/run_full_tests.sh

See CONTRIBUTING.md, docs/coding-standards.md, and RELEASING.md.

Community and support

Use SUPPORT.md for usage and contribution guidance, CODE_OF_CONDUCT.md for participation expectations, and SECURITY.md for private vulnerability reporting. The canonical software-citation metadata is in CITATION.cff.

License

Apache 2.0. See LICENSE.

Citation

@software{orchid_ranker,
  title={Orchid Ranker: Outcome-Driven Adaptive Recommendation},
  author={Sam Urmian},
  version={1.0.0},
  year={2026},
  url={https://github.com/mlgorithm/orchid-ranker}
}

Metadata

Release files for orchid-ranker 1.0.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 orchid-ranker 1.0.0
File Size Uploaded
orchid_ranker-1.0.0.tar.gz 274.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for orchid-ranker 1.0.0
File Interpreter ABI Platform
orchid_ranker-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 411.4 kB

Release files / orchid_ranker-1.0.0.tar.gz

Download URL orchid_ranker-1.0.0.tar.gz
Size 274.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1c5bfdfa198a9904e17c6b6b417723064c108d671818b590e193398714c974b4
BLAKE2b-256 checksum
How to use checksums
68e27e12ed607dba825af5b47c88fd79ce65b05fede392365478b61e35d46576
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 30, 2026.

Transparency log

Release files / orchid_ranker-1.0.0-py3-none-any.whl

Download URL orchid_ranker-1.0.0-py3-none-any.whl
Size 137.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6686f7f53eefa5486b6d31bcc1e372593c9a6610f0a540dac34ff53ee8d26a1e
BLAKE2b-256 checksum
How to use checksums
2fd680d69dc8bb9a161aa5bf5a769cc6e255ae036e2900247db21b024156a0f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.3.2

2 release files

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