J.

Jev Policy document match Code Example

Choose the right internal policy for a plain-language question.

Can I expense a monitor for working from home?

Question Can I expense a monitor for working from home?
Candidates Equipment, travel, parental leave

Which policy should be shown?

0% Equipment.
Equipment 88%
Travel 8%
No match 4%

Let the application equipment.

Code
Conceptual pseudocode — not official Jev SDK syntax
// Conceptual pseudocode — not Jev SDK syntax
const state = {
  "question": "Can I expense a monitor for working from home?",
  "candidates": "Equipment, travel, parental leave"
};

const decision = await evaluateDecision({
  state,
  question: "Which policy should be shown?",
  options: ["Equipment","Travel","No match"],
});

// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Equipment"
    && decision.probability >= 0.85) {
  suggestPolicy(decision);
} else {
  queueForReview(decision);
}

This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.