Jev Recipe / ベンダー比較
Jev vs Perplexity Decisions API 比較:GA・価格公開で正面から
Perplexity が GA 済み・価格公開済みの決定 API で Jev に応えました。検証済みの契約を比較します。noul/choice/score の 3 プリミティブは同名、入力 100 万トークンあたり $0.04 対 $0.042、Apache 2.0 の重み、画像入力——そして選定を実際に決める違い。
決定 API を選ぶ前の 6 つのチェック
{
"routing": {
"type": "choice",
"instructions": "Which queue should this ticket go to?",
"criteria": {
"billing": "Payment, invoice or refund issue",
"technical": "Product malfunction or bug",
"sales": "Buying or upgrade question",
"abuse": "Safety or abuse report"
}
},
"needs_safety_escalation": {
"type": "noul",
"instructions": "Does this ticket require a safety escalation regardless of queue?"
},
"urgency": {
"type": "score",
"instructions": "Rate how urgent a human reply is, 1 (routine) to 5 (business-stopping)"
}
}決定 API のスコアカード:TypeSafe Jev vs Perplexity Decisions API(GA 公開週・各セルに出典を明記)
コード対照:Jev 型付き呼び出し vs Perplexity decisions エンドポイントと A/B 切替
import requests
JEV_ENDPOINT = "https://api.typesafe.ai/v1/jev/evaluate"
AUTO_ROUTE_CONFIDENCE = 0.85
QUESTIONS = {
"routing": {
"type": "choice",
"instructions": "Which queue should this ticket go to?",
"criteria": {
"billing": "Payment, invoice or refund issue",
"technical": "Product malfunction or bug",
"sales": "Buying or upgrade question",
"abuse": "Safety or abuse report",
},
},
"needs_safety_escalation": {
"type": "noul",
"instructions": "Does this ticket require a safety escalation regardless of queue?",
},
"urgency": {
"type": "score",
"instructions": "Rate how urgent a human reply is, 1 (routine) to 5 (business-stopping)",
},
}
resp = requests.post(
JEV_ENDPOINT,
json={"state": {"ticket": "..."}, "questions": QUESTIONS},
timeout=5,
)
resp.raise_for_status()
data = resp.json()
route = data["routing"] # 型付き回答 + 較正済み信頼度、生成なし
if (
route["confidence"] >= AUTO_ROUTE_CONFIDENCE
and not data["needs_safety_escalation"]["answer"]
):
lane = f"auto:{route['answer']}" # 単一パス、入力トークンのみ課金
else:
lane = "review" # 0.60〜0.85 帯またはセーフティフラグimport os
import requests
# POST /v1/decisions - 末尾スラッシュは不可(付けると 404)。
# 認証は Bearer のみ:x-api-key に入れたキーは読まれず 401 になります。
PPLX_ENDPOINT = "https://api.perplexity.ai/v1/decisions"
AUTO_ROUTE_CONFIDENCE = 0.85
resp = requests.post(
PPLX_ENDPOINT,
headers={"Authorization": f"Bearer {os.environ['PERPLEXITY_API_KEY']}"},
json={
# model は毎リクエスト必須。欠落や未知の値は 400
"model": "pplx-decider-v1-27b",
"state": {
"ticket": "Checkout has been failing for every customer "
"for the last hour."
},
"questions": {
"routing": {
"type": "choice",
"instructions": "Which queue should this ticket go to?",
"criteria": {
"billing": "Payment, invoice or refund issue",
"technical": "Product malfunction or bug",
"sales": "Buying or upgrade question",
"abuse": "Safety or abuse report",
},
},
"needs_safety_escalation": {
"type": "noul",
"instructions": "Does this ticket require a safety "
"escalation regardless of queue?",
},
"urgency": {
"type": "score",
"instructions": "Rate how urgent a human reply is, "
"routine to business-stopping",
# score:1〜10 段の順序付きルブリック。回答は段インデックス
# (0 起点)の確率加重平均で、段と段の間の値もあり得る
"criteria": ["Routine", "Minor", "Elevated", "Urgent",
"Business-stopping"],
},
},
},
timeout=30, # 文書どおり:小さい入力は 2 秒未満。30 秒で上限をカバー
)
resp.raise_for_status()
data = resp.json()
answers = data["answers"] # 質問名をキーに、質問と同じ型で返る
route = answers["routing"] # choice + 信頼度 + 選択肢ごとの確率
if (
route["confidence"] >= AUTO_ROUTE_CONFIDENCE
and answers["needs_safety_escalation"]["noul"] < 0.5 # P(yes)
):
lane = f"auto:{route['choice']}"
else:
lane = "review" # 低信頼度またはセーフティフラグ
# 公式文書にある正直な境界のメモ:
# - confidence は「モデル自身の確信の推定値」であり、最高確率の
# 選択肢とは別物。2 番手が迫ると下がります。
# - 同一リクエストは通常同じ数値を返しますが、小数第 2 位で
# 異なることがある——自動化の前に検証を。
# - usage.input_tokens は $0.04/M で課金。output_tokens は無料。
# - レート制限:全プラン 10 リクエスト/秒(429 に Retry-After)。const JEV_ENDPOINT = "https://api.typesafe.ai/v1/jev/evaluate";
const AUTO_ROUTE_CONFIDENCE = 0.85;
const QUESTIONS = {
routing: {
type: "choice",
instructions: "Which queue should this ticket go to?",
criteria: {
billing: "Payment, invoice or refund issue",
technical: "Product malfunction or bug",
sales: "Buying or upgrade question",
abuse: "Safety or abuse report",
},
},
needs_safety_escalation: {
type: "noul",
instructions:
"Does this ticket require a safety escalation regardless of queue?",
},
urgency: {
type: "score",
instructions:
"Rate how urgent a human reply is, 1 (routine) to 5 (business-stopping)",
},
} as const;
const resp = await fetch(JEV_ENDPOINT, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ state: { ticket: "..." }, questions: QUESTIONS }),
});
const data = await resp.json();
const lane =
data.routing.confidence >= AUTO_ROUTE_CONFIDENCE &&
!data.needs_safety_escalation.answer
? `auto:${data.routing.answer}`
: "review";// プリミティブは同名、契約は別物——両方の形状を 1 つのインター
// フェースの背後に適合させます。このアダプタが吸収する差異:
// Perplexity は毎呼び出しに model: "pplx-decider-v1-27b" が必須
// (なければ 400)、回答は `answers` の下にネスト、認証は Bearer
// のみ、未知のフィールドと末尾スラッシュを拒否、全プランで
// 10 リクエスト/秒。confidence は「モデル自身の確信の推定値」で
// 最高確率ではない——自動化の前にベンダーごとに較正を検証。
const JEV_ENDPOINT = "https://api.typesafe.ai/v1/jev/evaluate";
const PPLX_ENDPOINT = "https://api.perplexity.ai/v1/decisions";
const QUESTIONS = {
routing: {
type: "choice",
instructions: "Which queue should this ticket go to?",
criteria: {
billing: "Payment, invoice or refund issue",
technical: "Product malfunction or bug",
sales: "Buying or upgrade question",
abuse: "Safety or abuse report",
},
},
} as const;
type TypedAnswer = { answer: string; confidence: number };
export async function routeTicket(ticket: string): Promise<TypedAnswer> {
if (process.env.DECISION_BACKEND === "perplexity") {
const resp = await fetch(PPLX_ENDPOINT, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PERPLEXITY_API_KEY!}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "pplx-decider-v1-27b", // 毎リクエスト必須
state: { ticket },
questions: QUESTIONS,
}),
});
if (!resp.ok) throw new Error("decision call failed");
const data = await resp.json();
const a = data.answers.routing as {
choice: string;
confidence: number;
probabilities: Record<string, number>;
};
return { answer: a.choice, confidence: a.confidence };
}
const resp = await fetch(JEV_ENDPOINT, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ state: { ticket }, questions: QUESTIONS }),
});
if (!resp.ok) throw new Error("decision call failed");
const data = await resp.json();
return data.routing as TypedAnswer;
}Jev vs Perplexity Decisions API よくある質問
Perplexity Decisions API とは何ですか?
Perplexity の GA 決定モデル API です。公開週に発表され(2026-10-05)、当サイトが 2026-10-06 に公式文書で検証しました。state(文字列・オブジェクト・配列——画像も含む)に 1〜128 の名前付き質問を添えて送ると、生成テキストではなく確率が返ります。モデルは 1 つだけ:pplx-decider-v1-27b。質問タイプは Jev のプリミティブと完全に同名で、noul(yes の確率)、choice(選択肢ごとの確率と信頼度)、score(最大 10 段のルブリック上の確率加重平均)です。価格は入力 100 万トークンあたり $0.04、出力トークンは無料、リクエスト単位の課金なし。重みは Hugging Face に Apache 2.0 で公開されています。
Jev とは何が違いますか?
同じカテゴリ、同名のプリミティブ、違う契約の詳細です。Jev は RLCD 較正済みの信頼度付きの型付き回答を返し、単一パスで決定論的に振る舞います。Perplexity は confidence を「モデル自身の確信の推定値」(最高確率ではない)と文書化し、同一リクエストが小数第 2 位で異なることがあると明記しています。Perplexity は画像入力と最大 26.2 万入力トークンを受け付けます。Jev はテキスト専用でコンテキスト 32k ですが、較正方法論(当サイトベンチマークページの ECE)を公開し、SDK と Playground を同梱しています。両社とも入力のみ課金で出力無料——Jev が $0.042/M、Perplexity が $0.04/M です。
Perplexity Decisions API のオープンソース代替はありますか?
Perplexity 自身がそうです。重み(Hugging Face の perplexity-ai/pplx-decider-v1-27b)は Apache 2.0 で公式の Python 推理コード付きのため、自分が運用するインフラで推論を実行できます——サービング基盤の構築と検証は自己責任です。Jev 生態系のローカル経路は OpenJev ファミリーのクローン(Kev、SemIf、Von)を自分のハードウェアで動かすもので、Cloudflare の Clef はもう一つのオープンウェイト決定モデルファミリーです。正直な留保:セルフホストが再現するのは重みであって、ホスト型 API の全動作とは限りません。画像タイル処理、信頼度セマンティクス、自分のスタック上の較正は、自分で検証する項目です。
どちらを選ぶべきですか?
シーンで選びます。Perplexity を先に見るケース:判断が今日から画像を読む、32k を超えるコンテキストが必要、ベンダー公認セルフホスト経路付きのオープンウェイトが欲しい、極端な規模での入力コストが決め手になる($0.04 対 $0.042)。Jev を先に見るケース:較正済み信頼度で自動実行をゲートする、公開済みの較正方法論が必要、再生可能な監査のための決定論的な挙動が必要、SDK と Playground のワークフロー、監査証跡とフォールバックのコンテンツ群に依存する。どちらでも、決め手のデータはローカルにあります。自分のラベル付きサンプル約 100 件を両方のゲートに通してください。公開週のベンダー文書が答えるのは選定偵察の質問であって、デプロイの質問ではありません。
$0.04 対 $0.042 の差が本当のコストの話ですか?
いいえ。常識的な規模ではどちらも数セントの世界です。入力 600 トークンは Perplexity で約 $0.000024、Jev で約 $0.000025。5% の差が意味を持つのは月間トークン数が 9 桁に達するときだけです。実際に金額を動かす軸は、画像(Perplexity で 100 万ピクセルあたり約 1,000 入力トークン)、出力課金(両社とも無料——ここが OpenAI gpt-6-luna の $0.10 入力 / $0.50 出力との分水嶺)、レート制限(Perplexity は全プラン 10 リクエスト/秒と文書化)です。コスト計算機で三角形を試算したら、数セントの最適化をやめて信頼度の検証に移りましょう。
2 つの API は 1 つのリクエスト経路を共有できますか?
アダプタの背後なら yes、そのままの差し替えは no です。プリミティブ名と「state + questions」という思想は一致していますが、Perplexity は毎呼び出しに model: "pplx-decider-v1-27b" が必須、応答は answers の下にネスト、Bearer ヘッダーのみで認証(x-api-key は読まれません)、未知のフィールドと末尾スラッシュを拒否し、全プランで 10 リクエスト/秒に制限されます。上の 2 バックエンドのコードのように 1 つの決定インターフェースの背後に両方を置き、信頼度セマンティクスはベンダーごとに扱い、自動化の前にラベル付きサンプルで切り替えを検証してください。