Skip to main content

reliopt

Reliability-constrained, multi-objective optimization for LLM and agent programs.

The thesis

A good AI program is not the one with the highest score. It's the one that satisfies its behavioral contracts while achieving the best defensible trade-off between quality, robustness, cost, and efficiency.

Concretely, that means:

  • Contracts, not just scores — hard/soft behavioral requirements (groundedness, schema validity, tool scope) that gate candidates, separate from the objectives you're optimizing. A candidate that violates a contract is excluded from consideration entirely, no matter how well it scores elsewhere.
  • Pareto frontiers, not a weighted-sum score — collapsing accuracy/cost/robustness into one number conceals the trade-off. This framework returns the non-dominated candidate set and lets you pick a profile (quality_first, balanced, low_cost, high_reliability).
  • Automated stress-testing — candidates are scored on perturbed variants of your trainset (reordered clauses, injected distractors, and your own domain-specific perturbers), not just the nominal examples.
  • Component attribution (in progress — see Roadmap) — controlled ablation to answer why one architecture outperforms another, not just that it does.

reliopt is a meta-layer, not a replacement for your agent framework: it wraps arbitrary Python callables today, with adapters for popular frameworks planned as the ecosystem grows.

Related work

See research/RELATED_WORK.md for how this relates to DSPy, Promptfoo, Inspect, and MO-CAPO.

Quick start

from reliopt import Program, Contract, Objective

program = Program(my_rag_agent)

program.contracts(
    Contract.groundedness(minimum=0.90),
    Contract.schema_valid(),
)

program.objectives(
    Objective.accuracy(),
    Objective.cost(minimise=True),
    Objective.latency(minimise=True),
)

result = program.compile(trainset=data)

print(result.render_table())
best = result.select("balanced")
print(result.evidence_card(best.id).render())

See examples/rag_demo.py for a runnable end-to-end walkthrough.

Status

Early, actively-developed v0.1. The core loop (Program adapter → Contracts → Objectives → Perturbation engine → Pareto compiler → Evidence Card) works end-to-end today; several pieces are intentionally thin placeholders with clearly marked seams — see ARCHITECTURE.md for what's real vs. stubbed, and CHANGELOG.md for what's shipped.

Contributing

See CONTRIBUTING.md. Issues and PRs welcome — good first issue labels are being seeded.

License

MIT

Release files for reliopt 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 reliopt 0.1.0
File Size Uploaded
reliopt-0.1.0.tar.gz 40.8 kB Details

Built distribution (wheel)

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

Total release size: 67.5 kB

Release files / reliopt-0.1.0.tar.gz

Download URL reliopt-0.1.0.tar.gz
Size 40.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3878322ced0858d0da49d01b4435c77df86063354c40a35ed9e96c5d555a8dc1
BLAKE2b-256 checksum
How to use checksums
dea55ce6b8b9825bb5cd3940612574b987152f941deaea53fc46600550f08fae
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 Sep 13, 2026.

Transparency log

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

Download URL reliopt-0.1.0-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30d4e1911281496ae56fcf78bc838344714c635716716bc689ccd974bd1c3eb1
BLAKE2b-256 checksum
How to use checksums
7e8c22905d3cfbdcd2df31f33251233d7f9fcc4b383c35092e91021cf6b450ed
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 Sep 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

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