How-to: tune ranking safely¶
Use this playbook to adjust ranking behavior without losing auditability.
Before you start¶
- Decide the goal: one primary KPI + 2–5 guardrails
- Ensure you can measure (stable
request_idand exposure/outcome logs)
Start points:
- Success metrics: Success metrics
- Minimum instrumentation spec: Minimum instrumentation spec
Step 1 — Understand the current ranking contract¶
Read the core behavior and determinism rules:
- Ranking & constraints reference: Ranking & constraints reference
- Scoring model specification: Scoring model spec
Step 2 — Choose the smallest knob¶
Prefer the smallest change that can be rolled back cleanly:
- Config/rules change (no code)
- Use weights/limits/flags per tenant and merchandising constraints.
-
Best for quick iteration and safe rollback.
-
Pipeline change (signals/data)
-
Add or adjust a signal end-to-end.
-
Ranking code change
- Use only when the scoring/merge logic must change.
- Requires a stricter evaluation and review.
Step 3 — Create a candidate and keep it reproducible¶
- Record the baseline version (config/rules/algo versions)
- Record the candidate version (exact diffs)
- Keep artifacts immutable (avoid "silent" rewrites)
Helpful reading:
- Artifacts and manifest lifecycle: Artifacts and manifest lifecycle
Step 4 — Run offline evaluation gates¶
Run an evaluation report and interpret it as a decision artifact:
- Workflow: Run eval and ship
- Interpretation orientation: Interpreting metrics and reports
Step 5 — Validate determinism and joinability¶
These prevent "it worked on my laptop" outcomes:
- Verify determinism: Verify determinism
- Verify joinability: Verify joinability
Step 6 — Ship with rollback discipline¶
- Run at least one rollback drill before you need it.
- Write the decision and link it to the report and evidence kit.
Start here:
- Rollback model: Operational reliability & rollback
- Evidence kit template: Evidence
Read next¶
- RecSys engineering hub: RecSys engineering hub
- Add a signal end-to-end: Add a signal end-to-end
- Run eval and make ship decisions: Run eval and ship
- Ranking reference: Ranking & constraints reference