← All examples
49 / 100
Jev Duplicate invoice suspicion Code Example
Surface likely duplicates without rejecting legitimate bills.
INV-103, Vendor A, 800
Incoming INV-103, Vendor A, 800
Existing INV103, Vendor A, 800, same date
Does this need duplicate review?
0%
Review duplicate.
Send it to review duplicate.
Code
// Conceptual pseudocode — not Jev SDK syntax
const state = {
"incoming": "INV-103, Vendor A, 800",
"existing": "INV103, Vendor A, 800, same date"
};
const decision = await evaluateDecision({
state,
question: "Does this need duplicate review?",
options: ["Review duplicate","Distinct invoice","Need source document"],
});
// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Review duplicate"
&& decision.probability >= 0.85) {
queueDuplicateReview(decision);
} else {
queueForReview(decision);
} This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.