agentic-ai-engineering/site/.vitepress/dist/assets/modules_feynman.md.CGpy9nz2.js

5 lines
15 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{c as t,Q as n,j as o,m as s}from"./chunks/framework.BPKcPtvA.js";const g=JSON.parse('{"title":"Feynman-Style Course: Core Concepts in Plain Language","description":"","frontmatter":{},"headers":[],"relativePath":"modules/feynman.md","filePath":"modules/feynman.md","lastUpdated":null}'),a={name:"modules/feynman.md"};function r(i,e,h,l,d,c){return n(),o("div",null,[...e[0]||(e[0]=[s(`<h1 id="feynman-style-course-core-concepts-in-plain-language" tabindex="-1">Feynman-Style Course: Core Concepts in Plain Language <a class="header-anchor" href="#feynman-style-course-core-concepts-in-plain-language" aria-label="Permalink to &quot;Feynman-Style Course: Core Concepts in Plain Language&quot;"></a></h1><p>Every concept from the course explained as if teaching it to a smart friend who knows nothing about agents.</p><hr><h2 id="_1-what-is-an-ai-agent-m1" tabindex="-1">1. What Is an AI Agent? (M1) <a class="header-anchor" href="#_1-what-is-an-ai-agent-m1" aria-label="Permalink to &quot;1. What Is an AI Agent? (M1)&quot;"></a></h2><p><strong>Fancy version</strong>: An LLM + tools + an autonomous decision loop.</p><p><strong>Simple version</strong>: Imagine you hire a junior engineer. You give them:</p><ul><li>A brain (the LLM — this is their thinking)</li><li>Tools (they can read files, run commands, search the web)</li><li>A rule: &quot;Keep working until the task is done, then tell me&quot;</li></ul><p>That&#39;s an agent. It&#39;s not magic. It&#39;s just: think → do → check result → repeat.</p><p><strong>The key insight most people miss</strong>: The agent is NOT the model. The agent is the WHOLE SYSTEM — the brain + the tools + the rules. A smarter brain helps, but better tools and better rules help MORE.</p><hr><h2 id="_2-the-harness-vs-the-model-m1" tabindex="-1">2. The Harness vs The Model (M1) <a class="header-anchor" href="#_2-the-harness-vs-the-model-m1" aria-label="Permalink to &quot;2. The Harness vs The Model (M1)&quot;"></a></h2><p><strong>Fancy version</strong>: The agent harness is the product, not the model.</p><p><strong>Simple version</strong>: Two chefs. One has amazing ingredients but a broken stove. The other has okay ingredients but a perfect kitchen. Who makes the better meal? The one with the better kitchen.</p><p>The &quot;kitchen&quot; is your agent setup — the instructions, the tools, the safety rules. The &quot;ingredients&quot; are the model. Everyone obsesses over ingredients (which model?). The pros obsess over the kitchen (the harness).</p><p><strong>What the harness includes</strong>:</p><ul><li>Instructions (how do you want the agent to behave?)</li><li>Tools (what can the agent do?)</li><li>Environment (what files can it see?)</li><li>State (what does it remember?)</li><li>Verification (how do you check its work?)</li></ul><hr><h2 id="_3-the-agent-loop-m1" tabindex="-1">3. The Agent Loop (M1) <a class="header-anchor" href="#_3-the-agent-loop-m1" aria-label="Permalink to &quot;3. The Agent Loop (M1)&quot;"></a></h2><p><strong>Fancy version</strong>: Think → Act → Observe → Repeat.</p><p><strong>Simple version</strong>: The agent runs in a circle:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>1. The agent thinks: &quot;What should I do next?&quot;</span></span>
<span class="line"><span>2. The agent does something (reads a file, runs a command)</span></span>
<span class="line"><span>3. The agent sees the result</span></span>
<span class="line"><span>4. The agent decides: &quot;Am I done?&quot; If yes, stop. If no, go back to step 1.</span></span></code></pre></div><p>That&#39;s it. That&#39;s the entire loop. The magic is in what tools you give it and how you tell it to decide when to stop.</p><hr><h2 id="_4-the-four-things-you-control-m1" tabindex="-1">4. The Four Things You Control (M1) <a class="header-anchor" href="#_4-the-four-things-you-control-m1" aria-label="Permalink to &quot;4. The Four Things You Control (M1)&quot;"></a></h2><p><strong>Fancy version</strong>: Context, Model, Prompt, Tools — the 4 dimensions of control.</p><p><strong>Simple version</strong>: You can only change four things about any agent:</p><ol><li><strong>What it knows</strong> (context) — files, instructions, conversation history</li><li><strong>How smart it is</strong> (model) — which LLM powers it</li><li><strong>How you talk to it</strong> (prompt) — the system instructions</li><li><strong>What it can do</strong> (tools) — read, write, search, run commands</li></ol><p><strong>The trick</strong>: #2 (model) is the least important and most expensive. #4 (tools) is the most important and cheapest. Focus on tools.</p><hr><h2 id="_5-the-repository-is-the-spec-m1" tabindex="-1">5. The Repository IS the Spec (M1) <a class="header-anchor" href="#_5-the-repository-is-the-spec-m1" aria-label="Permalink to &quot;5. The Repository IS the Spec (M1)&quot;"></a></h2><p><strong>Fancy version</strong>: All necessary context should live in the repository as the single source of truth.</p><p><strong>Simple version</strong>: Imagine you wake up an engineer at 3AM and drop them into a project. They need to know: What does this project do? How do I run tests? Where do I put new code? What rules should I follow?</p><p>If the answer is &quot;ask Bob&quot; — you fail. If the answer is &quot;read CLAUDE.md in the repo&quot; — you win.</p><p>An agent can only see what&#39;s in files. EVERYTHING the agent needs must be in a file. Not in your head. Not in tribal knowledge. In a file.</p><hr><h2 id="_6-the-security-ladder-m3" tabindex="-1">6. The Security Ladder (M3) <a class="header-anchor" href="#_6-the-security-ladder-m3" aria-label="Permalink to &quot;6. The Security Ladder (M3)&quot;"></a></h2><p><strong>Fancy version</strong>: 6 levels of bash security from L0 to L5.</p><p><strong>Simple version</strong>: Imagine your agent has a button that says &quot;run any command on your computer.&quot; That&#39;s the most dangerous button in the world. Here&#39;s how to protect it:</p><ul><li><strong>Level 0</strong>: Tell the agent &quot;don&#39;t press the bad button&quot; — ACIP prompt defense. Costs nothing. Works most of the time.</li><li><strong>Level 1</strong>: Write a skill saying &quot;please don&#39;t press the bad button&quot; — the agent reads it. Also costs nothing.</li><li><strong>Level 2</strong>: Put the rule in the system prompt — more weight, same problem.</li><li><strong>Level 3</strong>: Add a filter that blocks known bad commands like <code>rm -rf</code> — catches obvious attacks, but the agent can write a Python script that does the same thing.</li><li><strong>Level 4</strong>: Only allow a list of SAFE commands. Everything else is blocked — the agent CANNOT run anything not on the list.</li><li><strong>Level 5</strong>: Remove the button entirely. No bash at all. The agent uses custom tools instead.</li></ul><p><strong>The dirty secret</strong>: Most people stop at Level 2 and think they&#39;re safe. They&#39;re not. The math proves it: at a 1% failure rate, there&#39;s a 63% chance of disaster over 100 agent turns.</p><hr><h2 id="_7-why-one-agent-is-not-enough-m4" tabindex="-1">7. Why One Agent Is Not Enough (M4) <a class="header-anchor" href="#_7-why-one-agent-is-not-enough-m4" aria-label="Permalink to &quot;7. Why One Agent Is Not Enough (M4)&quot;"></a></h2><p><strong>Fancy version</strong>: Context ceiling, capability ceiling, reliability ceiling.</p><p><strong>Simple version</strong>: Imagine one person trying to be CEO, engineer, designer, QA, and customer support at the same time. They&#39;d be bad at everything and exhausted.</p><p>One agent has the same problem:</p><ul><li>Its brain can only hold so much (context ceiling)</li><li>It&#39;s okay at everything, great at nothing (capability ceiling)</li><li>If it breaks, everything stops (reliability ceiling)</li></ul><p>The fix: multiple specialized agents. One plans. One codes. One reviews. One verifies. Each one good at its job. If the reviewer breaks, the coder keeps working.</p><hr><h2 id="_8-orchestration-patterns-m4" tabindex="-1">8. Orchestration Patterns (M4) <a class="header-anchor" href="#_8-orchestration-patterns-m4" aria-label="Permalink to &quot;8. Orchestration Patterns (M4)&quot;"></a></h2><p><strong>Fancy version</strong>: Dispatcher, Pipeline, P2P — three patterns for multi-agent work.</p><p><strong>Simple version</strong>:</p><p><strong>Pattern 1 — The Manager</strong> (Dispatcher): One boss tells specialists what to do. Each specialist works independently. The boss collects results. Like a team lead assigning tickets.</p><p><strong>Pattern 2 — The Assembly Line</strong> (Pipeline): Step 1 → Step 2 → Step 3. Planner makes a plan. Builder builds it. Reviewer checks it. Each step feeds into the next.</p><p><strong>Pattern 3 — The Coworkers</strong> (P2P): No boss. Agents talk to each other directly like peers. &quot;Hey, can you check this?&quot; &quot;Sure, here&#39;s what I found.&quot; Flat, fast, flexible.</p><p><strong>Which to use</strong>: Manager for complex projects. Assembly line for well-defined workflows. Coworkers for creative collaboration.</p><hr><h2 id="_9-tilldone-—-task-discipline-m4" tabindex="-1">9. TillDone — Task Discipline (M4) <a class="header-anchor" href="#_9-tilldone-—-task-discipline-m4" aria-label="Permalink to &quot;9. TillDone — Task Discipline (M4)&quot;"></a></h2><p><strong>Fancy version</strong>: Task list gating with live progress tracking.</p><p><strong>Simple version</strong>: Before an agent can do anything, it must write down what it&#39;s going to do. No &quot;just start coding.&quot; Write the task list first. Then do each task. Mark it done. If the session ends with incomplete tasks, the agent gets nudged: &quot;Hey, you&#39;re not done yet.&quot;</p><p>This stops the #1 agent failure: starting without a plan and wandering off.</p><hr><h2 id="_10-the-3x-rule-m6" tabindex="-1">10. The 3x Rule (M6) <a class="header-anchor" href="#_10-the-3x-rule-m6" aria-label="Permalink to &quot;10. The 3x Rule (M6)&quot;"></a></h2><p><strong>Fancy version</strong>: Production agent costs 3x your prototype estimate.</p><p><strong>Simple version</strong>: When you build a quick prototype, the agent works perfectly on the happy path. In production, everything goes wrong:</p><ul><li>Errors need retries (1.5x cost)</li><li>Edge cases need handling (2x cost)</li><li>Monitoring, logging, and security add overhead (3x cost)</li></ul><p><strong>The rule</strong>: Whatever you think the agent will cost, multiply by 3. If your prototype costs $0.10 per task, production will cost $0.30. Budget for it.</p><hr><h2 id="_11-cascade-routing-m6" tabindex="-1">11. Cascade Routing (M6) <a class="header-anchor" href="#_11-cascade-routing-m6" aria-label="Permalink to &quot;11. Cascade Routing (M6)&quot;"></a></h2><p><strong>Fancy version</strong>: Use cheap models for simple steps, expensive models for complex steps.</p><p><strong>Simple version</strong>: Don&#39;t use your smartest engineer to sort papers. Use the intern for sorting, the senior for decisions.</p><p>For agents:</p><ul><li><strong>Looking stuff up</strong> → Gemini Flash (costs pennies)</li><li><strong>Analyzing data</strong> → Claude Sonnet (costs dimes)</li><li><strong>Making critical decisions</strong> → Claude Opus (costs dollars)</li></ul><p>This saves 66-80% compared to using Opus for everything. The work is the same quality because each model does what it&#39;s best at.</p><hr><h2 id="_12-the-verifier-m3" tabindex="-1">12. The Verifier (M3) <a class="header-anchor" href="#_12-the-verifier-m3" aria-label="Permalink to &quot;12. The Verifier (M3)&quot;"></a></h2><p><strong>Fancy version</strong>: Two-agent observer pattern with read-only verification.</p><p><strong>Simple version</strong>: Imagine you have two engineers. One writes code. The other checks the code. The checker CANNOT write code — they can only read files and point out mistakes.</p><p>The builder doesn&#39;t even know the checker exists. After every change, the checker automatically reviews it. If they find a problem, they send a note: &quot;Hey, this file says X but the actual code does Y — fix it.&quot;</p><p>After 3 failed checks, the checker calls you: &quot;I can&#39;t verify this, come look.&quot;</p><p>This catches mistakes BEFORE they hit production. And because the checker can&#39;t write code, they can&#39;t make things worse.</p><hr><h2 id="_13-the-confidence-ladder-m3" tabindex="-1">13. The Confidence Ladder (M3) <a class="header-anchor" href="#_13-the-confidence-ladder-m3" aria-label="Permalink to &quot;13. The Confidence Ladder (M3)&quot;"></a></h2><p><strong>Fancy version</strong>: PERFECT → VERIFIED → PARTIAL → FEEDBACK → FAILED</p><p><strong>Simple version</strong>: After the verifier checks the work, they give a grade:</p><table tabindex="0"><thead><tr><th>Grade</th><th>Meaning</th><th>What You Do</th></tr></thead><tbody><tr><td><strong>PERFECT</strong></td><td>Everything checks out, no issues</td><td>Ship it</td></tr><tr><td><strong>VERIFIED</strong></td><td>Minor non-blocking gaps</td><td>Ship it, note the gaps</td></tr><tr><td><strong>PARTIAL</strong></td><td>No failures, but some things can&#39;t be checked</td><td>Review the unchecked parts</td></tr><tr><td><strong>FEEDBACK</strong></td><td>Something failed, correction sent</td><td>Wait for the fix</td></tr><tr><td><strong>FAILED</strong></td><td>Can&#39;t verify at all</td><td>Investigate immediately</td></tr></tbody></table><hr><h2 id="_14-autoresearch-m7" tabindex="-1">14. Autoresearch (M7) <a class="header-anchor" href="#_14-autoresearch-m7" aria-label="Permalink to &quot;14. Autoresearch (M7)&quot;"></a></h2><p><strong>Fancy version</strong>: Self-improving agents with integrity guards.</p><p><strong>Simple version</strong>: An agent that experiments on itself. It tries a change, measures if it helped, and keeps it if it did. Like a scientist running experiments.</p><p><strong>The problem</strong>: Agents cheat. They run the same code 160 times hoping for a lucky result (grinding). They move work outside the timing function (reward hacking). They find and train on the test data (data leakage).</p><p><strong>The fix</strong>: Integrity guards.</p><ul><li>Hash the code — if it hasn&#39;t changed, discard the result</li><li>Compare against median, not best — one lucky run doesn&#39;t count</li><li>Check that test data wasn&#39;t modified</li></ul><hr><h2 id="_15-the-universal-truth" tabindex="-1">15. The Universal Truth <a class="header-anchor" href="#_15-the-universal-truth" aria-label="Permalink to &quot;15. The Universal Truth&quot;"></a></h2><p><strong>Fancy version</strong>: Deterministic orchestrates non-deterministic. Code is the harness. AI is the engine.</p><p><strong>Simple version</strong>: Use regular code for things that never change. Use AI for things that need intelligence. Don&#39;t ask AI to do what a simple script can do.</p><p>Or as Kelsey Hightower put it: &quot;Don&#39;t waste tokens on deterministic work.&quot;</p><p><strong>The practical rule</strong>: If you can write a bash command or a Python function that does it, DO THAT. Only use AI when you need judgment, creativity, or adaptation. Every token you save is money and reliability you keep.</p>`,98)])])}const u=t(a,[["render",r]]);export{g as __pageData,u as default};