> ## Documentation Index
> Fetch the complete documentation index at: https://carnot.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Jev (TypeSafe AI)

> TypeSafe AI Jev で高速な構造化判定を行う

## 概要

Jev は TypeSafe AI の System One モデルです。文章を生成するのではなく、`state` を型付きの質問で評価し、較正済みの確率を返します。後続のステップは文章を解釈せず、数値でそのまま分岐できます。分類、ルーティング、ルーブリック採点、ガードレール判定に適しています。

## 主な機能

* `TYPESAFE_JEV_EVALUATE`
  * 1 回のリクエストで 1 つの `state` を複数の質問で評価
  * 3 種類の質問タイプ：
    * `noul` — Yes/No。答えが Yes である確率（0〜1）を `noul` として返す
    * `choice` — 選択肢から 1 つ選ぶ。`criteria` は選択肢 → 説明（または `null`）のマップ。`choice`、`probabilities`、`confidence` を返す
    * `score` — 順序付きレベルで採点。`criteria` は 2 つ以上のレベル説明の配列。`score`（レベルの中間値になりうる）、`legend`、`probabilities`、`confidence` を返す
  * `state` にはテキストまたは JSON オブジェクト／配列を指定可能
  * `model` のデフォルトは `jev-latest`。確信度のしきい値を調整している場合は `jev-1.13.0` のようにバージョンを固定
  * レート制限（`429`）と過負荷（`529`）のレスポンスは自動でリトライ

## 認証

このツールはご自身の TypeSafe AI API キーが必要です。Jinba の API クレジットは利用できません。取得方法は [TypeSafe AI クイックスタート](https://docs.typesafe.ai/introduction/quickstart) を参照してください。

**注意**：API キーは機密情報として扱い、公開リポジトリにコミットしないでください。

## 制限

* テキストのみ対応。1 リクエストあたり 64k トークン（`state` と最長の質問の合計は 32k）まで
* 最も精度が高いのは英語です。日本語など他の言語では、回答を使う前に `confidence` を確認してください

### 例：サポートチケットのトリアージ

```yaml theme={null}
- id: triage
  tool: TYPESAFE_JEV_EVALUATE
  input:
    - name: state
      value: "Help! My payouts have been failing for 3 days."
    - name: questions
      value: |
        {
          "is_urgent": {
            "type": "noul",
            "instructions": "Does this convey urgency?"
          },
          "department": {
            "type": "choice",
            "instructions": "Which team should handle this?",
            "criteria": {
              "billing": "Payments, invoicing, refunds",
              "technical": "Bugs, outages, integrations",
              "sales": "Pricing, upgrades, new accounts"
            }
          },
          "frustration": {
            "type": "score",
            "instructions": "How frustrated is the customer?",
            "criteria": ["Calm", "Frustrated", "Very angry"]
          }
        }
  config:
    - name: api_key
      value: "{{secrets.TYPESAFE_API_KEY}}"
```

回答は同じ id で返ります。例：`{{steps.triage.result.answers.department.choice}}`、`{{steps.triage.result.answers.is_urgent.noul}}`。
