← All examples
31 / 100
Jev Review usefulness Code Example
Rank reviews that answer the shopper’s actual question.
Is it good for long-distance running?
Query Is it good for long-distance running?
Review Comfortable after 20 km; heel held firm.
How useful is this review for the query?
0%
Highly useful.
Let the application highly useful.
Code
// Conceptual pseudocode — not Jev SDK syntax
const state = {
"query": "Is it good for long-distance running?",
"review": "Comfortable after 20 km; heel held firm."
};
const decision = await evaluateDecision({
state,
question: "How useful is this review for the query?",
options: ["Highly useful","Somewhat useful","Not useful"],
});
// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Highly useful"
&& decision.probability >= 0.85) {
rankReview(decision);
} else {
queueForReview(decision);
} This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.