12-04 更新 实时
首页/ 技术栈/ 正文

数据驱动的 AI 治理方法

技术栈 来源:Databricks Blog 2026-12-03 21:42 1 阅读 机器翻译
数据驱动的 AI 治理方法

我们采用数据驱动的方式来治理 AI:利用 AI 使用情况、成本、性能和智能体行为方面的数据,为预算、模型选型、智能体配置和安全策略等决策提供依据。正如我们在网络研讨会《大规模治理 AI 支出:数据驱动的 AI 治理方法》(Govern AI Spend at Scale: A Data-Driven Approach to AI Governance)中所分享的,这些经验帮助塑造了 Databricks Unity Gateway——一个企业级 AI 网关与控制平面,可集中管理对模型、智能体、MCP 服务器和技能(skills)的访问、成本管理、可观测性、智能路由与策略执行,包括那些托管在 Databricks 之外的资源。

衡量并监控 AI 使用情况与支出

统一跨模型与智能体的 AI 可观测性

当各团队各自独立地采用模型和智能体框架时,使用与支出数据便会分散在不同提供商之间。企业需要一个受治理的记录系统,以了解谁在使用 AI、成本是多少,以及智能体如何与企业资源交互。

Unity Gateway 在已连接的各 AI 服务之上提供集中式可观测性,并内置开箱即用的仪表盘,可按用户、模型、提供商和智能体框架追踪使用情况、性能与成本。

使用 AI 追踪来识别并消除浪费

AI 使用仪表盘能告诉你预算花在了哪里,但智能体追踪能揭示是什么推高了这些成本。Unity Gateway 在统一的追踪表中记录请求、响应和工具调用。企业可以应用基于属性的访问控制(ABAC)策略来保护追踪数据中的敏感信息,并使用 Genie 发现诸如未缓存的上下文、失败的工具调用以及用昂贵的前沿模型处理日常任务等低效问题。

在 Databricks,我们用这种方法定位了七个 MCP 服务器缺陷,这些缺陷估计每年造成 499,000 美元的 Token 成本和 12,000 小时的工程等待时间,而我们用大约一小时就将其修复。

这些经验促成了 Unity Gateway Insights 的诞生,它借助 Genie 将这一分析自动化。企业可以生成报告,展示各团队正在开展的工作、对 Token 浪费的来源进行排序,并给出降低成本的建议——从修复反复出现的 MCP 错误,到把常规任务路由给更高效的模型,再到将重复性工作流转化为共享技能。

让开发者掌握 AI 支出洞察与管控能力

提供对 AI 支出的实时可见性

在 Databricks,最初在工程团队之间共享 AI 使用数据有助于推动采用。团队可以向使用 AI 最活跃的成员学习,并采纳行之有效的做法。随着采用范围扩大,我们开始直接在开发者的终端中展示实时支出,帮助他们建立对不同模型、智能体配置和任务成本的直觉。

使用 Unity Gateway CLI 的开发者可以运行 ug usage,对照月度预算和每日支出上限跟踪用量,从而对自身的 AI 使用做出更明智的决策。该 CLI 还让企业能够集中配置并向受支持的编程智能体分发已批准的模型、MCP 服务器、技能和设置,把治理直接带入开发者现有的工作流。

防止 AI 智能体成本失控

正如企业让各团队对自己的运营预算负责一样,它们也应当为 AI 做同样的事。开发者有动力负责任地管理自己的预算,但他们也需要掌控自主智能体代表自己花钱的方式。

借助 Omnigent——Databricks 的开源元框架(meta-harness),开发者可以为单个任务或子智能体设置支出限额。例如,开发者可以让一个智能体开始执行任务,设置 10 美元的预算,然后就走开。如果该智能体达到这一限额,它会暂停并通知开发者,由开发者决定是否值得追加支出。

实施企业级 AI 成本与安全策略

建立集中化的 AI 预算与支出策略

AI 预算应反映工作负载、职责以及各团队从 AI 中获得的价值之间的差异。在整个工程组织内采用统一的支出限额,可能无法兼顾这些差异。借助 Unity Gateway 预算功能,管理员可以跟踪并控制 Databricks 托管模型以及所支持的外部模型提供商上的 AI 支出,建立共享预算和按用户划分的预算,在多个支出阈值上配置告警,并强制执行支出限额。

在不牺牲质量的前提下优化 AI 成本

正如我们在 Databricks AI Index 中所发现的,自 2026 年 5 月以来,几乎每周都会有一款新的旗舰级专有或开放权重模型发布。要跟上这样的创新节奏,企业需要基于每个成功任务的成本,而非仅凭 Token 价格,持续评估模型、智能体框架和推理设置。

在 Databricks,我们利用工程团队的真实拉取请求(pull request)构建了一个内部编码智能体基准测试。我们发现,即使不更换模型,降低推理强度并使用更轻量的智能体框架,也能在保持质量相当的情况下将成本降低约 50%。这些发现推动我们调整了默认的智能体配置。Unity Gateway CLI 还使企业能够集中配置和分发已批准的模型、MCP 服务器、技能和设置,覆盖受支持的各类编码智能体。

但没有任何单一配置能对所有任务都是最优的。Unity Gateway Smart Routing 有助于根据任务复杂度和模型能力自动完成模型选择。在我们的内部评估中,Smart Routing 将平均任务成本降低了 30% 以上,同时达到的质量与所评估工作集内最昂贵模型的质量相当。借助 Omnigent,企业可以将这一方式扩展到跨智能体框架的路由。

为 AI 智能体实施上下文安全策略

智能体轨迹也可以为安全决策提供依据。在 Databricks,轨迹分析发现了一些意外行为,例如智能体从不受信任的代码仓库下载软件包,这帮助我们的安全团队确定了需要额外管控的环节。

传统的允许或拒绝策略并不总能考虑到智能体在同一会话中此前的行为。例如,一个已经访问过包含个人身份信息(PII)的敏感客户数据的智能体,可能需要被阻止对外发布信息;而一个只处理公开数据的智能体则可以获准执行同样的动作。

Omnigent 中的上下文策略使执行决策能够基于智能体会话状态作出,而 Unity Gateway 的 AI 防护机制与运行时策略则为 AI 交互提供集中化管控。二者结合,可支持对智能体行为进行更细粒度的治理。

你的现代分析简明指南

点播观看《大规模治理 AI 支出:数据驱动的 AI 治理之道》,由 Databricks 联合创始人兼 CTO Matei Zaharia 与 AI 产品总监 Kasey Uhlenhuth 主讲。

在《大规模管理 AI 编码成本》中,探索更多来自 Databricks 内部 AI 采用的经验。

将你的模型和编码智能体接入 Databricks Unity Gateway,以集中实现 AI 可观测性、管理支出,并优化整个组织的 AI 使用量。

常见问题

什么是数据驱动的 AI 治理?

数据驱动的 AI 治理是一种基于模型与智能体实际运行数据来管理 AI 使用、成本、性能与安全的方法。企业不必仅依赖固定的支出上限和静态安全策略,而是可以利用使用指标和智能体追踪数据,为预算分配、模型选择、智能体配置和策略执行提供依据。Databricks Unity Gateway 通过统一的企业 AI 控制平面来支持这一方法。

企业如何大规模管理 AI 支出?

企业可以通过集中管理各模型提供商的 AI 使用量与成本追踪、建立细粒度的预算与支出策略,并让用户实时了解自身的消耗情况,来大规模管理 AI 支出。Databricks Unity Gateway 可对 Databricks 托管及所支持的外部模型提供商实现集中化的成本归因、实时预算、支出告警与强制执行。

企业如何在不为牺牲开发者生产力的情况下降低 AI 编程智能体的成本?

企业应针对“每个成功任务的成本”而非仅看“每个 Token 的成本”进行优化。在真实任务上对模型、智能体运行框架和推理设置进行基准测试,有助于找到更高效的配置。Databricks Unity Gateway Smart Routing 可根据任务需求自动选择模型,而 Unity Gateway CLI 则让开发者能够了解自己的支出情况。

AI 智能体追踪如何帮助减少浪费的 AI 支出?

原文较长,译文为节选;译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。

查看英文原文(A data-driven approach to AI governance)

We take a data-driven approach to AI governance: using data on AI usage, costs, performance and agent behavior to inform decisions on budgets, model selection, agent configurations and security policies. As we shared in our webinar, Govern AI Spend at Scale: A Data-Driven Approach to AI Governance, these lessons helped shape Databricks Unity Gateway, an enterprise AI gateway and control plane that centralizes access, cost management, observability, intelligent routing and policy enforcement across models, agents, MCP servers and skills, including those hosted outside Databricks.

Measure and monitor AI usage and spend

Unify AI observability across models and agents

When teams independently adopt models and agent harnesses, usage and spending data become fragmented across providers. Enterprises need a governed system of record to understand who is using AI, what it costs and how agents interact with enterprise resources.

Unity Gateway provides centralized observability across connected AI services, with out-of-the-box dashboards for tracking usage, performance and cost across users, models, providers and agent harnesses.

Use AI tracing to identify and eliminate waste

AI usage dashboards can tell you where your budget is going, but agent traces reveal what's driving those costs. Unity Gateway captures requests, responses and tool calls in a unified trace table. Organizations can apply attribute-based access control (ABAC) policies to protect sensitive information within traces and use Genie to uncover inefficiencies such as uncached context, failed tool calls and expensive frontier models handling routine tasks.

At Databricks, we used this approach to identify seven MCP server bugs responsible for an estimated $499,000 in annual token costs and 12,000 hours of annual engineering wait time, fixing them in approximately one hour.

These experiences helped inspire Unity Gateway Insights, which uses Genie to automate this analysis. Enterprises can generate reports that show what their teams are working on, rank sources of token waste, and recommend ways to reduce costs, from fixing recurring MCP errors to routing routine tasks to more efficient models and turning repetitive workflows into shared skills.

Empower developers with AI spending insights and controls

Provide real-time visibility into AI spending

At Databricks, sharing AI usage data across engineering teams initially helped drive adoption. Teams could learn from their most active AI users and adopt successful practices. As adoption grew, we began surfacing real-time spending directly in developers' terminals to help them develop intuition about the costs of different models, agent configurations and tasks.

Developers using the Unity Gateway CLI can run ug usage to track consumption against monthly budgets and daily spending limits, helping them make more informed decisions about their AI usage. The CLI also enables enterprises to centrally configure and distribute approved models, MCP servers, skills and settings across supported coding agents, bringing governance directly into developers' existing workflows.

Prevent runaway AI agent costs

Just as enterprises give teams responsibility for their operating budgets, they should do the same for AI. Developers have an incentive to manage their budgets responsibly, but they also need control over how autonomous agents spend on their behalf.

With Omnigent, Databricks' open source meta-harness, developers can set spending limits on individual tasks or sub-agents. For example, a developer can start an agent on a task, set a $10 budget and step away. If the agent reaches that limit, it pauses and notifies the developer, who can decide whether additional spending is justified.

Implement enterprise AI cost and security policies

Establish centralized AI budgets and spending policies

AI budgets should reflect differences in workloads, responsibilities and the value teams derive from AI. A uniform spending limit across an engineering organization may not account for these differences. With Unity Gateway budgets, administrators can track and control AI spending across Databricks-hosted and supported external model providers, establish shared and per-user budgets, configure alerts at multiple spending thresholds and enforce spending limits.

Optimize AI costs without sacrificing quality

As we found in the Databricks AI Index, a new flagship proprietary or open-weight model has launched roughly every week since May 2026. Keeping up with this pace of innovation requires enterprises to continuously evaluate models, agent harnesses and reasoning settings based on cost per successful task, rather than token prices alone.

At Databricks, we built an internal coding-agent benchmark using real pull requests from our engineering teams. We found that even without switching models, lowering reasoning effort and using more lightweight agent harnesses could reduce costs by approximately 50% while maintaining comparable quality. These findings informed changes to our default agent configurations. The Unity Gateway CLI also enables enterprises to centrally configure and distribute approved models, MCP servers, skills and settings across supported coding agents. 

But no single configuration is optimal for every task. Unity Gateway Smart Routing helps automate model selection based on task complexity and model capabilities. In our internal evaluations, Smart Routing reduced average task costs by more than 30% while achieving quality comparable to that of the most expensive model in the evaluated working set. With Omnigent, enterprises can extend this approach to routing across agent harnesses.

Enforce contextual security policies for AI agents

Agent traces can also inform security decisions. At Databricks, trace analysis uncovered unexpected behaviors, such as agents downloading packages from untrusted repositories, helping our security team identify where additional controls were needed.

Traditional allow or deny policies do not always account for what an agent has done earlier in a session. For example, an agent that has accessed sensitive customer data containing personally identifiable information (PII) may need to be prevented from publishing information externally, while an agent working exclusively with public data could be permitted to perform the same action.

Contextual policies in Omnigent enable enforcement decisions based on agent session state, while Unity Gateway's AI guardrails and runtime policies provide centralized controls over AI interactions. Together, these capabilities support more granular governance of agent behavior.

Your compact guide to modern analytics

Watch Govern AI Spend at Scale: A Data-Driven Approach to AI Governance on demand with Databricks co-founder and CTO Matei Zaharia and AI Product Director Kasey Uhlenhuth.

Explore more lessons from Databricks' internal AI adoption in Managing AI coding costs at scale.

Connect your models and coding agents to Databricks Unity Gateway to centralize AI observability, manage spending and optimize AI consumption across your organization.

Frequently asked questions

What is data-driven AI governance?

Data-driven AI governance is an approach to managing AI usage, costs, performance and security based on data about how models and agents actually operate. Rather than relying solely on fixed spending limits and static security policies, enterprises can use usage metrics and agent traces to inform budget allocation, model selection, agent configurations and policy enforcement. Databricks Unity Gateway enables this approach through a unified enterprise AI control plane.

How can enterprises manage AI spend at scale?

Enterprises can manage AI spend at scale by centralizing AI usage and cost tracking across model providers, establishing granular budgets and spending policies, and giving users real-time visibility into their consumption. Databricks Unity Gateway provides centralized cost attribution, real-time budgets, spending alerts and enforcement across Databricks-hosted and supported external model providers.

How can enterprises reduce AI coding agent costs without sacrificing developer productivity?

Enterprises should optimize for cost per successful task rather than cost per token alone. Benchmarking models, agent harnesses and reasoning settings on real-world tasks can help identify more efficient configurations. Databricks Unity Gateway Smart Routing automates model selection based on task requirements, while the Unity Gateway CLI gives developers visibility into their own spending.

How can AI agent tracing help reduce wasted AI spend?

AI agent traces capture requests, responses and tool calls, helping enterprises identify sources of unnecessary spending such as uncached context, failed MCP tool calls and inefficient model selection. Databricks Unity Gateway captures agent traces in a unified trace table, while Unity Gateway Insights generates reports that identify and rank sources of token waste and recommend opportunities for cost savings.

How can enterprises prevent runaway AI agent costs?

Enterprises can prevent runaway AI agent costs by combining centralized spending limits with real-time spending visibility and granular task-level budgets. Databricks Unity Gateway enables administrators to establish budgets and enforce spending policies, while Omnigent allows developers to set spending limits on individual tasks or sub-agents and approve additional spending before work continues.

Get the latest posts in your inbox

原文为英文,正文由自动抓取并保留原文。

本文由采集器自动同步

原文发布于 Databricks Blog(A data-driven approach to AI governance),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。

阅读原文 ↗