🦜LLMOps guide

Leverage the power of LLMs in your MLOps workflows with ZenML.

Welcome to the ZenML LLMOps Guide, where we dive into the exciting world of Large Language Models (LLMs) and how to integrate them seamlessly into your MLOps pipelines using ZenML. This guide is designed for ML practitioners and MLOps engineers looking to harness the potential of LLMs while maintaining the robustness and scalability of their workflows.

In this guide, we'll explore various aspects of working with LLMs in ZenML, including:

RAG with ZenMLRAG in 85 lines of codeUnderstanding Retrieval-Augmented Generation (RAG)Data ingestion and preprocessingEmbeddings generationStoring embeddings in a vector databaseBasic RAG inference pipeline

Evaluation and metricsEvaluation in 65 lines of codeRetrieval evaluationGeneration evaluationEvaluation in practice

Reranking for better retrievalUnderstanding rerankingImplementing reranking in ZenMLEvaluating reranking performance

Improve retrieval by finetuning embeddings

Finetuning LLMs with ZenML

To follow along with the examples and tutorials in this guide, ensure you have a Python environment set up with ZenML installed. Familiarity with the concepts covered in the Starter Guide and Production Guide is recommended.

We'll showcase a specific application over the course of this LLM guide, showing how you can work from a simple RAG pipeline to a more complex setup that involves finetuning embeddings, reranking retrieved documents, and even finetuning the LLM itself. We'll do this all for a use case relevant to ZenML: a question answering system that can provide answers to common questions about ZenML. This will help you understand how to apply the concepts covered in this guide to your own projects.