LLMOps: Generative AI in Production with Best Practices
The complete lifecycle of an LLM application: versioned prompts, traces, evaluation with datasets and calibrated judges, CI, metrics and SLOs, a gateway, caching and costs, personal data, red teaming, the supply chain, governance and canary deployments. 20 labs in Docker with a local model, based on the official documentation, and a video in every lesson.
Advanced · 25 hours · 20 lessons · Course language: Spanish and English
An advanced course on how to take generative AI applications to production and keep them there, with the practices recommended by the official documentation and the teams that operate these systems. On a single case, a travel agency's assistant, you version the prompts in MLflow's Prompt Registry and change them with aliases, without redeploying; you trace each answer with its user, its version and its tokens; you build evaluation datasets that grow with production errors; you evaluate with code evaluators and judges calibrated against people, and build a quality gate in CI with confidence intervals. You operate the service with Prometheus metrics and Grafana dashboards (latency, first token, tokens and cost), user feedback, online evaluation, SLOs, error budgets and alerts tested with promtool. You set up a LiteLLM gateway with fallbacks, virtual keys, budgets, limits and caching, measure the load and decide on routing between models with data. You protect personal data with Presidio, attack your own assistant with promptfoo, secure the supply chain (lockfiles, digests, SBOM, vulnerabilities and secrets) and generate audit and retention reports and the system card. You finish with canary deployments with automatic analysis and a final project that brings it all together. Everything runs on your computer with Docker, with no API keys, and every lesson has its video. The lessons, quizzes and videos are in English; the lab project keeps its original Spanish names and Spanish sample data, and every lesson explains them.
What you will learn
- Version prompts and change them in production with aliases, with promotion and rollback
- Trace each answer with its user, version, latency and tokens, and hide personal data
- Build evaluation datasets that grow with real production errors
- Evaluate with code evaluators and judges calibrated against people, and decide with confidence intervals
- Operate the service with metrics, dashboards, SLOs, error budgets and tested alerts
- Control costs and failures with a gateway: fallbacks, virtual keys, budgets, limits, caching and routing
- Attack your own system, secure the supply chain and produce audit evidence
- Deploy changes with a canary and automatic analysis, in a complete LLMOps flow
Skills
LLMOps, MLflow, Prompt management, Tracing, LLM evaluation, LLM as a judge, CI/CD, Prometheus, Grafana, SLOs, LiteLLM, Cost management, Personal data, Red teaming, Supply chain, AI governance
Program
Module 1: Foundations (free lessons)
The LLMOps lifecycle, versioned prompts and traces.
Project: An assistant with its prompts in the registry and every answer traced.
- The LLMOps lifecycle and your environment: What changes compared with MLOps, the course stack and what each answer costs.
- Prompts as code: the Prompt Registry: Immutable versions, aliases per environment, promotion and rollback without redeploying.
- Traces with MLflow Tracing: Automatic and custom spans, user, session, prompt version, tokens and searches.
Module 2: Evaluation
Datasets, offline evaluation, calibrated judges and CI.
Project: A quality gate that decides whether a prompt is promoted.
- Evaluation datasets: A versioned golden set and the data flywheel from the traces.
- Offline evaluation: mlflow.genai.evaluate with code evaluators and a judge, version against version.
- Calibrated judges: Agreement with people, Cohen's kappa and verbosity and position biases.
- Regression tests and CI: A quality gate with pytest, confidence intervals and GitHub Actions pinned by SHA.
Module 3: Observability in production
Metrics and dashboards, feedback and online evaluation, SLOs and alerts.
Project: A service with a dashboard, tested alerts and an error budget.
- Metrics with Prometheus and Grafana: Latency, first token, tokens, cost and errors, with PromQL and a provisioned dashboard.
- Feedback and online evaluation: Users' votes on the traces, a judge on production and new cases for the dataset.
- SLOs, alerts and error budgets: SLIs as rules, alerts tested with promtool and a simulated incident.
Module 4: Gateway, performance and costs
Load testing, the LiteLLM gateway, caching and routing between models.
Project: A gateway with fallbacks, budgets, caching and measured routing.
- Performance and load testing: Locust against the service: requests per second, p50 and p95 with 1, 2 and 4 users.
- The LLM gateway with LiteLLM: Aliases, fallbacks, virtual keys with budgets and limits, and spending per key.
- Response caching: An exact cache in Redis: hits, time, spending, expiration and when not to use it.
- Routing between models: A small model and a big one: quality, time and cost measured with the dataset.
Module 5: Security and governance
Personal data, red teaming, the supply chain, auditing and retention.
Project: A red team in CI, a scanned SBOM and a system card.
- Personal data with Presidio: Spanish detectors, custom recognizers and traces without personal data.
- Red teaming with promptfoo: Attacks from the OWASP Top 10 for LLMs against the service, with assertions.
- Supply chain and secrets: Lockfiles with hashes, digests, SBOM, vulnerabilities, secrets and the LiteLLM case.
- Governance, auditing and retention: An audit report, deletion by age and the system card generated from data.
Module 6: Deployments and final project
A canary with automatic analysis and the complete LLMOps platform.
Project: A prompt change that goes through CI, canary, analysis and auditing.
- Canary deployments: Stable assignment per user, comparison by version and automatic promotion.
- Final project: the LLMOps platform: CI, gateway, canary, metrics, alerts, privacy and auditing in a single flow.
Prerequisites
- Python with functions, classes and virtual environments
- Having built an application with an LLM (for example, in the LangGraph or generative AI courses)
- Docker Desktop with at least 8 GB of memory (10 GB is better) and uv (lesson 1 sets up the environment)
Next courses
- Generative AI Patterns: Agent Architectures, Protocols and LLMOps · Advanced · 30 hours
The patterns for building generative AI systems, from workflows to multi-agent systems, with MCP, A2A, human in the loop, agentic RAG, evaluation, guardrails and security. 24 labs in Docker with a local model, based on the original papers and the official documentation, and a video in every lesson. - Monitoring with Prometheus and Grafana · Beginner · 20 hours
Measure your servers and applications, build professional dashboards and get alerts before your users notice a problem. 20 labs with Prometheus 3 and Grafana 13, based on the official documentation.