
Discover retrieval augmented generation (Rag) as a framework that combines retrieval and generative models to use external knowledge, fine-tune, evaluate, and deploy Rag-based applications with large language models.
Build understanding of the Rag framework and its three components: query encoder, retriever, and generator, and use Rag models from Hugging Face Transformers for retrieval augmented generation.
Fine-tune a rag model for a specific task or domain by defining objectives, preparing data, configuring, training, evaluating, and iterating to improve accuracy and relevance.
Optimize the Rag model for speed and memory efficiency by selecting the right Rag variant, query encoder, retriever, generator, and knowledge source, then adjust parameters for performance.
Build a rag-based large language model application from scratch and deploy it in production by following six steps: define the problem, design the architecture, implement code, test, deploy, and iterate.
Explore current limitations of rag research, including knowledge source quality and diversity, retrieval efficiency, and coherence, and review future directions, best practices, and potential extensions for real world applications.
Explore real world rag-based applications by tuning a gpt model with a practical rag tuning workflow, including building Raggy, the instructor, and understanding the retriever, encoder, and generator components.
Explore Chroma, the open source embedding database for rag tuning, with Colab notebooks, vectorization, embedding retrieval, and Hugging Face datasets, licensed under Apache 2.0.
Learn Langroid's multi-agent framework for rag tuning LLM models, enabling coordinated agents to perform function calls, retrieval augmented generation, and interact with databases through prompts.
Harness rope fine tuning to extend llm context windows by modifying embeddings for llama models, using small data sets (100–3,500 rows) and low-cost training on colab or local gpus.
Learn a self rewarding language model fine-tuning method: train on instructional data, generate synthetic outputs, then retrain on those outputs with a Lama 70 B base.
Raft blends rag tuning and fine-tuning, grounding models with a one-page GPT-4 generated Q&A and a prescribed prompt for chain-of-thought reasoning.
Rag tuning relies on external retrieval during inference and doesn't update embeddings, unlike fine tuning which internalizes knowledge. This leads to higher costs and privacy concerns.
MoRa fine tuning introduces a brand new, parameter-efficient method for large language models. It uses square matrices to reformat layers and boosts performance on biomedical, financial, and mathematical reasoning tasks.
Explore GraphReader, a graph-based agent for RAG tuning that grounds long-context reasoning in essential elements from graphs, improving retrieval, grounding, and logical reasoning for LLMs.
By the end of this course, you will have a solid understanding of RAG and how to use it for various natural language processing tasks and applications. You will also have a portfolio of RAG projects that you can showcase to potential employers or clients.
This course is designed for anyone who is interested in natural language processing and large language models, and who wants to learn how to use RAG for retrieving and generating natural language. To follow this course, you will need some basic knowledge and skills in the following areas:
Python programming
PyTorch framework
Natural language processing
Large language models
Hugging Face Transformers library
If you are not familiar with any of these topics, don’t worry, we will provide some resources and references for you to learn more about them. However, we recommend that you have some prior experience and interest in natural language processing and large language models, as this will help you get the most out of this course.
This course is divided into six sections, each covering a different aspect of RAG. The first section is the introduction, where you will learn what is RAG and why it is useful for LLMs. The second section is the RAG framework, where you will learn how RAG works and what are its components. The third section is the RAG tuning, where you will learn how to fine-tune, evaluate, and optimize RAG models. The fourth section is the RAG applications, where you will learn how to build and deploy RAG-based LLM applications from scratch. The fifth section is the RAG optimization, where you will learn how to optimize RAG models for speed and memory efficiency. The sixth and final section is the conclusion, where you will learn about the current limitations and future directions of RAG research.