---
name: typed-decisions
description: Use when you need a judgement about a text, image, audio clip, video or PDF that code or a next step will branch on, not prose — yes/no checks (is this a refund request, does the image show a person, is the answer supported by the source), picking one label or route from a fixed list (ticket routing, classification, which skill or model fits), or scoring on a rubric (quality, urgency, brand fit). Covers asking Gemini Decision 1 several narrow typed questions about one input in one call, reading its calibrated probabilities, and when to use a text model instead.
category: data
---

# Typed decisions

Gemini Decision 1 (`gemini/gemini-decision-1`) answers typed questions about one shared input and returns a calibrated probability for each, not text. Every question in a call reads the same input once; questions cannot see each other. It generates no output tokens: it costs only the input tokens it reads (the shared input once, plus each question's own words), so a check is a fraction of a cent, and it answers in about a second.

Find the tool, read its input schema before the first call, then run it.

## When to use it

Use it when the result is a decision something else acts on:

| Shape                                  | Question type               | Examples                                                                                                                        |
| -------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Detection: is a property present?      | `noul` (yes/no)             | refund request, a person in the image, profanity, a logo visible, the answer is supported by the passage, the run met the brief |
| Classification: one label from a list  | `choice` (2 to 255 options) | ticket team, document type, sentiment, language, which skill or tool fits the request                                           |
| Routing: the label picks the next step | `choice`                    | send to billing or support, cheap model or strong model, regenerate or keep                                                     |
| Scoring: a point on an ordered scale   | `score` (2 to 255 levels)   | urgency, image quality, brand fit, how well a draft follows the brief                                                           |

Typical jobs:

- **Check generated media before you deliver it or pay to chain it.** Ask yes/no questions about the image or video itself ("does the image contain readable text that matches the brief?", "is the product's label legible?", "is there more than one person?"). A low probability is the cue to regenerate or fix, not to describe the file in prose.
- **Guardrails and verification.** Is the request allowed, does the answer stay on the source, does a citation support or contradict the claim (`choice`: supports, contradicts, unsupported).
- **Triage at once.** One call with several questions: outage yes/no, priority choice, urgency score.
- **Pick from a long list.** Up to 255 options per question (skills, categories, templates), each with a one-line meaning.

## When to use a text model instead

- You need words, numbers or values extracted from the input (names, dates, totals, a summary, a transcript): Decisions returns labels and probabilities only. Use media understanding or a text model.
- You need to rank many separate items: each call has one shared input, so scoring 500 items is 500 calls. Prefer one call when the items fit in a single input as numbered entries and a `choice` over their numbers is enough.
- The judgement needs reasoning across steps or tools: let a text model reason, then use a decision to check its result.

## How to write the questions

1. **Put the thing being judged in `input`.** Text, or a list of parts: `text`, `image`, `audio`, `document` (PDF), `video`, each by `uri` (a public https link Google can fetch) or base64 `data`, with its `mime_type`. Images and video take `resolution` (`low` saves input tokens; use it unless detail matters).
2. **Ask narrow, single-purpose questions** in `questions`, keyed by your own ids. One property per question; compose the answers in your own logic rather than asking one compound question. "Is the customer asking for a refund?" and "Is the customer angry?" beat "Is this an angry refund request?".
3. **Say what the options mean.** For `choice`, `criteria` maps each option id to a one-line meaning. For `score`, `criteria` lists the levels lowest first: level 0 is the first. For an ambiguous yes/no, `criteria` with `true_description` and `false_description`.
4. **Read the answer.** A `noul` answer is the probability of yes (`noul`, 0.01 to 0.99). A `choice` answer is the top option (`choice`) with every option's `probabilities`. A `score` answer is the expected level (`score`), the `probabilities` per level and the `legend`. Every answer has `confidence`.
5. **Act on probabilities, not just the top label.** Decide a threshold per use: for a costly mistake require 0.9 or more; near 0.5 the model is unsure, so ask a sharper question, add context, or fall back to a text model or the user.

Example (one support message, three questions):

```json
{
  "input": "Every time I click Export to PDF the app crashes with error 504. Our audit is tomorrow.",
  "questions": {
    "refund": { "type": "noul", "instructions": "Is the customer asking for a refund?" },
    "route": {
      "type": "choice",
      "instructions": "Which team should handle this ticket?",
      "criteria": {
        "billing": "Invoices or refunds.",
        "technical_support": "Bugs or crashes.",
        "sales": "Plans and upgrades."
      }
    },
    "urgency": {
      "type": "score",
      "instructions": "How urgent is this ticket?",
      "criteria": ["not urgent", "somewhat urgent", "urgent", "critical"]
    }
  }
}
```

It answered: refund 0.015 (no), route `technical_support` at 0.999, urgency 2.70 (most likely "critical").

## Cost and limits

- Price: input tokens only, at Google's list price; no output tokens. Estimate the cost before a large batch.
- The input limit is 262,144 tokens; video and long audio use many. Prefer a short clip or still frames when the question is about one moment.
- If Google blocks the input for safety, no question is answered and the run fails with a content-policy error.
