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.
What this solves
Different product categories often want different ranking priorities. Cards offers are usually conversion-driven (push the highest-converting card to the top). Loans offers in regulated markets need fairness-led ranking (every qualified borrower sees an offer, regardless of model preferences). Without per-category overrides, you’d need a separate flow per category and split traffic at the router — operationally painful and breaks Hungarian uniqueness across the slot set.Why this works
The Score node’sstrategyOverrides[] array lets you map a candidate’s category (or productType, or channelId) to a specific RankingProfile. The PRIE engine reads the profile’s {conversion, recency, margin, fairness} weights, maps them to {Wp, Wr, Wi, We}, and recomputes the geometric-mean score per candidate. Same flow execution, three different weight regimes if you want three.
The pattern
Three ingredients:- A flow whose Score node has
method: "formula"and a defaultstrategyProfileId. - Two or more
RankingProfilerows with the weight regimes you want. strategyOverrides[]on the Score node mappingscope: "category"(or"productType"or"channel") +value(the category name, exactly as it appears on the Offer) → the profile id.
Step 1 — Create the ranking profiles
CARDS_PROFILE_ID and LOANS_PROFILE_ID for the next step.
Step 2 — Configure the flow’s Score node
PUT the decision flow’sdraftConfig, targeting the Score node:
POST /api/v1/decision-flows/publish to ship it.
Step 3 — Verify
Fire the same recommend against the same customer twice — once with the override array empty (control), once with the override above. You should see Mortgage’s score drop by a known delta while Cashback’s stays constant (or moves only when you flip the Cards default).What the trace will show
scoringResults[*].explanations[] on the decision trace — when a strategy override fires, the explanation row records which profile was applied.
Gotchas
- Use the category NAME, not the UUID. The engine matches on
offer.categoryRef.name. Passing the category id silently no-ops; the engine falls back to the default profile. - Same-customer A/B is the cleanest comparison. The maturity ramp’s per-customer deterministic-random roll means two new customers comparing the same offer can see different drop patterns. Use one customer across both stages.
- Override priority is array order. First match wins; later entries don’t merge. If you want a fallback, put it last with the broadest scope.