Jev:依據狀態取得結構化評估結果
了解 Jev 如何依據 JSON 狀態和具名問題回傳 boolean、choice 或 score 評估結果,並查看 request、response、價格與上下文限制。
Jev:依據狀態取得結構化評估結果
Jev 接收一份狀態資料與具名問題,回傳 boolean、choice 或 score 類型的答案。當你的應用程式已有需要評估的 JSON 狀態,並希望把指定判準轉成可由程式讀取的答案時,可以使用 Jev。
Jev 適合哪些工作
把支援紀錄、審核結果或其他 JSON 狀態交給具名問題評估,且需要固定答案型別時,使用 Jev。每個問題都指定 type 和 instructions;choice 問題可附選項與說明,score 問題可附依序排列的評分準則。
需要多輪互動、自由形式的說明、內容撰寫或改寫時,使用聊天模型。Jev 的回應以具名問題對應的結構化答案為主。
複製即可執行的 cURL 範例
先在 shell 設定 BAZAARLINK_API_KEY。以下請求直接提交狀態資料與三種問題型別:
curl --include --fail-with-body "${BAZAARLINK_BASE_URL:-https://api.bazaarlink.ai}/v1/evaluations" \
-H "Authorization: Bearer ${BAZAARLINK_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"model": "typesafe-ai/jev",
"state": "The support agent issued a full refund and apologised for the delay.",
"questions": {
"refunded": {
"type": "boolean",
"instructions": "Was a refund issued?"
},
"tone": {
"type": "choice",
"instructions": "Tone of the agent?",
"criteria": {
"apologetic": "The agent apologises",
"neutral": "No emotional language",
"hostile": "The agent is rude"
}
},
"quality": {
"type": "score",
"instructions": "How complete was the resolution?",
"criteria": [
"poor",
"partial",
"complete"
]
}
}
}'
BAZAARLINK_BASE_URL 預設為 https://api.bazaarlink.ai。本端點使用 Jev 的 evaluations 請求格式;目前 API Reference 提供 cURL 範例,未提供可直接呼叫此端點的 SDK 方法。
回應格式
成功回應包含 id、object、model、answers、usage、rounding 與 warnings。answers 以請求中的問題名稱作為 key。boolean 答案包含 probability;choice 答案包含選出的 choice,以及以選項名稱為 key 的 probabilities。score 答案的 score 是依準則陣列順序計算、介於索引 0 至 N−1 的期望值;其 probabilities 以字串索引(例如 "0"、"1")為 key,對應準則順序。此例中的 score 為 1.98。頂層 rounding 說明機率與分數的小數位數;warnings 則以陣列列出本次回應的警告,本例為空陣列。使用量由 input_tokens、output_tokens、total_tokens 表示。
以下是 2026-09-25 的實際回應格式範例:
{
"id": "eval-a3d350e5-…",
"object": "evaluation",
"model": "typesafe-ai/jev",
"answers": {
"refunded": {
"type": "boolean",
"probability": 0.99
},
"tone": {
"type": "choice",
"choice": "apologetic",
"probabilities": {
"apologetic": 1,
"neutral": 0,
"hostile": 0
}
},
"quality": {
"type": "score",
"score": 1.98,
"probabilities": {
"0": 0,
"1": 0.02,
"2": 0.98
}
}
},
"usage": {
"input_tokens": 394,
"output_tokens": 74,
"total_tokens": 468
},
"rounding": {
"probabilityDecimals": 2,
"scoreDecimals": 2
},
"warnings": []
}
價格與限制
截至 2026-09-25,目錄單價為每 1M 輸入 tokens USD $0.042、每 1M 輸出 tokens USD $0。usage 仍會分別回報輸入與輸出 token 數量。
上下文上限為 32K tokens,計算序列化後的 state 和 questions。
API 參考
完整 request 欄位、response 範例與錯誤說明請參閱 Jev evaluation API reference。
FAQ
Jev 會回傳一般聊天文字嗎?
Jev 僅供評估用途,請將請求送至 `/v1/evaluations`。以此模型呼叫 `/v1/chat/completions` 會收到 HTTP 400,錯誤訊息為 `evaluation-only`。
什麼時候適合使用 Jev?
當你有 JSON 狀態和明確問題,並希望程式取得固定型別的評估答案時,可以使用 Jev。choice 的機率以選項名稱為 key;score 是依準則順序計算的索引期望值,機率 key 則是對應的字串索引。預設的 `/api/v1/models` 清單不會列出此模型,可加上 `?output_modalities=decisions` 或 `?output_modalities=all` 查詢。
Jev 的價格如何計算?
截至 2026-09-25,目錄單價為每 1M 輸入 tokens USD $0.042、每 1M 輸出 tokens USD $0;上下文上限為 32K tokens。usage 仍會回報輸出 token 數量。