Newshot
Account

谷歌推出 Gemini Decisions API,支持多模态快速校准决策

AI summary

谷歌发布 Gemini Decisions API,由 Gemini Decision 模型驱动。该 API 面向多模态场景,主打快速且经过校准的决策能力。

Translation(model translation, not the source's own text)

今天,我们推出 Gemini Decisions API,这是一个用于快速、封闭集决策的新端点,由我们全新的 Gemini Decision 1 模型(gemini-decision-1)驱动,可通过 Google AI Studio 中的 Gemini API 使用。

Decisions API 为你提供专门构建的原语,用于工具选择、策略检查、模型路由和上下文分级等有界选择。你可以跨文本、图像、音频、视频和 PDF(最多 256K tokens)传入一个多模态输入,以及最多 1,000 个独立问题。Gemini Decision 1 不会逐 token 生成答案文本,而是在单次前向传播中对候选选项进行评分,返回概率和置信度分数,端到端延迟为 150-250 ms,价格为每 1M 输入 tokens $0.10,且输出 tokens 不计费。

Gemini Decision 与其他 API 在各项基准上的对比
Gemini Decision 与其他 API 在各项基准上的对比

强劲的性能与校准

在涵盖 agent 路由、推理、排序和多模态理解的基准上,Gemini Decision 1 在整个套件中领先,并具有最低的校准误差。

Decisions API 与其他 API 的基准对比
Decisions API 与其他 API 的基准对比

Gemini Decision 1 在不进行逐 token 解码的情况下对选项评分,在多模态输入和最多 16K tokens 的上下文中,模型计算的中位延迟保持在 50-100 ms(端到端 150-250 ms),并且从每个请求 1 个问题到 100 个问题几乎保持平稳。由于输出 tokens 不计费,在共享基准套件上,使用 Decisions API 的 Gemini Decision 1 比使用 Interactions API 的 Gemini 3.5 Flash-Lite 便宜近 5 倍。

一次前向传播中跨三种决策类型的原生多模态评估

Gemini Decision 1 构建于 Gemini 的原生多模态架构之上,可以在单次前向传播中直接处理文本、图像、音频、视频和 PDF。你可以在一个共享输入中组合多种模态,例如将通话录音与账户元数据配对,或将扫描的 PDF 理赔单与损坏照片配对,并调整图像和视频输入的分辨率以控制视觉细节和 token 成本。

你可以在单个请求中针对该共享输入评估多个问题,混合 yes/no 检查、多项选择和评分量表分数。每个答案都包含置信度分数(从 0 到 1),以便你的代码将模糊情况路由到回退方案或人工审核员:

  • noul(Yes/No):估计 yes/no 条件成立的概率,可选提供 true 和 false 描述标准。
  • choice(Multiple Choice):从 2 到 255 个选项中选择,返回获胜者以及每个候选的归一化概率。
  • score(Ordered Rubric):按照有序评分量表(从 0 开始)对输入评分,返回连续的加权分数和每个级别的概率。

输入字段使用与 Interactions API 相同的 Content block 格式。以下是如何在单个请求中,将休息室台面的照片连同文本备注,对照全部三种问题类型进行检查:


        from google import genai

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

result = client.decisions.create(
    model="gemini-decision-1",
    input=[{
            "type": "image",
            "uri": "https://storage.googleapis.com/generativeai-downloads/images/spill.jpg",
            "mime_type": "image/jpeg",
        },
        {
            "type": "text",
            "text": "Breakroom counter check before the 9 AM client meeting.",
        },
    ],
    questions={
        "has_spill": {
            "type": "noul",
            "instructions": "Is there an uncleaned liquid spill on the counter?",
        },
        "next_action": {
            "type": "choice",
            "instructions": "Which cleanup action fits the scene?",
            "criteria": {
                "wipe_with_cloth": "Small counter spill with a cloth or towel already nearby.",
                "dispatch_janitorial": "Large floor hazard, broken glass, or active leak.",
                "ready_for_meeting": "Counter is clean and ready.",
            },
        },
        "severity": {
            "type": "score",
            "instructions": "Rate the severity of the counter mess.",
            "criteria": [
                "Clean and ready.",
                "Minor localized spill.",
                "Major spill or safety hazard.",
            ],
        },
    },
)
      
Gemini 检测到泼洒,next_action 为 wipe_with_cloth
Gemini 检测到泼洒,next_action 为 wipe_with_cloth

团队如何基于 Decisions API 构建应用

Google 内部的多个团队已将 Decisions API 用作低延迟控制平面,只需定义选项即可交付功能,而无需训练自定义分类器或等待生成式调用:

  • Gemini Notebook 中的动态模型路由:Gemini Notebook 使用 Decisions API 作为实时路由器,将传入查询即时导向最适合该请求的模型层级与思考级别。Decisions API 可在毫秒级完成意图分类,使日常查询的延迟最多降低 40%,同时将深度推理模型保留给复杂任务。
  • Stitch 中的快速设计迭代:Stitch 全新的快速画布实验使用 Decisions API 在数秒内生成产品流程的可交互线框图,并几乎即时应用通过语音或点按做出的编辑。当流程感觉合适时,一键即可将屏幕移交至完整的 Stitch 体验,进行更深入的设计打磨。
  • CC 中的表情选择:来自 Google Labs 的 CC 使用 Decisions API 从 200 多个选项的调色板中在几分之一秒内选出合适的表情回应,使回应即时出现且不增加延迟。
  • Search 中 MCP 工具的安全层:Google Search 使用 Decision API 在延迟范围内高效检测对抗性行为与内容,以对抗对抗性评估。

Stitch Rapid 使用 Decisions API 在数秒内设计完整的产品流程(1 倍速)。

立即开始构建

Gemini Decision 1 的定价为每 1M 输入 token 0.10 美元,输出 token 0 美元,并提供可在 Google AI Studio 中用于原型开发的 API 免费层级。无论评估多少个问题,共享输入每次请求仅计费一次(每个问题仅增加其自身的指令与条件 token)。没有输出 token 费用、可变的思考 token 账单,也没有单独的音频转写与 OCR 费用。

你可以立即开始构建:在 Google AI Studio 中获取 API key,试用我们的 Doorstep Parcels、Speed Sketch 和 Find the Zoo Keeper 演示应用,并按照 Decisions API 文档中的 Python、JavaScript 和 REST 指南操作。

生态集成正在 OpenRouter、LangChain、Vercel、LiteLLM、Pydantic AI、Pipecat、LiveKit 和 OpenCode 上陆续推出,并与 google-genai SDK 一同提供,对 Google Cloud 中 Gemini 的支持也即将到来。

在收件箱中获取 Google 最新资讯

订阅我们的新闻通讯,获取产品更新、活动信息、特别优惠等更多内容。

完成。只差一步。

请查收收件箱以确认订阅。

你也可以使用 订阅。

你的信息将按照 Google 隐私政策使用。你可以随时退订。

The translation is machine-generated and individual terms may be off. Nothing is rewritten or cut; the original is authoritative.

Published by Google AI 官方
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗