输入“/”快速插入内容

14-生成式 AI 应用程序生命周期

2024年8月19日修改
An important question for all AI applications is the relevance of AI features, as AI is a fast evolving field. To ensure that your application remains relevant, reliable, and robust, you need to monitor, evaluate, and improve it continuously. This is where the generative AI lifecycle comes in.
对于所有 AI 应用程序来说,一个重要的问题是 AI 功能的相关性,因为 AI 是一个快速发展的领域,为确保您的应用程序保持相关性、可靠性和稳健性,您需要不断监控、评估和改进它。这就是生成式 AI 生命周期的用武之地。
The generative AI lifecycle is a framework that guides you through the stages of developing, deploying, and maintaining a generative AI application. It helps you to define your goals, measure your performance, identify your challenges, and implement your solutions. It also helps you to align your application with the ethical and legal standards of your domain and your stakeholders. By following the generative AI lifecycle, you can ensure that your application is always delivering value and satisfying your users.
生成式 AI 生命周期是一个框架,可指导您完成生成式 AI 应用程序的开发、部署和维护各个阶段。它可以帮助您定义目标、衡量绩效、确定挑战并实施解决方案。它还可以帮助您使您的应用程序与您的域和利益相关者的道德和法律标准保持一致。通过遵循生成式 AI 生命周期,您可以确保您的应用程序始终提供价值并满足用户需求。
In this chapter, you will:
在本章中,您将:
Understand the Paradigm Shift from MLOps to LLMOps
了解从 MLOps 到 LLMOps 的范式转变
The LLM Lifecycle LLM生命周期
Lifecycle Tooling 生命周期工具
Lifecycle Metrification and Evaluation
生命周期计量和评估
LLMs are a new tool in the Artificial Intelligence arsenal, they are incredibly powerful in analysis and generation tasks for applications, however this power has some consequences in how we streamline AI and Classic Machine Learning tasks.
LLMs是人工智能武器库中的一种新工具,它们在应用程序的分析和生成任务方面非常强大,但是这种能力对我们如何简化 AI 和经典机器学习任务产生了一些影响。
With this, we need a new Paradigm to adapt this tool in a dynamic, with the correct incentives. We can categorize older AI apps as "ML Apps" and newer AI Apps as "GenAI Apps" or just "AI Apps", reflecting the mainstream technology and techniques used at the time. This shifts our narrative in multiple ways, look at the following comparison.
有了这个,我们需要一个新的范式来动态地适应这个工具,并有正确的激励措施。我们可以将较旧的 AI 应用程序归类为“ML 应用程序”,将较新的 AI 应用程序归类为“GenAI 应用程序”或仅称为“AI 应用程序”,以反映当时使用的主流技术和技巧。这以多种方式改变了我们的叙述,看看下面的比较。
Notice that in LLMOps, we are more focused in the App Developers, using integrations as a key point, using "Models-as-a-Service" and thinking in the following points for metrics.
请注意,在 LLMOps 中,我们更侧重于应用程序开发人员,使用集成作为关键点,使用“模型即服务”,并考虑以下几点的指标。
Quality: Response quality
质量:响应质量
Harm: Responsible AI 危害:负责任的人工智能
Honesty: Response groundness (Makes sense? It is correct?)
诚实:回应接地气(有意义吗?这是正确的吗?
Cost: Solution Budget 成本:解决方案预算
Latency: Avg. time for token response
延迟:令牌响应的平均时间
First, to understand the lifecycle and the modifications, let's note the next infographic.
首先,为了理解生命周期和修改,让我们注意下一个信息图。
As you may note, this is different from the usual Lifecycles from MLOps. LLMs have many new requirements, as Prompting, different tecniques to improve quality (Fine-Tuning, RAG, Meta-Prompts), different assessment and responsability with responsible AI, lastly, new evaluation metrics (Quality, Harm, Honesty, Cost and Latency).
您可能会注意到,这与 MLOps 的通常生命周期不同。LLMs有许多新的要求,如提示、不同的质量改进技术(微调、RAG、元提示)、不同的评估和负责任的人工智能的责任,最后是新的评估指标(质量、伤害、诚实、成本和延迟)。
For instance, take a look how we ideate. Using prompt engineering to experiment with various LLMs to explore possibilities to tests if their Hypothesis could be correct.
例如,看看我们是如何构思的。使用提示工程来试验各种LLMs可能性,以探索测试其假设是否正确的可能性。
Note that this is not linear, but integrated loops, iterative and with an overarching cycle.
请注意,这不是线性的,而是集成循环,迭代的,并且具有超强循环。
How could we explore those steps? Let's step into detail in how could we build a lifecycle.
我们如何探索这些步骤?让我们详细了解如何构建生命周期。