icon 字幕
正在載入字幕...

Advanced design patterns for dynamic agents

youtube 翻譯 youtube 中文翻譯 youtube 字幕 youtube 中文字幕 youtube 翻譯成中文 youtube 視頻翻譯 youtube translate to chinese translate youtube to chinese youtube transcript to chinese translate youtube video to chinese

YouTube transcript, YouTube translate

32/32

A quick preview of the first subtitles so you know what the video covers.

Hi, welcome back to this agendic pattern series. In last part we cover some use case with agenic pattern from single agent to multi- aent pattern with sequential workflow agents and parallel workflow agents. And in today's video, we will explore advanced patterns with coding example and demo to showcase review and critique with loop agent, hierarchical task decomposition with LM agent and agent as tool. So by the end of today's video, you will learn how to design multi- aent system that gives your agent the ability to iterate, self-correct, and dynamically choose the right tool for the job. All right. So for the first part of today's example is the loop review and critique pattern. When we design an agent system to plan a trip, what if you need the agents output to meet a certain non-negotiable requirement? For example, you need to plan a trip to an event, but the hotel and event venue must be within 30 minutes of travel time. And in this case we can use this loop pattern and often implement it as a review and critique workflow. And here is how it works. So first we have a generator agent that creates a initial trip plan. And then we have a critique agent evaluates that plan against our condition. For example, if this travel time is less than 30 minutes. So if this condition isn't met, the loop sends it back to the generator with feedback for revision. This loop will continue until the plan is approved or we hit a maximum number of iteration to prevent infinite loops. And this is a form of iterative refinement. So here is code implementation to demonstrate this agenic pattern. As you can see, we implement the critique agent with loop agent and then put together the generator agent and critique agent with sequential agent. And now let's test with ADK web UI by type ADK web. We will type our request here. And in the tracing tab, you can see this loop in action. The planner generates a trip and the critique tries the travel time and rejects it. And the planner tries again with a different plan until it meet the condition. And this is really powerful when we need a task to be accurately meeting certain conditions. The advantages of this pattern is that it can ensure output meets specific quality standards and any constraints. It is helpful when we prioritize certain criteria.

設定

100%

翻譯目標語言

🔊 音訊播放
正在播放翻譯音訊