← All examples
36 / 100
Jev Bundle relevance Code Example
Suggest complementary items instead of arbitrary upsells.
Espresso machine
Basket Espresso machine
Candidate Compatible water filter
Compatibility Confirmed Yes
Is this a useful complement?
0%
Relevant.
Let the application relevant.
Code
// Conceptual pseudocode — not Jev SDK syntax
const state = {
"basket": "Espresso machine",
"candidate": "Compatible water filter",
"compatibility_confirmed": true
};
const decision = await evaluateDecision({
state,
question: "Is this a useful complement?",
options: ["Relevant","Redundant","Unrelated"],
});
// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Relevant"
&& decision.probability >= 0.85) {
rankBundleCandidate(decision);
} else {
queueForReview(decision);
} This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.