基于 Microsoft Foundry 的智能体式 AI——生成式 AI 与智能体式 AI 导论

17 阅读17分钟

Generative AI 正在改变我们构建软件、分析数据和自动化决策的方式。但这种演进并不会止步于文本生成。下一个前沿是 agentic AI,也就是能够推理、规划、使用工具并采取行动来完成目标的系统。Microsoft Foundry 将这些能力汇聚到一个 enterprise-ready platform 中,用于构建、评估和扩展智能解决方案。

在本章中,你将为 generative AI 和 agentic AI 建立坚实的概念基础。你将从高层理解 large language models(LLMs)如何工作,AI systems 如何从 prompt-based interactions 走向 autonomous agents,以及 Microsoft Foundry 如何提供基础设施,以负责任的方式 operationalize 这些系统。

到本章结束时,你将清楚理解 generative AI 和 agentic AI 之间的差异,它们如何适配 enterprise architecture,以及 Foundry 如何支持 secure、scalable 的 AI development。

本章将覆盖以下主题:

  • Understanding generative AI fundamentals
  • Exploring agentic AI and autonomous systems
  • Examining Microsoft Foundry and its core capabilities

Understanding generative AI fundamentals

在本节中,我们将通过把 generative AI 放入更广阔的 artificial intelligence landscape 中,建立对它的结构化理解。在探索 agentic systems 之前,理解支撑 generative systems 的 foundational building blocks 非常重要。

Artificial intelligence 是一个更广泛的学科,关注如何让机器模拟人类智能的某些方面。在实践中,AI systems 被设计为能够感知信息、对信息进行推理、从数据中学习,并做出决策或预测。在 enterprise environments 中,AI workloads 通常分为几类:

Machine learning(ML) :训练 models 以检测数据中的 patterns 并做出 predictions。

Computer vision:解释 images 和 video 等 visual data。

Natural language processing(NLP) :理解和生成 human language。

Knowledge mining:从大量 structured 和 unstructured data 中提取 insights。

Generative AI 建立在这些基础之上,但对它们进行了显著扩展。

要理解 generative AI 如何出现,可以将它视为 AI systems 更广泛演进的一部分。20 世纪 80 年代和 90 年代的早期 AI systems 依赖 rule-based logic 和 expert systems,这些系统在 scalability 和 adaptability 上受到限制。进入 2000 年代后,machine learning 将范式转向 data-driven models,这些模型能够进行 prediction 和 classification。2010 年代,deep learning 兴起,通过在大型 datasets 上训练 neural networks,在 computer vision 和 natural language processing 中实现突破。

2010 年代末 transformer architectures 的出现,是一个重要转折点,它使 models 能够在大规模上下文中理解 context。这推动了 LLMs 的出现,而 LLMs 正是现代 generative AI systems 的核心动力。最近,这些 models 又与 orchestration frameworks、tools 和 memory 结合,形成 agentic systems,标志着从 generation 到 action 的转变。

From machine learning to deep learning

Traditional machine learning models 学习 inputs 和 outputs 之间的统计关系。例如,classification model 可能判断一封 email 是否为 spam;regression model 可能基于 historical trends 预测 sales。

Deep learning 通过使用多层 neural networks 自动学习大型 datasets 中的复杂 patterns,从而推进了这种能力。这些 deep neural network architectures 使 systems 能以比早期方法更高的 accuracy 和 flexibility 处理 text、speech 和 images。

Generative AI systems 通常由在 massive corpora of data 上训练的 deep learning models 驱动。这些 models 并不是预测一个固定 category 或 value,而是学习 sequences 上的 probability distributions,使它们能够逐 token 生成新内容。

Understanding foundation models and LLMs

现代 generative AI 的核心是 foundation models,也就是在广泛且多样化 datasets 上训练的大规模 models。这些 models 并不是为某一个狭窄任务设计的。相反,它们会获得 general capabilities,之后可以适配到许多 use cases。

LLMs 是 foundation model 的一种具体类型,经过训练可以理解和生成 natural language。由于它们能够大规模建模 words、phrases 和 contextual meaning 之间的关系,因此可以应用到广泛的 enterprise scenarios。例如,它们可以为 investor relations teams 总结 quarterly earnings calls,从 technical documentation 中生成 executive briefings,帮助 developers 生成 code snippets,或基于 historical interactions 帮助 customer service teams 起草 responses。

Foundation models 不需要针对每个任务从头 retrain,而是通过以下技术进行适配:

Prompt design:组织 inputs,引导 model 生成期望 outputs。

Retrieval-augmented generation(RAG) :在 runtime 检索相关 external data,为 responses 提供 grounding。

Fine-tuning:在 domain-specific data 上进一步训练 model,以提升特定任务 performance。

Tool integration:使 model 能够调用 APIs、databases 或 search services 等 external systems。

这种转变显著降低了部署 AI-powered applications 的时间和成本。

Why generative AI matters in enterprise systems

Generative AI 改变了组织与数据和软件交互的方式。企业不再只能构建 rigid interfaces 和 predefined workflows,而是可以启用 natural language interaction with systems,自动化 document-intensive processes,并在不同业务职能中嵌入 AI copilots。

不过,generative AI 也引入了新的考虑因素:

  • Model evaluation and reliability
  • Data grounding and hallucination mitigation
  • Responsible AI governance
  • Security and compliance controls

这些考虑在 enterprise environments 中尤其关键,也是 Microsoft Foundry 设计中的核心内容。

通过理解 AI 如何从 traditional machine learning 演进到 deep learning,最终走向 foundation models,你现在已经准备好探索下一步:不仅生成 responses,而且能够 reason、plan 和 act 的系统。

下一节中,我们将从 generative AI 过渡到 agentic AI。

Exploring agentic AI and autonomous systems

在本节中,你将学习 AI systems 如何从被动 text generators 演进为 goal-driven agents,具备 reasoning、planning 和 taking action 的能力。在 Microsoft Foundry 中构建真实世界企业 AI 解决方案之前,理解这一演进非常重要。

Generative AI systems 生成 responses。Agentic AI systems 追求 objectives。

Agent 不只是一个 model。它是一个 managed orchestration layer,将 model 与 instructions、tools、execution context 和 conversation state 结合起来。Agent 不只是简单生成文本,而是协调 responses 如何生成、何时调用 tools,以及 goals 如何完成。

在 enterprise scenarios 中,这种能力使 systems 不仅能回答问题,还能端到端完成任务。例如,一个 agent 可以分析 incoming customer support tickets,检索相关 knowledge base articles,并自动起草或发送 responses。在 financial operations 中,agent 可以从多个 systems 收集数据,根据 policy rules 进行验证,并生成 compliance report。在 supply chain scenarios 中,agent 可以监控 inventory levels,查询 external systems 获取 delays 信息,并推荐或启动 replenishment actions。

Agentic AI systems 由五项核心能力定义:

  • Reasoning about objectives
  • Planning multi-step workflows
  • Using external tools,例如 APIs、search、databases、enterprise systems
  • Maintaining memory and state
  • Executing actions toward a defined goal

这些能力结合起来,将 AI 从 reactive assistant 转变为能够完成 structured tasks 的 proactive system。

下一小节中,我们将考察它与传统 prompt-based applications 的区别。

Understanding reasoning and goal interpretation

在 agent 能够行动之前,它必须解释 intent。Prompt-based systems 会对文本做出响应;agentic systems 则解释 objectives。

当 user 提供 input 时,agent 会执行以下操作:

  • 确定 underlying goal。
  • 识别 missing information。
  • 判断是否需要 additional data 或 tool calls。
  • 定义 successful outcome 是什么。

这一步 reasoning 在 enterprise environments 中非常关键,因为企业任务很少能通过单次交互完成。例如,生成一份 report 可能需要 retrieve data、validate figures、format output,并将结果保存到系统中。

通过将 user input 视为 goal,而不是单一 request,agents 将 structured decision-making 引入 AI workflows。这种 reasoning capability 为 planning 奠定基础。

Understanding the shift from prompting to planning

Prompt-based systems 运行在一个简单循环中:

  • Single input produces single output。
  • 通常除了 conversation history 之外是 stateless。
  • 没有用于调用 external tools 的 structured mechanism。

这些 systems 非常适合 summarization、drafting、translation 和 question answering tasks。不过,它们完全依赖 prompt 中的内容和 model training data。Agentic systems 引入一个 orchestration layer,支持:

  • Multi-step execution
  • Conditional logic and branching
  • Iterative refinement
  • Tool selection and invocation
  • Context persistence across steps

Agent 不一定会立即回答。它可能先 retrieve documents,然后 analyze them,再 call an external API,最后生成 structured output。每一步都会为下一步提供信息。这种从 prompting 到 planning 的演进,使 AI systems 能参与真实 business workflows,而不是只处理孤立任务。接下来,我们将考察 tools 如何让这种 orchestration 变得可实践。

Understanding tools as first-class capabilities

Tools 通过让 agent 与 external systems 交互并执行 real-world operations,将 model 扩展到 text generation 之外。Standalone model 只能基于 training 和 input context 生成 responses,而 tools 让 agents 能 retrieve data、trigger workflows,并与 enterprise systems 集成。

在基于 Microsoft Foundry 的 architectures 中,tools 通常代表到 external capabilities 的连接,例如 enterprise search indexes、databases、REST APIs、business applications、file storage systems 或 custom function endpoints。

Custom function endpoints 在 enterprise environments 中尤其重要,因为它们允许组织暴露 legacy 或 on-premises systems 的功能,而这些系统可能没有现代 API interfaces。通过将这些系统包装为 callable functions,企业可以把旧 applications 集成进 agent workflows,而不需要完整 system redesign。这些 integrations 让 agent 超越 static responses,并能够在更广泛的 enterprise ecosystem 中运行。

要理解为什么 tools 必不可少,可以考察 agent 如何端到端处理 request。当 user 提交 request 时,agent 首先解释 intent,并判断是否需要额外 information 或 actions。随后,model 会根据 available capabilities 和 request context 决定调用哪个 tool。System 安全地执行所选 tool,检索 results,并将它们返回给 model。最后,agent 会合成一个 response,将 retrieved data 和原始 user intent 结合起来。

这种 orchestration pattern 非常关键,因为它允许 system 将 responses 建立在真实数据之上,而不是仅依赖 pre-trained knowledge。因此,它可以减少 hallucinations、提升 accuracy,并支持与 enterprise systems 的安全交互。

通过将 capabilities externalize 成 tools,developers 避免把复杂或脆弱的 logic 直接嵌入 prompts。相反,他们可以创建 modular 和 reusable components,由 agent 动态 orchestration。这会带来更 maintainable 和 scalable architectures,尤其适合 systems 需要随时间演进的 enterprise environments。

为了理解 tools 如何支持真实世界功能,必须看 agentic systems 中常见的 execution pattern。这种 orchestration pattern 非常重要,因为它解决了传统 prompt-based systems 的一个关键限制:无法可靠访问 external data,也无法以 controlled、repeatable 的方式执行 actions。在 enterprise environments 中,accuracy、security 和 traceability 都非常关键;这种 structured sequence 确保从 interpretation 到 execution 的每一步都被显式处理,而不是隐式藏在单个 model response 中。

实践中,这个过程展开为一个协调序列。User 提交 request,agent 首先解释 intent。基于该 intent,model 决定是否需要 external data 或 actions,并选择合适 tool。System 随后安全执行 tool,检索 results,并将结果返回给 model。最后,agent 生成 response,将检索到的信息与原始 request 结合起来。

这种 structured orchestration 使 enterprise AI systems 能够超越简单 text generation,进入可靠 task execution。它通过将 responses grounding 到真实数据中来减少 hallucinations,通过标准化 actions 执行方式提升 consistency,并确保与 enterprise systems 的交互 secure 且 auditable。

通过将 capabilities externalize 成 tools,developers 避免把脆弱 logic 直接嵌入 prompts,而是构建 modular、maintainable 且可随时间演进的 systems。

在 reasoning 和 tool integration 就位之后,下一个需要考虑的关键组件是 memory,它使 agents 能够跨 interactions 维持 context 和 continuity。

Understanding memory and state management

Agentic systems 必须在 interactions 之间维持 continuity,以执行 multi-step tasks 并支持 ongoing workflows。不同于传统 prompt-based systems 将每个 request 独立处理,agentic systems 依赖 memory 来保留 context,并支持更 coherent 和 efficient 的行为。

从高层看,agentic systems 中的 memory 可以分为两类:short-term memory 和 long-term memory。

Short-term memory 指在单次 interaction 或 session 中维护的 context。这包括 recent conversation history、retrieved data、intermediate reasoning steps、system-level instructions,以及 prior tool outputs 等元素。这类 memory 使 agent 能在一个 conversation 内保持一致,避免重复步骤,并随着新信息出现 refine responses。

Long-term memory 则会超出单次 session 持久存在。它可能包括 stored user preferences、historical interactions、domain knowledge,或随时间积累的 insights。在 enterprise scenarios 中,long-term memory 可以支持 personalized user experiences、tracking ongoing cases,或从 past workflows 中学习等能力。

这些 memory forms 结合起来,使 agents 能更有效地运行。Short-term memory 确保任务内部的 coherence,而 long-term memory 支持跨任务和跨时间的 continuity。这种组合让 agents 能避免 redundant work、保持 consistency,并支持更复杂的 multi-step workflows。

如果没有 memory,每次 interaction 都会重置 context,迫使 system 反复 recompute 或 rediscover information。有了 memory,agents 可以成为 enterprise processes 中持续存在的 collaborators,基于 prior interactions 继续推进,而不是每次从零开始。

因此,memory 将 AI 从 transactional responder 转变为 persistent system participant。

完成 agent model 的最后一项能力,是 action execution。

Understanding action execution and enterprise automation

Agent 的定义性特征是它能够 take action。Actions 可以包括创建 support tickets、更新 CRM records、写入 database、触发 workflow pipelines,以及生成并存储 reports。

当 agents 结合 reasoning、planning、tool use 和 memory 时,它们就具备 structured automation 能力。这一转变支持以下 enterprise scenarios:

  • Multi-agent orchestration,其中 specialized agents 协作。
  • Data enrichment pipelines,用于 validate 和 augment records。
  • Automated research assistants,用于 retrieve、synthesize 和 verify information。
  • 跨 line-of-business systems 的 intelligent process automation。

这些能力将 AI 从 assistance 推向 operational execution。在继续深入之前,必须理解支持这些能力规模化运行的平台。

下一节中,我们将从概念上考察 Microsoft Foundry,重点关注它支持 enterprise AI systems 的 architecture 和 core capabilities。

Examining Microsoft Foundry and its core capabilities

随着 AI systems 从简单 prompt-based interactions 演进到 agentic workflows,它们需要一个能支持 orchestration、governance、scalability,并能与 enterprise systems 安全集成的平台。

Microsoft Foundry 提供了构建、管理和治理大规模 agentic AI systems 所需的结构化环境。

Foundry 将工作组织为 projects,这些 projects 充当以下内容的 logical boundaries:

  • Model deployments
  • Agent definitions
  • Tool connections
  • Security policies
  • Networking configurations
  • Evaluation workflows

这种 project-based structure 确保 AI systems 不再是孤立实验,而是与 enterprise security 和 compliance requirements 对齐的 governed assets。

Foundry 还支持连接 external resources 和 shared infrastructure,使其能够与 enterprise data 和 services 安全集成。

通过结合 model access、orchestration capabilities、evaluation tooling 和 governance controls,Foundry 为 production-grade agentic AI 提供必要基础。

在本节中,我们将考察这些能力如何汇聚起来,支持 AI application development 的完整 lifecycle。

Understanding the role of Foundry in the AI lifecycle

Microsoft Foundry 被设计为一个 end-to-end AI platform,支持 intelligent applications 从 experimentation 到 production deployment 的完整 lifecycle。

从高层看,Foundry 使 teams 能够:

  • 从 unified catalog 中 discover 和 select models。
  • 使用 prompts、tools 和 agents 构建 applications。
  • 使用 enterprise data 为 models 提供 grounding。
  • 评估 outputs 的 quality、safety 和 relevance。
  • 在 production environments 中 deploy 和 monitor solutions。

不同于传统 development approaches 中 models、data pipelines 和 application logic 分开管理,Foundry 将这些 components 汇聚到一个 integrated environment 中。这减少了 fragmentation,并使 teams 能够在保持 development stages 一致性的同时更快 iterate。这种 lifecycle-oriented design 使组织能够从 proof of concept 走向 enterprise-scale AI solutions。

Understanding projects as the core organizational unit

Projects 是 Microsoft Foundry 中的 foundational building blocks。

一个 project 充当构建和管理 AI application 所需全部 resources 的 container,包括:

  • Deployed models
  • Prompt templates and flows
  • Agent configurations
  • Data connections
  • Evaluation results

Projects 也定义了 access control and permissions、resource isolation 和 configuration management 的 boundaries。

这种结构允许多个 teams 独立工作,同时仍然遵守 centralized governance policies。例如,一个 development team 可以在一个 project 中实验,而同一 solution 的 production-ready version 可以部署在另一个 project 中,并施加更严格 controls。通过将 AI assets 组织到 projects 中,Foundry 确保 solutions 可以 repeatability、traceability,并在 environments 之间 controlled promotion。

在大规模管理多个 agents 和 workflows 时,这一概念尤其重要。

Understanding model access and the model catalog

Foundry 的核心是对多样化 model ecosystem 的访问。Model catalog 提供:

  • 访问一个广泛且持续演进的生态,包含来自多个 providers 的约 11,337 个 models,使 developers 能够为具体 use case 选择最合适的 model。
  • Proprietary models,例如 OpenAI models,包括 GPT-4、GPT-4.1 和 GPT-4o,用于 language 和 multimodal tasks。
  • Microsoft-developed models,包括 Phi family models,针对 efficiency 和 cost-sensitive workloads 做了优化。
  • Open-source foundation models,例如 Llama、Mistral,以及其他 community-driven models,支持 customization 和 deployment flexibility。
  • Task-specific models,针对不同 workloads 优化,包括 embedding models、vision models 和 speech models,用于 specialized scenarios。

这允许 developers 和 architects 基于 performance requirements、cost considerations、latency constraints,以及 regulatory and compliance needs 选择 models。

Foundry 不是将用户锁定到单一 model provider,而是支持 model choices 之间的 flexibility 和 portability。这种 abstraction 在 enterprise environments 中非常关键,因为不同 use cases 可能需要不同的 model characteristics。因此,model selection 不只是技术决策,也是 architecture decision。

Understanding tools, data, grounding, and connections

Enterprise AI systems 必须与真实数据交互。Foundry 通过对 external resources 的 structured connections 支持这一点,使 agents 和 applications 能访问:

  • Enterprise knowledge bases
  • Document repositories
  • Databases
  • APIs and line-of-business systems

这一能力支持 grounding,也就是用相关且最新的数据增强 model responses,而不是仅依赖 training data。Grounding 可以提升 accuracy、relevance 和 trustworthiness。它还支持 RAG 等 scenarios,在这类场景中,models 会在生成 responses 前 retrieve context。

Connections 在平台内被安全管理,确保对 sensitive data 的访问遵循 enterprise policies 和 identity controls。这一 integration layer 对构建真实世界 AI applications 至关重要。

Understanding evaluation, governance, and responsible AI

随着 AI systems 变得更加 autonomous,evaluation 和 governance 变得至关重要。

Foundry 包含内置能力,可以:

  • 评估 model outputs 的 quality 和 relevance。
  • 随时间监控 performance。
  • 检测 unsafe 或 biased outputs。
  • 应用 safety filters 和 policies。

这些能力与 responsible AI principles 对齐,确保 systems reliable、transparent、secure 且 compliant。在 enterprise environments 中,这不是可选项,而是 requirement。通过将 evaluation 和 governance 直接嵌入平台,Foundry 使 teams 能够负责任地 operationalize AI,而不是将其视为事后补充。

实践中,这通过 built-in evaluation pipelines 实现,这些 pipelines 会根据 groundedness、relevance 和 safety 等定义好的 metrics 评估 model outputs;同时,monitoring capabilities 会随时间跟踪 performance 和 behavior。Foundry 还集成 content filtering、policy enforcement,以及 prompt / response inspection 等 safety systems,用于检测 harmful 或 non-compliant outputs。此外,governance 还通过 role-based access control(RBAC)、managed identity、audit logging,以及与 enterprise security frameworks 的集成得到强化,确保 data access 和 model usage 被适当控制。

Evaluation、safety 和 governance mechanisms 的结合,确保 AI systems 可以被 trusted,并在组织范围内 scale。

Understanding how Foundry enables production-grade AI systems

当 models、tools、data、orchestration 和 governance 等所有 components 结合起来时,Foundry 就能够支持从 experimentation 到 production 的转变。

一个 production-grade AI system 需要 scalable infrastructure、secure data access、repeatable deployment processes、continuous monitoring and evaluation,以及明确的 governance boundaries。Foundry 原生提供这些能力,使 teams 可以专注于构建 intelligent solutions,而不是拼接彼此分散的 services。

这正是 enterprise AI platforms 与 isolated AI tools 的区别。通过提供统一环境,Foundry 在保持 control、security 和 reliability 的同时加速 development。

Summary

本章建立了支撑现代 AI systems 的基础概念。我们首先在更广泛的 artificial intelligence landscape 中探索 generative AI,包括它如何建立在 machine learning 和 deep learning 之上,以及 foundation models 和 large language models 如何在 enterprise scenarios 中支持新的内容生成形式。

随后,我们考察了向 agentic AI 的演进。在这种 AI 中,systems 不再只是生成 responses,而是能够围绕 goals 进行 reasoning、规划 multi-step workflows,并通过 tools 和 memory 采取 action。这一转变代表着从 passive assistants 到 active、goal-driven systems 的过渡,这些系统能够支持真实世界 business processes。

接下来,我们介绍了 Microsoft Foundry 及其 core capabilities,包括 project-based architecture、model catalog,以及与 enterprise data 和 tools 的集成。我们讨论了 Foundry 如何提供统一平台,用于大规模构建、管理和治理 AI applications。

我们还探索了 tool integration、memory and state management、evaluation and governance 等关键 architectural components,强调这些能力如何在 enterprise environments 中支持 reliable、secure 和 production-ready AI systems。

理解这些概念非常重要,但真正的价值只有在你开始实践构建和交互这些系统时才会体现。下一章中,你将设置 Microsoft Foundry environment,创建第一个 project,并开始使用 models,从理论迈出走向 hands-on implementation 的第一步。