|
| 1 | +--- |
| 2 | +title: Jev |
| 3 | +description: Make structured decisions with TypeSafe AI |
| 4 | +--- |
| 5 | + |
| 6 | +import { BlockInfoCard } from "@/components/ui/block-info-card" |
| 7 | + |
| 8 | +<BlockInfoCard |
| 9 | + type="jev" |
| 10 | + color="#F386A1" |
| 11 | +/> |
| 12 | + |
| 13 | +## Usage Instructions |
| 14 | + |
| 15 | +Use TypeSafe AI’s Jev to classify content, score it against a rubric, or evaluate yes/no questions. Evaluate multiple questions against shared state in one request and route results using probabilities and confidence. Requires your own TypeSafe API key. |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +## Actions |
| 20 | + |
| 21 | +### Jev Choice |
| 22 | + |
| 23 | +Choose an option with Jev and return its probability distribution and confidence. |
| 24 | + |
| 25 | +#### Input |
| 26 | + |
| 27 | +| Parameter | Type | Required | Description | |
| 28 | +| --------- | ---- | -------- | ----------- | |
| 29 | +| `apiKey` | string | Yes | TypeSafe API key from https://console.typesafe.ai | |
| 30 | +| `model` | string | No | Model ID or alias: jev-1.13.0, jev-latest, or jev-preview. Defaults to jev-1.13.0. | |
| 31 | +| `state` | json | Yes | Content to evaluate: a text string, JSON object, or array. | |
| 32 | +| `instructions` | json | Yes | The question to evaluate, as text, a JSON object, or an array. | |
| 33 | +| `criteria` | json | Yes | Map of 1–255 option names to descriptions \(text, object, array, or null\). | |
| 34 | + |
| 35 | +#### Output |
| 36 | + |
| 37 | +| Parameter | Type | Description | |
| 38 | +| --------- | ---- | ----------- | |
| 39 | +| `choice` | string | Selected option | |
| 40 | +| `probabilities` | json | Probability of each option or rubric level | |
| 41 | +| `confidence` | number | Confidence in the answer, from 0 to 1 | |
| 42 | +| `model` | string | Versioned model ID used for evaluation | |
| 43 | +| `usage` | object | Token usage reported by TypeSafe | |
| 44 | +| ↳ `input_tokens` | number | Input tokens consumed | |
| 45 | +| ↳ `output_tokens` | number | Output tokens produced \(not billed by TypeSafe\) | |
| 46 | + |
| 47 | +### Jev Score |
| 48 | + |
| 49 | +Score content against an ordered rubric with Jev, including probabilities and confidence. |
| 50 | + |
| 51 | +#### Input |
| 52 | + |
| 53 | +| Parameter | Type | Required | Description | |
| 54 | +| --------- | ---- | -------- | ----------- | |
| 55 | +| `apiKey` | string | Yes | TypeSafe API key from https://console.typesafe.ai | |
| 56 | +| `model` | string | No | Model ID or alias: jev-1.13.0, jev-latest, or jev-preview. Defaults to jev-1.13.0. | |
| 57 | +| `state` | json | Yes | Content to evaluate: a text string, JSON object, or array. | |
| 58 | +| `instructions` | json | Yes | The question to evaluate, as text, a JSON object, or an array. | |
| 59 | +| `criteria` | json | Yes | Ordered array of 2–10 rubric descriptions, from lowest to highest score. | |
| 60 | + |
| 61 | +#### Output |
| 62 | + |
| 63 | +| Parameter | Type | Description | |
| 64 | +| --------- | ---- | ----------- | |
| 65 | +| `score` | number | Probability-weighted, zero-based rubric score | |
| 66 | +| `legend` | json | Rubric descriptions keyed by level number | |
| 67 | +| `probabilities` | json | Probability of each option or rubric level | |
| 68 | +| `confidence` | number | Confidence in the answer, from 0 to 1 | |
| 69 | +| `model` | string | Versioned model ID used for evaluation | |
| 70 | +| `usage` | object | Token usage reported by TypeSafe | |
| 71 | +| ↳ `input_tokens` | number | Input tokens consumed | |
| 72 | +| ↳ `output_tokens` | number | Output tokens produced \(not billed by TypeSafe\) | |
| 73 | + |
| 74 | +### Jev Noul |
| 75 | + |
| 76 | +Evaluate a yes/no question with Jev and return the probability that the answer is yes. |
| 77 | + |
| 78 | +#### Input |
| 79 | + |
| 80 | +| Parameter | Type | Required | Description | |
| 81 | +| --------- | ---- | -------- | ----------- | |
| 82 | +| `apiKey` | string | Yes | TypeSafe API key from https://console.typesafe.ai | |
| 83 | +| `model` | string | No | Model ID or alias: jev-1.13.0, jev-latest, or jev-preview. Defaults to jev-1.13.0. | |
| 84 | +| `state` | json | Yes | Content to evaluate: a text string, JSON object, or array. | |
| 85 | +| `instructions` | json | Yes | The question to evaluate, as text, a JSON object, or an array. | |
| 86 | +| `criteria` | json | No | Optional object with true and false descriptions defining what yes and no mean. | |
| 87 | + |
| 88 | +#### Output |
| 89 | + |
| 90 | +| Parameter | Type | Description | |
| 91 | +| --------- | ---- | ----------- | |
| 92 | +| `noul` | number | Probability of yes, from 0 \(no\) to 1 \(yes\) | |
| 93 | +| `model` | string | Versioned model ID used for evaluation | |
| 94 | +| `usage` | object | Token usage reported by TypeSafe | |
| 95 | +| ↳ `input_tokens` | number | Input tokens consumed | |
| 96 | +| ↳ `output_tokens` | number | Output tokens produced \(not billed by TypeSafe\) | |
| 97 | + |
| 98 | +### Jev Evaluate |
| 99 | + |
| 100 | +Evaluate multiple Choice, Score, and Noul questions against shared state in one Jev request. |
| 101 | + |
| 102 | +#### Input |
| 103 | + |
| 104 | +| Parameter | Type | Required | Description | |
| 105 | +| --------- | ---- | -------- | ----------- | |
| 106 | +| `apiKey` | string | Yes | TypeSafe API key from https://console.typesafe.ai | |
| 107 | +| `model` | string | No | Model ID or alias: jev-1.13.0, jev-latest, or jev-preview. Defaults to jev-1.13.0. | |
| 108 | +| `state` | json | Yes | Content to evaluate: a text string, JSON object, or array. | |
| 109 | +| `questions` | json | Yes | Map of question IDs to \{type, instructions, criteria\}. Types: choice \(option map\), score \(2–10 ordered levels\), noul \(optional true/false descriptions\). Answers use the same IDs. | |
| 110 | + |
| 111 | +#### Output |
| 112 | + |
| 113 | +| Parameter | Type | Description | |
| 114 | +| --------- | ---- | ----------- | |
| 115 | +| `answers` | json | Answers keyed by question ID. Choice: type, choice, probabilities, confidence. Score: type, score, legend, probabilities, confidence. Noul: type, noul. | |
| 116 | +| `model` | string | Versioned model ID used for evaluation | |
| 117 | +| `usage` | object | Token usage reported by TypeSafe | |
| 118 | +| ↳ `input_tokens` | number | Input tokens consumed | |
| 119 | +| ↳ `output_tokens` | number | Output tokens produced \(not billed by TypeSafe\) | |
| 120 | + |
| 121 | + |
0 commit comments