
Explore advanced retrieval-augmented generation techniques to boost rag pipeline performance through hands-on concepts, for developers, data scientists, and ai engineers.
Master RAG course structure blends theory with hands-on practice, covering fundamental concepts and the lingo, with hands-on sessions occasionally supported by theory for a fuller overview.
Set up your development environment by installing Python and choosing a code editor like VS Code. Create an OpenAI account and API key to follow along with hands-on labs.
Open the resources section to access course materials, then right-click the lecture to find the link to the source code and access the code.
Introduce rag, its motivation and advantages, and explain the rag triad—query, response, and context—and how they interact to improve retrieval-augmented generation systems, ensuring grounded, relevant results.
Explore how rag blends a retriever and a generator to produce contextual, relevant responses, and review naive rag's indexing, embedding, vector store, retrieval, and augmentation along with pitfalls.
Explore the drawbacks of naive retrieval-augmented generation, from limited contextual understanding and keyword-based relevance to poor retrieval-generation integration, scaling challenges, and robustness issues like hallucination, bias, and toxicity.
Paolo invites you to leave a review to help others see the course's value, while inviting questions on the discussion board and encouraging community engagement.
Boost retrieval quality with advanced rag techniques through pre and post retrieval enhancements, including query expansion with generated answers from a large language model and vector database reranking.
Apply retrieval-augmented generation by splitting a Microsoft annual report pdf into 410 chunks of 1000-character segments using LangChain tools, then embed with ChromaDB.
Split text into 256-token chunks with zero overlap using sentence transformers, generate embeddings via a sentence transformer embedding function, and index them in chroma db while noting token size limits.
Learn to build a chroma vector store by creating a collection, attaching an embedding function, indexing token splits, and performing similarity search to retrieve relevant documents.
Create augmented queries using a document query generator, join the original query with a hypothetical answer using a large language model, to retrieve five documents and embeddings.
Project embeddings with UMAP from the chroma collection and plot original and augmented queries against retrieved documents to show improved alignment in embedding space.
Leverage RAG-inspired query expansion with generated answers to improve retrieval, showing how combining the original query and the generated answer helps rank relevant documents.
Expand queries with multiple subqueries generated by a large language model to improve retrieval accuracy. Retrieve documents for all subqueries, aggregate results, and generate a final contextual answer.
Develop generated augmented queries for a retrieval-augmented generation system by extracting and splitting pdf data, embedding with sentence transformers, indexing in chroma db, and generating up to five related questions.
Concatenate the original query with augmented queries, retrieve and deduplicate results from the vector store, then project embeddings with UMAP to visualize in a 2D graph.
Explore and refine prompts and queries to see how results vary, recognizing that prompts guide related queries and influence documents from the vector database.
Explore expansion with multiple queries in retrieval augmented generation, concatenating queries with original to query a vector database, and mitigate downsides like noise or hallucinations with relevance feedback or reranking.
Refine and reorder retrieved documents with a cross-encoder reranking model, to prioritize top results for search, qa, and legal document retrieval.
Learn how to rerank long-tail search results using a cross-encoder in a retrieval-augmented generation workflow, including embeddings, vector database, and query expansion to improve relevance.
Select the five ranked documents, concatenate them as context, and query a GPT 3.5 turbo to reveal factors driving fiscal year 2023 revenue, such as Microsoft cloud and LinkedIn revenue.
Apply cross encoder reranking to reorder initial retrieved documents, feed top results into a large language model, and refine RAG applications by testing with different queries.
Learn dense passage retrieval (dpr) with dual encoders that map questions and passages to dense vectors, using dot product similarity for open-domain question answering and fast document retrieval.
Implement the DPR technique end-to-end with pre-trained question and context encoders, tokenizers, and cosine similarity to retrieve the most relevant passages for a query.
Explore dense passage retrieval (DPR) using a question encoder and a passage encoder to create dense vectors and retrieve results via dot product similarity for rag applications.
Explore advanced retrieval-augmented generation techniques beyond dense passage retrieval, including embedding adapters, deep chunking, and rag fusion, and learn to refine your rag workflows by researching current papers.
Explore next steps in rag techniques, reviewing naive rag pitfalls, query expansion with multiple queries, cross-encoder reranking, and dense passage retrieval (cpr), while encouraging ongoing study of papers on rag.
Unlock the full potential of AI with our comprehensive course on Retrieval-Augmented Generation (RAG) Systems. Dive deep into the powerful RAG Triad and learn how to leverage advanced techniques in information retrieval, response generation, and agent-based architecture. Designed for AI enthusiasts, data scientists, and NLP professionals, this course provides everything you need to build state-of-the-art RAG systems that deliver accurate, contextually relevant, and coherent responses to complex queries.
What You'll Learn:
The RAG Triad: Understand the components of RAG systems, such as the retriever, generator, and Fusion Module, and how they work together to enhance information retrieval and response generation.
Advanced Retrieval Techniques: Explore sparse and dense retrieval methods, including Dense Passage Retrieval (DPR), and learn how to implement hybrid retrieval approaches for superior accuracy.
Coherent Response Generation: Master using advanced language models like GPT-3 to generate fluent and contextually appropriate responses based on retrieved documents.
Hands-On Projects: Engage in practical exercises and real-world projects to build a complete RAG system from scratch and apply your skills in various applications such as search engines, customer support, and research.
By the end of this course, you'll be equipped with the skills and knowledge to create robust RAG systems that can easily handle complex queries, making you a leader in AI and NLP.
Enroll now to transform your AI capabilities and stay ahead in the ever-evolving field of artificial intelligence.