正在加载视频...

视频加载失败

New RLM trajectory that blew my mind! I will use this one as the main example in the YT tutorial. I passed in a CSV containing transcripts of 320 episodes of the Lex Fridman podcast and asked it to find what his first 10 ML guests had to say...

43,794 次观看 • 9 个月前 •via X (Twitter)

0 条评论

暂无评论

原始帖子的评论将显示在这里

相关视频

Subagents are the biggest cause of AI failures In most harnesses: 1. Main agent writes a summary of what it knows 2. Subagent starts from that summary only, and makes assumptions 3. Subagent works and sends back a new summary of what it did Same flaw as compaction: all summaries are lossy. This is how your assistant makes emails you never wanted, or purchases what you told it just to get the price of So I tried something new: checkpoint agents The initial agent has complete context of what needs to be done. And that input is already cached Fork the session where it is. Send the fork ahead to do the task and it will do exactly what the main agent would have done; their context is identical What is even better is when the fork finishes, the cache of the main agent is kept warm by the subagent (they share the same prefix) I measured it on a 137k-token session with Opus 5.5: → Main agent does it on its own: 67 s, $0.38, context +8-17k → Checkpoint: 117 s, $0.68, context +2k → Classic subagent: 123 s, $0.57, context +4-5k But here is what I found: avoiding large input is even more important than keeping cache. And most subagent tasks were done better either in series with retrieval, or split up to be parallel over fresh sessions from the start I do not think there is a place for subagent delegation at all. There should either be a super-agent that orchestrates and does no work, or a long running agent that can retrieve from previous sessions, not a worker that completes tasks partially and delegates the rest to other workers Don't design harnesses based on our assumptions of human behavior

Alexander Yue

227,410 次观看 • 12 天前

RLM is the most import foundation of my Pi Harness (other than Pi of course). It's seeded with late interaction retrieval results (thanks to @lightonai for pylate). The Agent initiates it with query then.. 𝐒𝐞𝐭𝐮𝐩 A python REPL is created and seeded with: 1. Late interaction search to pre-filter. Instead of doing top 3/5/10, it's top hundreds of documents. This is set into a `context` variable. 2. Python functions are loaded in to do more searches if `context` variable isn't enough. And to make llm calls with cheaper models in parallel batches. 𝐈𝐭𝐞𝐫𝐚𝐭𝐢𝐨𝐧 𝐋𝐨𝐨𝐩 From there, an LLM iterates in the REPL based on the query. It's just like exploring in a jupyter notebook. The LLM writes prose (like a markdown cell) and code to be run in the REPL each turn. This allows the LLM to sort, filter, and synthesize information. It can fan out and ask smaller models to summarize, combine, contrast, or do anything else to documents to help it understand the data. After several turns the LLM reponds with the final answer. Either because it found the answer, or hit the budget limit. Context as a Python variable, LLM as the programmer, REPL as the runtime. 𝐖𝐡𝐲 𝐃𝐨𝐞𝐬 𝐓𝐡𝐢𝐬 𝐖𝐨𝐫𝐤 1. Richer Shell. Agents (and subagents) work by intermixing code and prose/thinking. But they use static scripts or bash that run and exit and start over each tool call. That's not ideal for exploration and synthesis of data. For that, state is useful to continue building and exploring the data as you learn more. There's a reason jupyter notebooks have been popular with data scientists. 2. Keeps main agent context clean. The better context you have the better the agent will perform (duh!). This means three thing: better human input, less missing search results, and less incorrect search results. Letting the agent iterate allows it to synthesize just what is needed and nothing else. All bad paths or peeks at something that turns out to be irrelevant stays out of main agent context. 3. Stack the good ideas! People often compare late interaction search vs RLM. Or static vs dynamic languages. Or agentic search vs semantic search. But...You can just use them all together for what they're each good at. Use them all for the area they're really great for. Read the full post which has more detail about how and why.

Isaac Flath

43,349 次观看 • 6 个月前

New skill: self-managed-context (make the agent's context an editable file) It explains how to build agents that decide what to keep, update, or remove from the information they use to do their work. It can archive a long log while keeping the exact error, update its progress notes, or remove outdated information. Those edits then change what the model sees on its next turn. 1- Keep the system instructions and original task protected, outside the editable file. 2- Write the remaining conversation to a file, with labels for each message. 3- Let the agent edit that file using its usual code tools. 4- After each command, read the file back and use the updated messages for the next model call. Loading the skill ( alone into a fixed harness won't create live context editing, but it can help an agent build and then operate a harness that supports it. I gave the skill to a coding agent and had it build the harness itself. The task is a long stream of server logs that doesn't fit in the window. The agent reads it in 18 chunks, about 10k tokens in total, with a 5.5k budget. It has to report one incident ticket exactly and the final value of every config key. Same model & budget, three setups: 1- Model manages its own context 2- Harness forces a summary at 75% full 3- Keeps everything The video shows a real GPT-5.4 run. - Self-managed solved it 3 out of 3. - Keep-everything overflowed 3 out of 3. - Forced summary also solved it 3 out of 3. On GPT-5.4 the self-managed agent re-processed about 24% fewer prompt tokens than the forced summary. When it edited, it cut hard, so little was left after the edit to re-process (one edit took 5,537 tokens down to 771). On GPT-4.1 it saved nothing. It edited near the top of its context but kept most of what was below, and every edit forces everything after it to be re-processed. This is a small test at about 2x context pressure. The paper goes up to 24x, but imho the video below and the skill are a good way to start understanding the technique.

Muratcan Koylan

15,687 次观看 • 1 个月前

My RLM finally went recursive! Looking at these logs is way too addictive please send help. Notes: > Sent it 10 long wikipedia articles about deep learning (~2M context). > Asked it to find BLEU scores from Attention paper & explain MHA from these articles > RLM controlled by the new Minimax 2.5 ! Minor prompt changes were needed from the RLM paper. > Spends first 3 iterations understanding data format, works through errors, until it locates the Attention article from the mess. Like a human would use a Jupyter Notebook. > Launches subagent on only AIAYN article > This subagent launches 2 more subagents to fetch (a) BLEU score and (b) MHA (my original two-part question) > The lowest subagent returns the output using "FINAL_VAR" (i.e. it does not generate the text! Just finds the correct location in the context and sends it back as a variable) > Recursion propagates upwards > Outermost LLM recieves the RLM output, and generates the full text response. > Took 2.5 minutes walltime. Max recursion depth level was 2. 12 LLM calls in total. (This video contains cuts when the LLM is thinking/generating) > Subagents never gets to see more than 2000 characters. Only the outermost LLM gets to see the full output - it's needed to answer the final question, but its only 200-300 tokens compared to 2M! > Fully async. Code execution and subagent tasks can happen simultaneously! I feel soooo satisfied. Been some time since I've been this excited about shooting a tutorial video.

AVB

38,241 次观看 • 9 个月前

I cut Fable 5 token usage 2.5x with just one change! - Before: 5.5 M tokens · 7 errors · $8.94 - After: 2.3 M tokens · 0 errors · $4.17 The final build was the same for both, but the path the agent took wildly differed. In both runs, the agent started with the same thing, i.e., it understood the backend before building anything, like: - Permission policies - Available storage buckets - Auth providers configured - How edge functions are deployed The first run used Firebase, which was built for a human dev using a dashboard. While the dev can read the above state by clicking through tabs, an agent has no dashboard. So it gathered the same info through API calls. And there's no single Firebase call that returned this info. The agent required to query multiple times, and each query over-returned. For instance, when the agent asked how sign-in is configured, Firebase also returned the entire auth surface and every method it supported. This was far more context than what it needed. And it repeated across every part of the backend it inspected. Some states (like which auth providers are active) weren't queryable at all. I provided it myself. Otherwise, the agent would have guessed. Errors further compounded the token usage. When a dev sees "permission denied," they can look at the console and figure out whether it's a rule, a path, or an unauthenticated request. Firebase returned the same string to the agent as well, and it had none of that surrounding context to debug. So it guessed again, picked the most likely cause, and rewrote code, utilizing more tokens. This Firebase setup cost me 5.5M tokens and 7 manual interventions during errors on a full-stack RAG app. But I brought that down to 2.3M tokens and 0 manual interventions by using InsForge as the backend context engineering layer (open-source and self-hostable via Docker). It provides the same primitives as Supabase/Firebase, but structures the entire information layer for agents, instead of dashboards. In one CLI call that consumed ~500 tokens, the agent saw the full backend topology before writing a single line of code. This included auth, database, storage, edge functions, model gateway, micro VMs, and deployment. Also, instead of loading the entire product surface into context on every task, four narrowly scoped skills activated only when relevant to keep cognitive load minimal. And to ensure efficient retries if needed, every CLI operation returned structured JSON with meaningful exit codes, so the agent never guessed what to do next. Here's the InsForge GitHub Repo: (don't forget to star it ⭐) The video below depicts the final build, comparing Firebase and InsForge. To dive deeper, I recently published a full walkthrough building the same RAG app on both backends and inspected them end-to-end. Read it below.

Avi Chawla

113,330 次观看 • 5 个月前

You probably have too many subagents Anthropic team found that one agent with skills often beats a stack of subagents: better quality, lower cost, less latency, easier set up. One customer got about 2x faster runs after switching. Here is the thing. Every subagent hands back a summary, and every handoff loses detail. One agent that saw every step can actually connect them. And since Opus 4.5, models handle far more in a single loop, so a lot of that "router and specialist" structure is doing work the model no longer needs. The old reason to split agents was a bloated system prompt. Skills and tool search fix that: the agent only loads what it needs, when it needs it. Here's how to fold your subagents into one agent: 1. Build the core loop One model, one context window. Each turn it fires off tool calls, the harness runs them in parallel, and the same model decides the next step. Set turn and cost budgets and write gates in the harness. 2. Let the model own the plan It writes the plan on turn one and revises it as results come in. No separate planner, no router. 3. Turn subagent prompts into skills Steps, rules, and team know-how go into skills. The agent only sees short descriptions and loads the full skill when it needs it. That's what keeps the system prompt small: Anthropic cut Claude Code's by 80%+. 4. Turn API calls into tools Group tools by user intent, not one per endpoint. Past 30–50 tool definitions, tool choice degrades, so use tool search with deferred loading. Put validation, approvals, and permissions inside the tools. 5. Move reference material behind search Policies, specs, and docs sit behind a lookup tool the agent calls. Don't paste them into the prompt. Subagents still make sense in a few cases: when the context is measurably bloated, when you need parallel work in fresh context you can throw away afterward, or when the agent keeps picking the wrong tools because of conflicting instructions. Even then, call the subagent as a tool so the main agent stays in the conversation. And don't migrate everything at once. Start with a small eval, even 10 golden examples is enough, then fold in one subagent at a time, beginning with the ones that always run together. Look at which tasks flipped, not just the overall score, and run each task more than once, because some breaks only show up every other run. If the folded version does worse, keep the subagent. Fewer agents, smarter loop.

Yarchi

16,770 次观看 • 23 天前