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.


🔄   Reset User Workspace

If you need to reset your workspace to its original state, follow these quick steps:

1:   Access the Menu: Look for the three-dot menu (⋮) in the top-right corner of the notebook toolbar.

2:   Restore Original Version: Click on "Restore Original Version" from the dropdown menu.

For more detailed instructions, please visit our Reset Workspace Guide.


💻   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

Or, sign in with your email
Email
Password
Forgot password?
Don't have an account? Create account
By signing up, you agree to our Terms Of Use and Privacy Policy

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 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.

Learn More

Welcome back!

Hi ,

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

DeepLearning.AI
  • Explore Courses
  • Membership
  • Community
    • Forum
    • Events
    • Ambassadors
    • Ambassador Spotlight
  • My Learning
Welcome to Semantic Caching for AI Agents built in partnership with Redis, taught by Tyler Hutcherson, who is applied AI engineering lead and Iliya Zhechev, who is senior research engineer at Redis. In this course, you'll learn how to make your AI agents faster and more cost-effective by adding a semantic cache. In many projects, inference costs and latency affect your ability to scale an application. Traditional input-output caches that work when the input text is exactly the same can help in some cases, but if someone asks, how can I get a refund? and another person asks, I want my money back. a normal exact match cache sees them as completely different. Semantic caching on the other hand looks at meaning. It uses embeddings to measure how similar two questions are in this meaning space. And if they're semantically similar, then we can reuse the model's response to an old answer instead of calling the model again. Thanks, Andrew. You'll first build a cache from scratch to learn under the hood of semantic caching piece by piece. You will create embeddings, compare distances, and set a threshold to decide when two queries are semantically similar enough. Then we'll move it into implementing our semantic cache using Redis as open source SDK. This will make your cache closer to a production deployment as your cache will now have features like time to live to keep your cache fresh and small, and even separate caches for different users or teams or tenants. We'll also use our open weight embedding model, fine-tuned for cache accuracy. Once you have a working cache, we'll measure how well it performs. We'll look at hit rate, precision, and recall. These metrics will show how often your cache helps and how often it is correct. You'll visualize them in a confusion matrix and you'll see how changing the similarity threshold will shift the balance between precision and recall. We'll also look at latency and we'll see how a few hits quickly add up to a big time saving. After measuring the effectiveness of your cache, you'll learn four methods for enhancing it. You'll optimize the threshold and we'll use a cross-encoder for better re-ranking. And even a small LLM check that can confirm whether two questions mean the same thing. We also add fuzzy matching to handle simple typos that frequently happen when users ask questions. Finally, we'll connect it all inside an AI agent. The agent breaks a big question into smaller parts and checks the cache for each one and only calls the LLM when it needs to. This means every new user or slightly different phrasing benefits from what the system already knows. Over time, as the cache warms up, model calls drop and responses feel just as good but arrive much faster. Many people have worked to create this course. I'd like to thank from Redis, the applied AI, AI research, product, and education teams. From DeepLearning.AI, Esmaeil Gargari also contributed to this course. The first lesson will be an overview of semantic caching. You will also learn about a real use case where Walmart published techniques to improve their production caching system. So, let's go into the next video and get started.
course detail
Next Lesson
Semantic Caching for AI Agents
  • Introduction
    Video
    ・
    3 mins
  • Overview of Semantic Caching
    Video
    ・
    9 mins
  • Build Your First Semantic Cache
    Video with Code Example
    ・
    10 mins
  • Measuring Cache Effectiveness
    Video with Code Example
    ・
    13 mins
  • Enhancing Cache Effectiveness
    Video with Code Example
    ・
    12 mins
  • Fast AI Agent with Semantic Cache
    Video with Code Example
    ・
    16 mins
  • Conclusion
    Video
    ・
    1 min
  • Quiz

    Graded・Quiz

    ・
    9 mins
  • Course Info