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.


🔄   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

Planning for more users?
Learn More

What best describes you?

This helps us tune the catalog to suit you best.

Join Team Success

You have successfully joined undefined

You now have access to all Pro features. Click below to start learning!

Session Expired

Session expired — please return to Cornerstone to restart the session and complete the course.

DeepLearning.AI
/
Context Engineering
/
  • Module 1
    • Introduction to Context EngineeringModule 1
    • Agentic SearchModule 2
    • Context ManagementModule 3
  • All Courses
DeepLearning.AI
/
Context Engineering
/
  • Module 1
    • Introduction to Context EngineeringModule 1
    • Agentic SearchModule 2
    • Context ManagementModule 3
  • All Courses
DeepLearning.AIAll Courses
Context Engineering
/
  • Module 1
    • Introduction to Context EngineeringModule 1
    • Agentic SearchModule 2
    • Context ManagementModule 3
DeepLearning.AI
Context Engineering
/
  • Module 1
    • Introduction to Context EngineeringModule 1
    • Agentic SearchModule 2
    • Context ManagementModule 3

Course Syllabus

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 Module 1 of our course on Context Engineering. If you've had a chance to work with AI, then you've probably found different applications across a variety of tasks, whether that's summarizing a blog, or translating a caption, or extracting numbers from a report. Models know lots and lots of facts, so you might use them to find information, like what is the capital of Canada? Your question is the user prompt, and alongside it, there's the system prompt, which provides rules to the model, like you are a helpful assistant, always answer concisely. Both the user prompt and system prompt sit in the context window. That is all the data available to the model when generating a response. Here, Ottawa, dividing the context window into message types like user and system, allows the model to make sense of different instructions according to their intent. Searching for information is a common use for popular applications like ChatGPT. Actually, a report from OpenAI suggests that nearly half of prompts in ChatGPT have some component of search, like what was the inflation rate, as opposed to prompts that request something, like factor this mathematical expression, or state something, like I'm a project manager. Let's discuss these three kinds of prompts, expressing, doing, and asking. For expressing, we have prompts like, remember that I'm a project manager. Applications such as ChatGPT will remember these statements, but underlying models like GPT will not. Models don't remember previous prompts or previous responses, meaning the model cannot remember anything about you. All that information doesn't actually get stored in the context window, meaning the model cannot remember context from previous turns of the conversation, let alone previous sessions from another day. So if you ask, what are important skills in my role? Then the model might respond, please provide additional information. To capture a record, the application has to store messages in memory, providing the entire conversation history in the context window alongside the system prompt and user prompt. For doing, we have prompts like, factor this mathematical expression. When models handle more complex tasks like math, they employ reasoning to generate better responses, working step-by-step through many operations, sometimes by trial and error. Without reasoning, the model might incorrectly guess, quantity, x plus one, times quantity, x plus six. But with reasoning, the model might make a plan, like, I need to solve for two unknown quantities, then guess and check various values until verifying a solution. The model is thinking out loud to connect problems and solutions. You won't always see these steps in the response. However, the reasoning traces appear in the context window alongside the prompts. Lastly, for asking, we have prompts like, what was the inflation rate? While the model knows about inflation from a few years ago, it probably doesn't know about inflation from a few months ago. The model has two sources of information, information from its training data and information from its context window. The training data sets have lots and lots of information, including economic data. However, there is a cutoff date, usually several months before the release of the model. The model won't have access to recent information. Additionally, the training data sets contain public data as opposed to private data. Owing to copyright laws, privacy policies, and other restrictions, the model will lack private data, leading to a lack of knowledge about specialized information. This creates a limitation where the model might fail to respond with information or, worse, generate incorrect information. So, any missing information must appear in the context window. Thankfully, we don't need to add the inflation data ourselves. Instead, the model can request extra information from tools, namely functions like a web search function and a web fetch function. They can provide the missing inflation rate in the context window alongside the prompts. For example, if you wrote, remember that I'm a PM as opposed to, remember that I'm a project manager, the model wouldn't know whether you meant project manager or product manager, or maybe even prime minister. Models will continue to get more and more capable. However, they will always need context about you and your projects and your organization. Context will always be important for models. But providing the right information at each step of a task can be hard, not to mention formatting the information this session and storing the information for later sessions. So, in the next lesson, we will discuss ways to programmatically handle context for models. That is, we'll learn to write code to help the model use and reuse prompts, memory, traces, and tools. See you there!
course detail
Module 1: Introduction to Context Engineering
  • What is Context for Models?
    Video
    ・
    6m
  • How to Engineer Context
    Video
    ・
    4m
  • Tools to Search for Context
    Video
    ・
    9m
  • Lab 1: Building your own Agent
    Video
    ・
    8m
  • Building Your Own Agent
    Code Example
    ・
    1h
  • Why Long Context Fails
    Video
    ・
    9m
  • Why Short Context Fails
    Video
    ・
    10m
  • Lab 2: Reasoning Traces and Hooks
    Video
    ・
    6m
  • Reasoning Traces and Hooks
    Code Example
    ・
    1h
  • Wrap Up
    Video
    ・
    5m
  • Optional Material
  • Context Failure Modes
    Code Example
    ・
    1h
  • Module 1 Additional Readings
    Reading
    ・
    1m
  • Quiz
  • M1 Quiz

    Graded・Quiz

    ・
    30m
  • Next
    Module 2: Agentic Search
    Course Details