LLM lifecycle management
LLM lifecycle management is a fairly young concept; however, one fact remains, the LLM lifecycle covers quite a few discipline areas. It is an iterative process and not a linear process, reflecting the multi-faceted nature of real-world applications with these key ingredients: ideation, development, deployment, and management.
Here is a visual diagram to aid our discussion as we view the process flow; this relates to LLM and, ultimately, LLMOps:

Figure 6.6 – LLM lifecycle in the real world
In the preceding image above, the three larger circles represent the end-to-end lifecycle phases in managing/developing LLMs, similar to what we might see in traditional application lifecycles. As stated earlier, these phases are not linear, so let us describe what is occurring here, with each circle representing a phase, moving left to right.
• Phase 1: On the far left, we first try to understandBUSINESS REQUIREMENTS and begin the exploring and ideation steps in this initial phase. In this phase, let’s call it phase one, some of the tasks we will complete include finding some foundational or other LLMs using benchmarks, model cards, etc., and running a few prompts against this to test some basic business requirements and also test some hypotheses we believe based on our understanding of the business requirements. Usually, in this initial phase, we may also be able to modify the business requirements based on early exploration.
- Phase 2: As we advance to the next phase, phase 2, we are now building and augmenting our LLM, using the techniques covered earlier in this book, such as RAG, prompt engineering, or fine-tuning. If there are any errors within our LLM lifecycle processes in the second phase or if RAG is not optimized and fine-tuning is not providing us with the correct results, we can then revert back to the first phase to try to find other existing LLMs or retry a different hypothesis (or even alter our existing hypothesis), and start the LLM lifecycle again. We will also employ the comprehensive evaluation techniques that we discussed in Chapter 5 to evaluate the model.
- Phase 3: Once we are successful in completing phase 2, we can move on to the third and final phase of our LLM lifecycle, which is operationalizing the LLM, deploying it as an app, or integrating the LLM app into an existing service. Moreover, within this lifecycle, we have additional operational areas we need to address: monitoring, quota and cost management, safe rollout/staging, and content filtering (we will cover the monitoring, content safety, and quota aspects in further detail in the upcoming chapters). We can also consider any additional feedback from the end users and take this back to phase two, where we may need to conduct additional fine-tuning or additional grounding on our data with RAG.
Overarching all these phases and activities is the managing/management loop, which focuses on governance, security, and compliance, which we will cover in the next two chapters. To wrap up this part, as we understand the preceding LLM lifecycle stages, we understand how to balance agility with adherence to standards while meeting business requirements.
Important note
An emerging fourth phase in the lifecycle of LLMs addresses the end-of-life stage when an LLM no longer meets business requirements or becomes obsolete. This phase involves safely decommissioning the outdated LLM, potentially replacing it with a newer, more advanced model. The key actions include migrating APIs and other integrations to the new model, ensuring a seamless transition. This addition marks the beginning of a cyclical process, restarting with the initial phase of deploying a fresh LLM.
Let’s take a look at the key activities that make up an LLMOps strategy.