4 December 2026

AI and agents, every day. Straight to it.

ToolsQuick notes

Google's Decisions API answers typed questions with probabilities instead of text

The API returns calibrated probabilities with zero output tokens, so code can branch without parsing text.

Lucas Ferraz

· 2 min read

Read in Portuguese

The Decisions API documentation on Google AI Studio swaps text generation for typed answers. Each call sends one shared input plus a map of questions. The gemini-decision-1 model sends back calibrated probabilities and spends zero output tokens. The page surfaced on Hacker News on November 11; the documentation carries no publication date of its own.

There are three question types:

  • noul handles yes/no and returns the probability of yes, always between 0.01 and 0.99. A threshold above 0.99 never fires.
  • choice picks from a fixed option list and spreads probability across all of them. Keys are sorted alphabetically by UTF-8 bytes, so none_of_the_above won't land last.
  • score rates input on 2 to 255 ordered levels, with 2 to 10 recommended. The result is a weighted average, so it can sit between two levels.

The quickstart needs SDK 3.2 or later (pip install -U google-genai):

from google import genai

client = genai.Client(http_options={"api_version": "v1beta"})

result = client.decisions.create(
    model="gemini-decision-1",
    input="The blue mug I ordered on Monday arrived cracked on Wednesday.",
    questions={
        "is_damaged": {
            "type": "noul",
            "instructions": "Did the item arrive damaged?",
        },
    },
)

answer = result.answers["is_damaged"]
print(f"P(yes)={answer.noul:.2f} confidence={answer.confidence:.2f}")

Every question runs in a single forward pass, isolated from the others. Any dependency between answers has to live in your own code, as if statements and weights.

Lucas Ferraz

Code & open source.

Read articles by Lucas FerrazEditorial policy
Report an error

Use 10–1,000 characters; a reply email shares this space.

Next in your reading list