← All examples
20 / 100
Jev Result verification Code Example
Check a tool result against the user’s original goal.
Book a refundable fare.
Goal Book a refundable fare.
Result Economy Basic, non-refundable.
Does this result satisfy the constraint?
0%
Reject result.
Stop the flow and reject result.
Code
// Conceptual pseudocode — not Jev SDK syntax
const state = {
"goal": "Book a refundable fare.",
"result": "Economy Basic, non-refundable."
};
const decision = await evaluateDecision({
state,
question: "Does this result satisfy the constraint?",
options: ["Reject result","Accept","Verify terms"],
});
// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Reject result"
&& decision.probability >= 0.85) {
rejectCandidate(decision);
} else {
queueForReview(decision);
} This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.