Buckets:

rtrm's picture
download
raw
8.75 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Observe: Integrating Feedback to Reflect and Adapt&quot;,&quot;local&quot;:&quot;observe-integrating-feedback-to-reflect-and-adapt&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;How Are the Results Appended?&quot;,&quot;local&quot;:&quot;how-are-the-results-appended&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}">
<link href="/docs/agents-course/pr_545/en/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload">
<link rel="modulepreload" href="/docs/agents-course/pr_545/en/_app/immutable/entry/start.1596c81c.js">
<link rel="modulepreload" href="/docs/agents-course/pr_545/en/_app/immutable/chunks/scheduler.37c15a92.js">
<link rel="modulepreload" href="/docs/agents-course/pr_545/en/_app/immutable/chunks/singletons.8a3d92bd.js">
<link rel="modulepreload" href="/docs/agents-course/pr_545/en/_app/immutable/chunks/index.18351ede.js">
<link rel="modulepreload" href="/docs/agents-course/pr_545/en/_app/immutable/chunks/paths.5b2602e7.js">
<link rel="modulepreload" href="/docs/agents-course/pr_545/en/_app/immutable/entry/app.856a784e.js">
<link rel="modulepreload" href="/docs/agents-course/pr_545/en/_app/immutable/chunks/index.2bf4358c.js">
<link rel="modulepreload" href="/docs/agents-course/pr_545/en/_app/immutable/nodes/0.1cd5790a.js">
<link rel="modulepreload" href="/docs/agents-course/pr_545/en/_app/immutable/chunks/each.e59479a4.js">
<link rel="modulepreload" href="/docs/agents-course/pr_545/en/_app/immutable/nodes/28.3155bd07.js">
<link rel="modulepreload" href="/docs/agents-course/pr_545/en/_app/immutable/chunks/Heading.8ada512a.js">
<link rel="modulepreload" href="/docs/agents-course/pr_545/en/_app/immutable/chunks/getInferenceSnippets.031140c2.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Observe: Integrating Feedback to Reflect and Adapt&quot;,&quot;local&quot;:&quot;observe-integrating-feedback-to-reflect-and-adapt&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;How Are the Results Appended?&quot;,&quot;local&quot;:&quot;how-are-the-results-appended&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <h1 class="relative group"><a id="observe-integrating-feedback-to-reflect-and-adapt" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#observe-integrating-feedback-to-reflect-and-adapt"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Observe: Integrating Feedback to Reflect and Adapt</span></h1> <p data-svelte-h="svelte-75lxoz">Observations are <strong>how an Agent perceives the consequences of its actions</strong>.</p> <p data-svelte-h="svelte-tbzh8a">They provide crucial information that fuels the Agent’s thought process and guides future actions.</p> <p data-svelte-h="svelte-1k9ntrh">They are <strong>signals from the environment</strong>—whether it’s data from an API, error messages, or system logs—that guide the next cycle of thought.</p> <p data-svelte-h="svelte-1c1h48j">In the observation phase, the agent:</p> <ul data-svelte-h="svelte-rywryb"><li><strong>Collects Feedback:</strong> Receives data or confirmation that its action was successful (or not).</li> <li><strong>Appends Results:</strong> Integrates the new information into its existing context, effectively updating its memory.</li> <li><strong>Adapts its Strategy:</strong> Uses this updated context to refine subsequent thoughts and actions.</li></ul> <p data-svelte-h="svelte-19ozppp">For example, if a weather API returns the data <em>“partly cloudy, 15°C, 60% humidity”</em>, this observation is appended to the agent’s memory (at the end of the prompt).</p> <p data-svelte-h="svelte-1aqo02t">The Agent then uses it to decide whether additional information is needed or if it’s ready to provide a final answer.</p> <p data-svelte-h="svelte-9mn0ub">This <strong>iterative incorporation of feedback ensures the agent remains dynamically aligned with its goals</strong>, constantly learning and adjusting based on real-world outcomes.</p> <p data-svelte-h="svelte-19ewwzk">These observations <strong>can take many forms</strong>, from reading webpage text to monitoring a robot arm’s position. This can be seen like Tool “logs” that provide textual feedback of the Action execution.</p> <table data-svelte-h="svelte-327b0l"><thead><tr><th>Type of Observation</th> <th>Example</th></tr></thead> <tbody><tr><td>System Feedback</td> <td>Error messages, success notifications, status codes</td></tr> <tr><td>Data Changes</td> <td>Database updates, file system modifications, state changes</td></tr> <tr><td>Environmental Data</td> <td>Sensor readings, system metrics, resource usage</td></tr> <tr><td>Response Analysis</td> <td>API responses, query results, computation outputs</td></tr> <tr><td>Time-based Events</td> <td>Deadlines reached, scheduled tasks completed</td></tr></tbody></table> <h2 class="relative group"><a id="how-are-the-results-appended" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#how-are-the-results-appended"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>How Are the Results Appended?</span></h2> <p data-svelte-h="svelte-13dnszo">After performing an action, the framework follows these steps in order:</p> <ol data-svelte-h="svelte-1jve1w4"><li><strong>Parse the action</strong> to identify the function(s) to call and the argument(s) to use.</li> <li><strong>Execute the action.</strong></li> <li><strong>Append the result</strong> as an <strong>Observation</strong>.</li></ol> <hr> <p data-svelte-h="svelte-qz4om0">We’ve now learned the Agent’s Thought-Action-Observation Cycle.</p> <p data-svelte-h="svelte-gjur3l">If some aspects still seem a bit blurry, don’t worry—we’ll revisit and deepen these concepts in future Units.</p> <p data-svelte-h="svelte-1an6zws">Now, it’s time to put your knowledge into practice by coding your very first Agent!</p> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/agents-course/blob/main/units/en/unit1/observations.mdx" target="_blank"><span data-svelte-h="svelte-1kd6by1">&lt;</span> <span data-svelte-h="svelte-x0xyl0">&gt;</span> <span data-svelte-h="svelte-1dajgef"><span class="underline ml-1.5">Update</span> on GitHub</span></a> <p></p>
<script>
{
__sveltekit_17hovx6 = {
assets: "/docs/agents-course/pr_545/en",
base: "/docs/agents-course/pr_545/en",
env: {}
};
const element = document.currentScript.parentElement;
const data = [null,null];
Promise.all([
import("/docs/agents-course/pr_545/en/_app/immutable/entry/start.1596c81c.js"),
import("/docs/agents-course/pr_545/en/_app/immutable/entry/app.856a784e.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 28],
data,
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
8.75 kB
·
Xet hash:
99ea28581b050bb4443d5708a38566c69fb12142a771ed6b2862591224a166bd

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.