When you design AI workloads, the code and data that you integrate replaces deterministic behavior. This shift facilitates tasks like prediction, classification, and other functional goals. AI workload architecture can often be complex and must align with business constraints. The Azure Well-Architected Framework provides a solid foundation for architectural excellence, but you should also consider AI-specific design principles.在设计 AI 工作负载时,您所集成的代码和数据将取代确定性行为。这种转变有助于实现预测、分类及其他功能目标。AI 工作负载的架构通常较为复杂,且必须符合业务约束。Azure 架构完善框架(Azure Well-Architected Framework)为实现卓越架构提供了坚实的基础,但您还应考虑 AI 特有的设计原则。
This article presents a design methodology based on AI principles. The AI principles systematically guide the design and optimization of solutions. Another benefit of the methodology is collaboration with product owners and stakeholders to justify technical decisions. If you need help making decisions, refer back to this methodology to align your design direction with high-level AI principles.本文介绍了一种基于 AI 原则的设计方法。AI 原则系统性地指导解决方案的设计与优化。该方法的另一个优势是能够与产品负责人及相关利益方协作,从而为技术决策提供依据。如果您在决策时需要帮助,请参考此方法,以确保您的设计方向与高阶 AI 原则保持一致。
If you design a capability or introduce an improvement, evaluate the change from the methodology perspective. Does your change affect the user experience? Is your change flexible enough to adapt to future innovations? Does it disrupt the experimentation flow?如果您要设计某项功能或引入改进,请从该方法论的角度评估这一变更。您的变更是否会影响用户体验?您的变更是否足够灵活,以适应未来的创新?它是否会扰乱实验流程?
Design with an experimental mindset以实验思维进行设计
Design with an experimental mindset so that you can achieve relevancy through iterative and statistically driven processes based on real-world use cases.以实验思维进行设计,以便通过基于真实用例的迭代和统计驱动流程来实现相关性。
Experimentation in AI involves continuous adjustments with results that you can measure against quality targets after each iteration. Do an experimentation loop during the initial model evaluation and ongoing refinement. The inner loop refines a model's predictive power in a development environment. The outer loop monitors production usage and can trigger further refinement or data preparation. Both loops rely on continuous monitoring and evaluation to identify improvements.AI 中的实验涉及持续的调整,其结果可以在每次迭代后根据质量目标进行衡量。在初始模型评估和持续优化期间,请执行实验循环。内部循环在开发环境中优化模型的预测能力。外部循环监控生产环境的使用情况,并可触发进一步的优化或数据准备。这两个循环都依赖于持续的监控和评估来确定改进方向。
Not every experiment succeeds. Consider worst-case scenarios, and have contingency plans for failed experiments.并非所有实验都能成功。请考虑最坏的情况,并为失败的实验制定应急计划。
Design responsibly负责任地进行设计
When users interact with your AI system, they place their trust in its ethical functionality, even if they don't understand the underlying logic and decision making of the AI model. This trust holds you accountable for designing a system that prevents unethical behaviors, such as manipulation, content toxicity, IP infringement, and fabricated responses. You should embed responsible AI principles in systems operations and in the culture of your team. The practices must extend throughout the lifecycle of user interaction—from the users' initial intent to use the system, during sessions, and even during disruptions caused by system errors.当用户与您的 AI 系统交互时,即便他们不了解 AI 模型背后的逻辑和决策过程,也会信任其伦理功能。这种信任要求您有责任设计出一个能够防止不道德行为(如操纵、内容毒性、知识产权侵权和虚假响应)的系统。您应将负责任的 AI 原则嵌入到系统运营和团队文化中。这些实践必须贯穿用户交互的整个生命周期——从用户最初使用系统的意图,到会话期间,乃至系统错误导致中断时。
Content moderation is a key strategy in responsible design of generative AI. Content moderation evaluates requests and responses in real-time to help ensure safety and appropriateness. As part of the experimentation loops, strive to make algorithms fair and inclusive to minimize bias. Bias can enter the system through various channels, including during actual sessions or when you gather feedback.内容审核是生成式 AI 负责任设计的关键策略。内容审核会实时评估请求和响应,以帮助确保安全性和适宜性。作为实验循环的一部分,应努力使算法公平且具有包容性,以最大限度地减少偏见。偏见可能通过多种渠道进入系统,包括在实际会话期间或收集反馈时。
Ethical data management is central to responsible design. Make informed decisions about when to use or avoid relying on user data. Users trust you to ensure that personal information is either removed from the system or retained only with their consent. If retention is inevitable, ensure that you use trusted technology to protect data, which helps ensure privacy and security.合乎伦理的数据管理是负责任设计的核心。在何时使用或避免依赖用户数据方面,请做出明智的决策。用户信任您能确保个人信息要么从系统中删除,要么仅在获得其同意的情况下保留。如果必须保留数据,请确保使用可信技术来保护数据,这有助于确保隐私和安全。
Design for explainability为可解释性而设计
AI model results must be explainable and justifiable. You should be able to trace the origins of the data, the inference processes, and the journey of data from its source to the serve layer. In discriminative AI, decisions can be justified with each step. In generative models, explainability can be complex. Document the decision-making process, both manually and through technical capabilities.AI 模型的结果必须是可解释且可证明的。您应该能够追溯数据的来源、推理过程以及数据从源头到服务层的路径。在判别式 AI 中,每一步决策都可以得到证明。在生成式模型中,可解释性可能较为复杂。请通过手动和技术能力两种方式记录决策过程。
Explainable results help ensure the system's transparency and accountability to gain users' trust.可解释的结果有助于确保系统的透明度和问责制,从而获得用户的信任。
Stay ahead of model decay领先于模型衰减
Model decay is a unique challenge in AI that affects design decisions. The quality of AI model outputs can deteriorate over time without any changes to the code. Sometimes deterioration can even occur suddenly because of changes in data or external factors.模型衰减是 AI 中一个独特的挑战,会影响设计决策。在没有任何代码变更的情况下,AI 模型输出的质量可能会随时间推移而下降。有时,由于数据或外部因素的变化,这种恶化甚至会突然发生。
This deterioration affects various aspects of the system. These aspects include data-ingestion speed, data quality, monitoring needs, evaluation processes, and reaction times to correct problems. Implement early detection through a combination of automated processes for continuous monitoring and model evaluation. Take advantage of user feedback to help identify model decay.这种恶化会影响系统的各个方面,包括数据摄取速度、数据质量、监控需求、评估流程以及纠正问题的反应时间。通过结合自动化的持续监控和模型评估流程,实现早期检测。利用用户反馈来帮助识别模型衰减。
Regardless of the methods that you use to identify model decay, the operations team must engage data scientists to promptly research and address potential decay problems.无论您使用何种方法来识别模型衰减,运营团队都必须让数据科学家参与进来,以便及时研究并解决潜在的衰减问题。
Design for adaptability为适应性而设计
AI is advancing at a rapid pace in terms of technological advancement and adoption. Be aware that what you build today might become obsolete quickly. Keep this consideration in mind when you make design decisions and create processes.AI 在技术进步和应用方面发展迅速。请意识到您今天构建的内容可能会很快过时。在制定设计决策和创建流程时,请记住这一点。
AI advancement emphasizes the need for agility and flexibility. Recognize that some components might have a limited lifespan. Adopt a pause-and-think approach that focuses on the research of model discovery, programming libraries and frameworks, and processing technologies.AI 的进步突显了灵活性和敏捷性的必要性。请认识到某些组件的使用寿命可能有限。采用一种“暂停并思考”的方法,重点研究模型发现、编程库和框架以及处理技术。
Learn about design principles to build and operate AI workloads on Azure.了解在 Azure 上构建和运行 AI 工作负载的设计原则。