Documentation Index
Fetch the complete documentation index at: https://docs.kaireonai.com/llms.txt
Use this file to discover all available pages before exploring further.
Tiered fairness evaluation
POST /api/v1/fairness/evaluate?metrics=basic|advanced runs the full
fairness pipeline. The query string controls which metrics tier is
returned.
Basic tier (default)
Existing demographic-parity, four-fifths-rule, equal-opportunity, and equalized-odds gap calculations fromlib/fairness/metrics.ts.
Unchanged behavior — every existing caller is bit-identical.
Advanced tier
Adds intersectional analysis + mitigation recommendations fromlib/fairness/advanced.ts:
- Intersectional cells require per-sample
intersectionalGroups: { axisName: groupValue }. The route evaluatesevaluateIntersectional(samples, minCellSize=10)and surfaces the cells + the worst disparate-impact ratio. - Mitigation recommendations are derived from the report shape (DI ratio, four-fifths violation, equal-opportunity gap) — no extra inputs needed.
intersectionalGroups, the response includes
advancedAwaitingConfig: ["intersectional: no per-sample intersectionalGroups supplied"]
so operators know why the analysis is empty. No silent fallback.
Counterfactual + Lipschitz
These primitives also live inlib/fairness/advanced.ts but are NOT
auto-run from this route — they need a real scorer + paired
counterfactual samples that the evaluate route does not have. Pipeline
callers invoke them directly.
EU AI Act report
POST /api/v1/fairness/report runs the same fairness pipeline and
returns a formatted report:
format | Content type | Notes |
|---|---|---|
csv | text/csv | Per-group + summary metrics, suitable for compliance archive ingestion. |
html | text/html | Markup-only; pipe through headless Chromium / wkhtmltopdf for PDF. |
/evaluate. Optional title + subtitle
override the defaults (“Fairness Assessment Report” / “EU AI Act
Article 10 § 2(f)”).
Audit trail
Every call to/evaluate and /report writes one AuditLog row
(action: fairness_evaluate or fairness_report) so DSAR exports
can cite the exact report contents.