compere

About

About compere

A small library and HTTP service that turns “A or B?” votes into rankings, intelligently — and claims nothing it does not do.

What it is

compere is an open-source project from Skelf Research. It ships as a Python 3.11+ package on PyPI (pip install compere) and as a FastAPI server with an interactive /docs endpoint. The same code can be embedded as a library or run as a service backed by SQLite (default) or PostgreSQL.

What is actually inside

The repository contains exactly these algorithm modules:

  • mab.py — Upper Confidence Bound (UCB1) for picking the next pair to compare. Configurable via UCB_EXPLORATION_CONSTANT (default 1.414) and UCB_UNEXPLORED_WEIGHT (default 1000.0).
  • rating.py — Elo updates with configurable K-factor (ELO_K_FACTOR=32) and initial rating (ELO_INITIAL_RATING=1500).
  • similarity.py — an alternative pairing strategy that selects similar entities for comparison instead of UCB-optimal ones, exposed at /comparisons/next.

That is the whole inference stack. There is no Bradley-Terry estimator, no Thurstone Case V, no TrueSkill / Glicko, no neural ranker. If you need those, compere is the wrong tool and we are happy to point you elsewhere.

HTTP surface

Eleven endpoints, all visible at http://localhost:8090/docs when running — see the features page for the full table.

Deployment

A Dockerfile and docker-compose.yml ship in the repo. Optional knobs include JWT authentication (AUTH_ENABLED), CORS origins, and request rate limiting; all are off by default.

License and source

MIT. The source of truth is github.com/skelf-research/compere. Authoritative documentation lives at docs.skelfresearch.com/compere/.

Who built it

Skelf Research is a research group that publishes practical, narrowly-scoped tooling. compere is one of those tools. If you have questions or want to contribute, issues and pull requests on the GitHub repository are the canonical channel — or get in touch.