Google AI Studio
Service

Google AI Studio

2026.11.12
·Service·by igor
#Agent#AI#DL#LLM#RAG

Key Points

  • 1The Decisions API provides a model-based service that evaluates inputs against specific questions to return calibrated probabilities for automated decision-making.
  • 2It supports three primary question types—yes/no, choice, and score—which eliminate the need for brittle text parsing and generate zero output tokens.
  • 3By processing inputs in parallel and returning confidence scores, the API allows developers to build robust, branchable workflows that can handle text, images, audio, video, and documents.

The Decisions API, powered by the gemini-decision-1 model, is a specialized interface designed for programmatic decision-making and logic branching. Unlike generative models that produce text, this service evaluates structured input against specific queries to return calibrated probabilities and confidence scores, effectively eliminating the need for brittle text parsing and reducing output token usage to zero.

Core Methodology

The API operates by performing parallel, isolated scoring, where multiple questions are evaluated against a shared input in a single forward pass. Each request requires the definition of a model, the input content (which can include text, images, audio, video, or documents), and a map of questions.

The system utilizes three distinct question types to process data:

  1. Yes/No (noul): Computes the calibrated probability that a statement is true, returning a value P∈[0.01,0.99]P \in [0.01, 0.99].
  2. Choice (choice): Evaluates input against a fixed set of options. It returns the chosen category and a probability distribution across all provided options ∑Pi=1.0\sum P_i = 1.0.
  3. Score (score): Rates input against an ordered rubric of levels (2 to 255). The return value is the probability-weighted average of index levels:
Score=∑i=0n(i⋅Pi)\text{Score} = \sum_{i=0}^{n} (i \cdot P_i)
where ii is the level index and PiP_i is the probability assigned to that level.

Technical Implementation and Features

  • Calibration and Confidence: Every response includes a confidence score, which serves as a metric for the model's certainty. For binary questions, confidence is defined as max⁡(Pyes,1−Pyes)\max(P_{\text{yes}}, 1 - P_{\text{yes}}). For choice and score types, it corresponds to the probability of the top-ranked outcome.
  • Input Handling: The API supports multi-modal inputs, including base64-encoded bytes for files or URIs via the Files API. Textual inputs, including serialized JSON, are processed as content blocks. It supports variable resolution settings for media, allowing developers to balance visual detail with token efficiency.
  • Best Practices for Logic: The documentation emphasizes building robust pipelines by delegating complex logic to code rather than prompt engineering. This involves:
    • Atomic Checks: Defining single-purpose questions and composing them using standard conditional statements (if/elseif/else) and weights.
    • Thresholding: Using the returned confidence levels to decide between automated execution and human-in-the-loop escalation.
    • Normalization: Normalizing score outputs between [0,1][0, 1] by dividing the result by the maximum level index to allow for comparison across heterogeneous rubrics.
    • Deterministic Sorting: Choice options are sorted alphabetically by their keys in UTF-8 order, a design constraint that developers must account for when designing catch-all categories.