← All examples
11 / 100
Jev Tool selection Code Example
Pick the right tool before spending a model call.
Find orders placed yesterday.
Task Find orders placed yesterday.
Tools order_search, web_search, calculator
Which tool should run next?
0%
Order search.
Let the application order search.
Code
// Conceptual pseudocode — not Jev SDK syntax
const state = {
"task": "Find orders placed yesterday.",
"tools": "order_search, web_search, calculator"
};
const decision = await evaluateDecision({
state,
question: "Which tool should run next?",
options: ["Order search","Web search","Calculator"],
});
// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Order search"
&& decision.probability >= 0.85) {
selectTool(decision);
} else {
queueForReview(decision);
} This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.