DeepLearning.AI
AI is the new electricity and will transform and improve nearly all areas of human lives.

Quick Guide & Tips

💻   Accessing Utils File and Helper Functions

In each notebook on the top menu:

1:   Click on "File"

2:   Then, click on "Open"

You will be able to see all the notebook files for the lesson, including any helper functions used in the notebook on the left sidebar. See the following image for the steps above.


💻   Downloading Notebooks

In each notebook on the top menu:

1:   Click on "File"

2:   Then, click on "Download as"

3:   Then, click on "Notebook (.ipynb)"


💻   Uploading Your Files

After following the steps shown in the previous section ("File" => "Open"), then click on "Upload" button to upload your files.


📗   See Your Progress

Once you enroll in this course—or any other short course on the DeepLearning.AI platform—and open it, you can click on 'My Learning' at the top right corner of the desktop view. There, you will be able to see all the short courses you have enrolled in and your progress in each one.

Additionally, your progress in each short course is displayed at the bottom-left corner of the learning page for each course (desktop view).


📱   Features to Use

🎞   Adjust Video Speed: Click on the gear icon (⚙) on the video and then from the Speed option, choose your desired video speed.

🗣   Captions (English and Spanish): Click on the gear icon (⚙) on the video and then from the Captions option, choose to see the captions either in English or Spanish.

🔅   Video Quality: If you do not have access to high-speed internet, click on the gear icon (⚙) on the video and then from Quality, choose the quality that works the best for your Internet speed.

🖥   Picture in Picture (PiP): This feature allows you to continue watching the video when you switch to another browser tab or window. Click on the small rectangle shape on the video to go to PiP mode.

√   Hide and Unhide Lesson Navigation Menu: If you do not have a large screen, you may click on the small hamburger icon beside the title of the course to hide the left-side navigation menu. You can then unhide it by clicking on the same icon again.


🧑   Efficient Learning Tips

The following tips can help you have an efficient learning experience with this short course and other courses.

🧑   Create a Dedicated Study Space: Establish a quiet, organized workspace free from distractions. A dedicated learning environment can significantly improve concentration and overall learning efficiency.

📅   Develop a Consistent Learning Schedule: Consistency is key to learning. Set out specific times in your day for study and make it a routine. Consistent study times help build a habit and improve information retention.

Tip: Set a recurring event and reminder in your calendar, with clear action items, to get regular notifications about your study plans and goals.

☕   Take Regular Breaks: Include short breaks in your study sessions. The Pomodoro Technique, which involves studying for 25 minutes followed by a 5-minute break, can be particularly effective.

💬   Engage with the Community: Participate in forums, discussions, and group activities. Engaging with peers can provide additional insights, create a sense of community, and make learning more enjoyable.

✍   Practice Active Learning: Don't just read or run notebooks or watch the material. Engage actively by taking notes, summarizing what you learn, teaching the concept to someone else, or applying the knowledge in your practical projects.


📚   Enroll in Other Short Courses

Keep learning by enrolling in other short courses. We add new short courses regularly. Visit DeepLearning.AI Short Courses page to see our latest courses and begin learning new topics. 👇

👉👉 🔗 DeepLearning.AI – All Short Courses [+]


🙂   Let Us Know What You Think

Your feedback helps us know what you liked and didn't like about the course. We read all your feedback and use them to improve this course and future courses. Please submit your feedback by clicking on "Course Feedback" option at the bottom of the lessons list menu (desktop view).

Also, you are more than welcome to join our community 👉👉 🔗 DeepLearning.AI Forum


Sign in

Create Your Account

Or, sign up with your email
Email Address

Already have an account? Sign in here!

By signing up, you agree to our Terms Of Use and Privacy Policy

Choose Your Learning Path

MonthlyYearly

Change Your Plan

Your subscription plan will change at the end of your current billing period. You’ll continue to have access to your current plan until then.

View All Plans and Features

Manage Your Learning Plan

MonthlyYearly

Change Your Plan

Your subscription plan will change at the end of your current billing period. You’ll continue to have access to your current plan until then.

Welcome back!

Hi ,

We'd like to know you better so we can create more relevant courses. What do you do for work?

Course Syllabus

DeepLearning.AI
    daily streak fire

    You've achieved today's streak!

    Complete one lesson every day to keep the streak going.

    Su

    Mo

    Tu

    We

    Th

    Fr

    Sa

    free pass got

    You earned a Free Pass!

    Free Passes help protect your daily streak. Complete more lessons to earn up to 3 Free Passes.

    Free PassFree PassFree Pass

    Elevate Your Career with Full Learning Experience

    Unlock Plus AI learning and gain exclusive insights from industry leaders

    Access exclusive features like graded notebooks and quizzes
    Earn unlimited certificates to enhance your resume
    Starting at $1 USD/mo after a free trial – cancel anytime
Welcome to Retrieval Augmented Generation from Devo.ai. Retrieval Augmented Generation, or RAG, is the most widely used technique for improving the quality and accuracy of a large-language model's response. An OM starts off knowing only information from maybe the public internet data it was trained on. So if you needed to answer questions using facts drawn from proprietary data, say your own documents, RAG lets the model do this by providing the model access to that additional data. This lets an LLM answer questions with facts that it was not already trained on. For example, you may also have seen a chatbot like ChatGP or Cloud or Gemini tell you it's searching the web to help answer your question. This LLM is accessing additional information to try to make sure the response is up-to-date and accurate. I'm excited to introduce your instructor for this course, Zan Hassan. Zan is an experienced AI and machine learning engineer and researcher and educator. He spent much of the last decade working at a handful of exciting AI companies like Weaviate, which is a leading vector database company providing one of the key components of RAG, as well as Together AI, which is a provider of LLM services. Thank you, Andrew. I'm super excited to be here. What I love about RAG is the fact that it provides a simple and practical way to focus the power of large language models. The core idea of RAG is pairing classical search systems with the reasoning abilities of large language models. With this course, we've tried to balance covering foundational concepts underlying both search and LLMs and the practical tips for applying these concepts to architect a high-performing RAG system. Even though the concept of RAG is not complex, there's a zillion ways to implement it, and the design choices make a huge difference in accuracy and speed of your system. You'll learn how to prepare your data to be used in this system, prompt your language model to get the most out of that data, and evaluate actual user traffic to ensure you're providing high-quality responses. So you're going to leave this course with a lot of practical skills to build and tune your RAG system and have the foundational understanding of why these techniques work. It's an incredibly useful skill set and has applications to a huge variety of industries. I think RAG may be the most commonly built type of LLM-based application in the world today. Large companies are using it to help their customers get answers to questions about their products, or help their own employees get answers to the company's internal policies or other matters. Startups are also building RAG applications in many verticals, like healthcare, such as answering medical questions, or in education, to help tutor students on a range of subjects, and so on. One interesting thing about RAG is that as LLM technology improves, RAG systems are also rapidly incorporating these technologies. So, for example, the recent generation of models have been much better than those from one or three years ago at getting RAG systems to be more grounded in the documents or contexts it's given, so that over the last year or so, it feels like the hallucination rates of RAG systems have been steadily trending downwards. And reasoning models also let them tackle much more complex questions and can reason on top of the provided context. And one interesting change over the last couple of years is, as the input context window of LLMs has gone up, the hyperparameter tuning, you know, what exactly do you insert into the RAG, how do you cut documents into pieces, the signal input context, the best practices, which Zan is really expert on, has been evolving as well, because now you don't need to squeeze so much information into a tiny little context window. And as agentic document extraction and related technologies improve, you can now also more easily build RAG systems on top of PDF files or slides or other types of documents, so you can build RAG systems to more easily ingest and reason over and answer questions relating to broader sets of materials that you may have. And more broadly, as teams are building more complex multi-step agentic workflows, RAG is often then one component in a complex agentic workflow where maybe on, you know, step five or step seven of some internal enterprise workload, RAG gives the agent the information it needs in order to process a document or reason about a customer request. Oh, I completely agree. Even as the AI field continues to evolve rapidly, I don't think RAG's going anywhere. LLMs will continue to benefit from access to high-quality relevant data. I also think this course gives a really strong foundation to work with all these cutting-edge advances. We've included a huge variety of advanced techniques in this course, from multi-modal or reasoning models, like you mentioned, to balancing approaches like RAG, fine-tuning, and newer long context models. One technique that I'm personally quite excited about is agentic RAG, or building systems that use multiple large language models where each one handles a single part of a large workflow and has the agency to decide what data to retrieve. This is right at the frontier of where companies are pushing the performance of LLM-based applications. I think the earlier generation of RAG systems was a human engineer that would write a bunch of code, write a bunch of rules, to decide, give the query, this is how we take a long document, how we cut it into pieces, how we retrieve it, and we're going to take, you know, seven pieces or something to put into the LLM context. So it's really a human engineer deciding what to give as context for the LLM to answer a question. And the thing that's really interesting about agentic RAG is you can give AI agent tools to retrieve information and then let it decide, does it want to do a web search next? And if so, what keywords does it want to use for the web search? Or maybe query a specific specialized database. And after retrieving the first round of information, is it good enough? Or do you want to do a second round of retrieval? So these highly agentic systems can then decide by themselves what information to retrieve to serve a specific information need. And I find that to be an important way to make the systems much more flexible and powerful. It gives them a way to deal with the messiness of the real world. They mess up, they can route back and fix the approach that they're going with. So going all the way from basic RAG to advanced agentic RAG, in this course, you learn about this range of techniques, both from the core principles and the mental frameworks of how to build these systems to the practicalities of how do you actually tune a hyperparameter of what is the appropriate chunk size to cut a very long document into and how to manage context. And if you are just starting out on the earlier phases of building out Gen AI applications, I think that this course will give you a good overview of not just RAG, but many of the components that go into RAG that could be useful for other things you may build in the future as well. So I think that this course will set you up absolutely to do RAG, but more broadly, to have a good foundation to think about how to assemble many of the tools that we now have in Gen AI to build an application and to evaluate it and to drive continued improvements. So far, Zan and I have chatted about RAG and why we think it's important and why we think you benefit from learning about it. And in the next video, Zan will present a high-level overview of what are the most important components of RAG, so that whether you're building a standalone RAG system or building it as one component of a more complex, agentic, auto-type system, you have that mental map for what are the things you need to do to get an effective RAG system going. So let's take a look at the next video to dive into the details of RAG.
course detail
  • Retrieval Augmented Generation (RAG)
  • Module 1
Next Lesson
Module 1: RAG Overview
    RAG Overview
  • A conversation with Andrew Ng
    Video
    ・
    8 mins
  • Module 1 introduction
    Video
    ・
    1 min
  • Introduction to RAG
    Video
    ・
    5 mins
  • Applications of RAG
    Video
    ・
    4 mins
  • RAG architecture overview
    Video
    ・
    5 mins
  • Introduction to LLMs
    Video
    ・
    9 mins
  • [Optional] - A brief Python refresher
    Code Example
    ・
    10 mins
  • LLM Calls and Crafting Simple Augmented Prompts
    Code Example
    ・
    10 mins
  • Introduction to information retrieval
    Video
    ・
    5 mins
  • [IMPORTANT] Have questions, issues or ideas? Join our Forum!
    Reading
    ・
    2 mins
  • Graded Assignments
  • Module 1 Quiz

    Graded・Quiz

    ・
    20 mins
  • Introduction to RAG systems

    Graded・Code Assignment

    ・
    3 hours
  • Module 1 Wrap Up
  • Module 1 conclusion
    Video
    ・
    1 min
  • Lecture Notes M1
    Reading
    ・
    1 min
  • Course Feedback
  • Forum
  • Certificate