Context Engineering Clearly Explained
12:48

Context Engineering Clearly Explained

Tina Huang 01.08.2025 175 372 просмотров 7 305 лайков обн. 18.02.2026
Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI
Описание видео
Try out AI assisted coding with Augment Code for 7 days free at https://www.augmentcode.com/?utm_source=Tina&utm_medium=YT 🤖 Want to get ahead in your career using AI? Join the waitlist for my AI Agent Bootcamp: https://www.lonelyoctopus.com/ai-agent-bootcamp 🤝 Business Inquiries: https://tally.so/r/mRDV99 🖱️Links mentioned in video ======================== Additional Context Engineering Resources: https://cognition.ai/blog/dont-build-multi-agents#a-theory-of-building-long-running-agents https://blog.langchain.com/tag/case-studies/ 🔗Affiliates ======================== My SQL for data science interviews course (10 full interviews): https://365datascience.com/learn-sql-for-data-science-interviews/ 365 Data Science: https://365datascience.pxf.io/WD0za3 (link for 57% discount for their complete data science training) Check out StrataScratch for data science interview prep: https://stratascratch.com/?via=tina 🎥 My filming setup ======================== 📷 camera: https://amzn.to/3LHbi7N 🎤 mic: https://amzn.to/3LqoFJb 🔭 tripod: https://amzn.to/3DkjGHe 💡 lights: https://amzn.to/3LmOhqk ⏰Timestamps ======================== 00:00 — Intro 00:34 — Context Engineering Defined & How It Differs From Prompt Engineering 02:43 — Quiz 1 02:53 — Using Context Engineering to Build an AI Agent 05:44 — Quiz 2 06:42— Demo: Context Engineered Prompt For An AI Agent 11:07 — Context Engineering Resources 12:32 — Quiz 3 📲Socials ======================== instagram: https://www.instagram.com/hellotinah/ linkedin: https://www.linkedin.com/in/tinaw-h/ tiktok: https://www.tiktok.com/@hellotinahuang discord: https://discord.gg/5mMAtprshX 🎥Other videos you might be interested in ======================== How I consistently study with a full time job: https://www.youtube.com/watch?v=INymz5VwLmk How I would learn to code (if I could start over): https://www.youtube.com/watch?v=MHPGeQD8TvI&t=84s 🐈‍⬛🐈‍⬛About me ======================== Hi, my name is Tina and I'm an ex-Meta data scientist turned internet person! 📧Contact ======================== youtube: youtube comments are by far the best way to get a response from me! linkedin: https://www.linkedin.com/in/tinaw-h/ email for business inquiries only: hellotinah@gmail.com ======================== Some links are affiliate links and I may receive a small portion of sales price at no cost to you. I really appreciate your support in helping improve this channel! :)

Оглавление (8 сегментов)

  1. 0:00 Intro 132 сл.
  2. 0:34 Context Engineering Defined & How It Differs From Prompt Engineering 468 сл.
  3. 2:43 Quiz 1 41 сл.
  4. 2:53 Using Context Engineering to Build an AI Agent 702 сл.
  5. 5:44 Quiz 2 198 сл.
  6. 6:42 Demo: Context Engineered Prompt For An AI Agent 967 сл.
  7. 11:07 Context Engineering Resources 309 сл.
  8. 12:32 Quiz 3 30 сл.
0:00

Intro

I learned about context engineering for you. So, let me now save you the hours you have to spend scrolling through X and Reddit trying to understand what is context engineering. The outline of today's video is that I'm going to first explain what is context engineering, why it came about, and what it's relevant for. Then, we'll talk about how to do context engineering, and finally some examples to make it all concrete. As per usual, it's not enough for me just to talk about stuff. So, there will be little assessments throughout this video. So, please pay attention. And if you can answer these questions, then congratulations. you have now been educated on context engineering. So without further ado, let's go. A portion of this video is sponsored by Augment
0:34

Context Engineering Defined & How It Differs From Prompt Engineering

Code. All right, let's first define context engineering. Context engineering is designing and building dynamic systems that give an LM the right info in the right format at the right time to accomplish a task. In other words, you're packing the context window, which is the input area of a large language model just right. All right, now that we've defined the term, the first point I want to make is that context engineering is only relevant to people who are making LLM apps, including things like AI agents. You may have already heard or read online that context engineering is the new prompt engineering. That is true, but it doesn't mean that like prompt engineering is dead. For example, if you just want to chat with a chatbot, like chat GBT about the kind of running shoes that you should choose for your feet. You know, you're having a back and forth conversation talking about the different cushioning types, uh, certain price ranges, how different outfits match up for your running outfits. All of that is prompting. That's still prompt engineering, and it's still completely relevant in those scenarios. Context engineering only becomes relevant when you're building AI applications like AI agents. Because unlike that chatbi conversation where you're just going back and forth, when you're building something like an AI agent, you can't iteratively keep talking to the agent until it gets the answer correct. You need to give it a set of instructions that encompasses all the actions it has to take and all the different scenarios that it's going to encounter. For example, if you're building a customer service AI agent for your online store, that agent needs to be equipped with the ability to handle all sorts of inquiries like billing problems, refund issues, login issues, searching up terms and conditions because people can't read, people asking it stupid irrelevant questions, probably also people yelling at it and abusing it unfortunately, and be able to escalate to a human when necessary. And to be able to give it all the instructions and resources and everything that it needs in order to accomplish these tasks, your prompts become larger and more and more complex. At some point they even start to resemble code with XML tags and markdown. As you can see this is really different than just prompting and having a conversation with chatbt which is why people came up with the term context engineering. So yeah that's pretty much it. Context engineering isn't some new technique that's completely coming out of the blue. It really is the progression of prompt engineering in the very specific cases of crafting complex prompts for building AI applications. As Andre Kaparthy explains the LM is the CPU and the context window is the RAM. Make sense?
2:43

Quiz 1

I'm going to put on screen now a little assessment. Please write in the comments your answer. All right, let's now dive deeper into what context engineering actually looks like when we're building an AI agent. First, to make sure we're
2:53

Using Context Engineering to Build an AI Agent

all on the same page, the definition of an AI agent is a software system that uses AI to pursue goals and complete tasks on behalf of users. For example, a customer service AI agent that answers customer service queries. A sales assistant AI agent that's able to qualify leads and follow up with people. A coding agent that can help you to code. There are lots and lots of different types of AI agents. However, regardless of what types of AI agents there are, there are six components which are essential building blocks that make up an AI agent. The first component is model. Every AI agent needs to have an AI model. It can be open GPT models, it can be claude, it can be Gemini, it can be smaller models, it can be larger models, it can be open source models, whatever fits. The second component is tools. Tools allow agents to be able to interact with external systems. For example, a personal assistant agent needs to be able to have a tool that allows it to access your Google calendar to be able to book appointments for you. Next up is knowledge and memory. Most agents need a way to store and retrieve information. For example, if you have a therapy AI agent and you're having conversations with it, you need it to have memory so that it's able to remember what has been said in previous conversations. If you have a legal AI agent that's meant to screen through some very specific cases, you need to give it the knowledge base of those specific cases that you want it to work on. Then there's audio and speech. Equipping your AI agent with the ability for audio and speech will allow it to be a lot more natural and easier to interact with. Every AI agent also needs to have guardrails which are safety mechanisms to ensure proper behavior. You don't want your customer service AI agent to swear back at your users probably. And finally, there is orchestration. These are systems that allow you to deploy your AI agent, monitor them, and improve them over time. You don't want to just release your AI agent into the wild and just run away. Got to keep track of what it's doing. The analogy that I like to make is that these six components of AI agents is sort of like a burger. Like in order for a burger to be considered a burger, it needs to have a bun, a patty, vegetables, and condiments. You can have different types of buns like whole wheat, whites, even lettuce buns and different types of patties, like different types of meats. But you do need to have these different components to be able to be called a burger. Same with AI agents. You can have different types within these components, but you do need to have these components to be considered an AI agent. Now, continuing this analogy, imagine that you are an alien and you don't understand how these burger thingies work. So, whoever is telling you to make a burger probably needs to also provide an instructions manual telling you that the bun goes on either side. Then you're supposed to put in the vegetables, the condiments, and the patty in the middle. And that's how you would know how to assemble your burger. It's the same thing for AI agents. You can have all of these different components of these AI agents, but you need to have an instruction manual for how all these things fit together. And that is where the context engineer comes in. You're coming up with that prompt that exactly details how everything is working together, what the tools are, how to use them, how to access memory, what's in the knowledge base, when to use speech and audio functionalities, etc., etc. The resulting prompt is going to be the instructions manual for your AI agent to be able to use all the things that it's equipped with. It is really important to get this prompt right, and people spend a lot of time context engineering until they get that perfect prompt. Time for
5:44

Quiz 2

the next little assessment. Please answer the questions on screen and put your answers in the comments. As we've already talked about, context engineering goes handinhand with building AI applications. And when it comes to building AI applications that are meant to be more than just proof of concepts or demos, pure vibe coding just isn't enough. That is where Augment code comes in. It's built for real engineering work, including debugging, writing tests, refactoring, and navigating complex systems. Augment's context engine feeds Claude Sonnet for exactly what it needs for your codebase. There's no need for guessing, model picking, or forks. Just a deeply integrated assistant that helps you ship. You can even launch cloud agents to refactor or fix tests even when your laptop is closed. It runs in your IDE including VS Code, Jet Brains, Vim, and Cursor. They also take security very, very seriously. Augment is ISO and SOCK 2 certified, and there's no training on customer code. You can try it off for free for 14 days at this link over here, also linked in description. Thank you so much Augment Code for sponsoring this portion of the video. Now, back to the
6:42

Demo: Context Engineered Prompt For An AI Agent

video. Okay, I'm going to show you now a full example of a context engineered prompt for an AI agent. Specifically, this is a research assistant that I made for myself in order to keep up with all the AI trends. The general structure of the system prompt is that I have these six different components. It helps um structure the prompt in a way that is easier to follow. So, under role, you're an AI research assistant focused on identifying and summarizing recent trends in AI from multiple source types. Your job is to break down a user's query into actionable subtasks and return the most relevant insights based on engagement and authority. Under task, so the thing that we actually want the AI agent to do, we have given a research query delimited by the XML tags user query and end tag user query. So this is um XML tags. It's also a way to structure the information so it's more clear for the AI to be able to process. Do the following. Step one is to extract up to 10 diverse high priority subtasks each targeting a different angle or source type. Step two is to prioritize by engagement such as views, likes, repost, and citations as well as authority of source such as publication, reputation, and domain expertise. Step three is to generate a JSON output for each subtask in the format below. And step four is to calculate the correct start date and end date in UTC ISO format based on the specified time period. And step five is to summarize all findings into a single concise trend summary approximately 300 words max. As you can see, it is very structured and detailed going step by step saying that you need to extract up to 10 different subtasks like 10 different types of sources regarding a specific topic from the user. You need to prioritize it. Uh generate certain specified JSON outputs like a type of output and make sure that the time periods are in the correct time period that the user specifies and then go on to actually summarize all the findings. The input is within the XML tags which is user query. Uh it says insert search query here. This is where the user would input whatever it is that they want to search. So for the output of this agent, you have you will output up to 10 subtasks in this exact format and this is a JSON format that we very clearly stated. So every single subtask which is a source it needs to be exactly in this format has the ID the query specifies subquery related to one aspect of the main topic. The source type it can be news, it can be from X, Reddit, LinkedIn, newsletter, academic or specialized. The time period when that resource came out it can be between 1 day to 10 days. Domain focus is a technology science or health priority determining how important this source is from highest of one to lowest of 10 and the start date and the end date in this specific format. Under output, it says that you will output up to 10 subtasks in this exact format. So we can see here that this is JSON format and we're specifying all of the different variables that need to be there. Then after performing all subtasks, write a final output summarizing the key recent trends, including limiting to 300 words using bullet points or short paragraphs. Only include new relevant high signal developments and avoiding fluff background or personal commentary. Then there's constraints. Focus on capturing the main point succinctly. Complete sentences and perfect grammar are unnecessary. Ignore fluff background information and commentary. Do not include your own analysis or opinions. Then finally, we have capabilities and reminders. We're telling it what are the different tools and knowledge bases that it has access to and giving it very specific reminders so it doesn't go off track. You have access to the web search tool to find and retrieve recent news articles relevant to the search term. You must be deeply aware of the current date to ensure the relevance of news summarizing only information published within the past 10 days. So this is example of a system prompt for a single research assistant AI agent. So and this is actually considered a very simple prompt. I also contain everything within that singular AI agent. When actually like normally when I do something like this, I would generally split it into multi- aent systems where you would have one agent that searches up all the different sources and you have another agent that would actually go and summarize everything for you. But even just for illustration purposes, I hope you can see that how complex this context engineering can get. And it's going to go and gather information, gather news from different newsletters as well as Reddit. Then it would aggregate all of that information together and ultimately come up with a summary that it's going to send to me on WhatsApp. And in this case, I implemented this AI agent using NAT. You can of course implement this using a variety of other tools as well. Like in our AI agents boot camp, we teach people to implement no code agents using NAT. And for people who want to use code, uh we would generally teach them how to use like something like OpenAI's agents SDK. But it doesn't actually matter whatever it is that you use to implement these prompts. Um they are applicable across different agentic systems. So before I end this video, I do want to share with you guys two additional resources which I think are excellent if you really want
11:07

Context Engineering Resources

to dive deeper into context engineering and how it is that you can go about uh creating these multi-agent systems and getting the results from it. The first one is a blog post from cognition and they share two fundamental principles for context engineering specific for multi- aent frameworks. The first one is to always share context between your agents. And the second is that actions carry implicit decisions. And whenever you have a decision point, you need to be very careful of this in your architecture and in your context engineering as well. Highly recommend that you check out this blog post. The second article is from Langchain where they showcase this really great framework that breaks down common strategies that people use when context engineering. The first one is writing context. How it is that you can allow your large language model to write down information surrounding a task so it's able to save it and use it for later. The second is selecting context. How it is that you can pull information from external sources to help your agent perform a task. The third is compressing context. When there is a lot of information that you're trying to give in large language model, there are techniques that you can do in order to help compress that information in a more compact way. And the fourth is isolating context. How to split context in between different environments and different places. I'm not going to go into more details about this to keep this video relatively succinct, but you do want to dig deeper into techniques for context engineering so you can build better AI apps like AI agents. Highly recommend that you check out these resources. All right, that is everything that I have for you today. So, here is the final little assessment. Please write your
12:32

Quiz 3

answers in the comments below. Thank you so much for watching until the end of this video and I will see you guys in the next video or live stream.

Ещё от Tina Huang

Ctrl+V

Экстракт Знаний в Telegram

Транскрипты, идеи, методички — всё самое полезное из лучших YouTube-каналов.

Подписаться