Build a simulated Argo Workflow pipeline for prompt CI/CD operations including linting, validation, evaluation with LLM calls, and promotion stages. Implement pipeline orchestration with artifact storage and metrics tracking for GenAI operations.
Build a simulated Argo Workflow pipeline for prompt CI/CD operations including linting, validation, evaluation with LLM calls, and promotion stages. Implement pipeline orchestration with artifact storage and metrics tracking for GenAI operations.
Host: Welcome back. You're in GenAI Operations — a course about running generative AI systems in production, not just prototyping them. This chapter is on CI/CD pipelines, which stands for Continuous Integration and Continuous Deployment — the automated plumbing that takes a change a developer makes, tests it, and ships it safely to production. And the specific skill in this exercise — automating the path from a new prompt to a live prompt — is something every AI team hits the moment more than one person is editing prompts.
Expert: Let me paint the scenario. Picture a mid-sized fintech company. They have a customer support assistant powered by a large language model — that's the AI technology behind tools like ChatGPT. There are maybe fifteen people on the team touching the instructions given to that model. Those instructions are called prompts. Someone tweaks a prompt on Monday to handle refund questions better. On Tuesday, another person changes the same prompt to sound friendlier. By Wednesday, the assistant is giving wrong refund amounts to real customers. No one knows which change broke it, because there was no automated safety net between the edit and production. This is the exact failure mode that CI/CD pipelines prevent in traditional software, and GenAI teams are learning — often painfully — that prompts need the same discipline. Every prompt change needs to be checked, tested against real examples, scored, and only then promoted to live traffic. Without that, you're one bad edit away from a customer-facing incident.
Host: Now, this is the first exercise in the chapter, so it's your starting point. The chapter overview walked through the big picture of continuous delivery for AI systems. Now we're getting hands-on with the first and most common case — prompts. So what exactly will we build?
Expert: You're going to build a simulated pipeline — a series of automated steps that a prompt change flows through on its way to production. The tool we're modeling is called Argo Workflows. Argo is an open-source system that runs multi-step jobs, where each step can depend on the one before it and pass results forward. Think of it like an assembly line: a prompt enters at one end, and a safe, approved prompt comes out the other. Now, we're simulating it — meaning we're building the same structure and logic in plain code, without actually running a real Argo cluster, so you can focus on the pipeline design itself.
The pipeline has four stages. First, linting — that's just a fancy word for automated style and quality checks. Does the prompt have the required sections? Is it under the length limit? Is it free of obvious mistakes? Second, validation — does it follow the team's rules, like including a safety instruction or a specific output format? Third, evaluation — and this is the interesting one. You'll actually call a language model with the new prompt, run it against a set of test questions, and score the responses. Fourth, promotion — if every earlier stage passed, the prompt gets marked as approved and moved to the production version.
Here's the key idea to hold in your head: each stage produces an artifact — a saved output, like a score report or a validation result — and the next stage reads that artifact. The pipeline isn't one big function. It's a chain of small, independent steps that communicate through saved files and tracked metrics. That separation is what makes it debuggable when something fails at three in the morning.
Host: Before we start — what's the part where people usually get stuck? What should the listener watch out for?
Expert: The trickiest part is the evaluation stage — the one that actually calls the language model. Two things bite people here. First, language model calls are slow and sometimes fail. Your pipeline needs to handle the case where a call times out or returns an error, usually by waiting a moment and trying again a couple of times before giving up. If you don't build that in, one flaky network second will fail your whole pipeline and you'll be debugging the wrong thing.
Second, and more subtle — people rush the scoring logic. They call the model, get a response, and then just eyeball whether it looks right. But this is automation. You need a concrete, numeric measure — maybe the response contains certain required words, or the length is in a reasonable range, or a second model call rates the quality on a scale. Pick a clear rule, write it down, and let the pipeline decide pass or fail without a human in the loop. That's what makes it a pipeline instead of a checklist. Start simple with your scoring — you can always make it smarter later.
Host: So after this exercise, you'll be able to take a prompt change and push it through a full automated pipeline — checks, validation, a real language model evaluation, and a promotion decision — with every step's output saved and every result tracked. This is the kind of building block your team can plug straight into an architecture discussion about how you actually ship prompt changes safely at your company. It's the foundation of treating prompts as real production artifacts, not as notes in a document somewhere. With this exercise complete, you now have a working pipeline pattern you can extend to model configurations, retrieval settings, and safety policies later in the chapter. Thanks for listening, and good luck with the build.
Want to go deeper? Explore disciplines with hands-on labs, quizzes, and chapter podcasts.