It’s Tokens All The Way Down: How RLMs are Different — Kevin Madura, AlixPartners
Read the talk
It’s Tokens All the Way Down: How Recursive Language Models Work
Kevin Madura explains how storing context in an execution environment lets a model compute over large inputs, delegate subtasks and return structured results—and where the evidence remains preliminary.
From a talk by Kevin Madura
At a glance
Ideas worth remembering
The two central RLM capabilities are symbolic access to context in an execution environment and recursive delegation to the same or another model. Storing inputs and results as variables lets computation replace some direct reasoning over tokens.
Large, decomposable tasks are the strongest fit described in the talk. Inputs that already fit in context and workloads requiring low latency give less reason to use an iterative RLM process.
Madura reports a benchmark increase from 2.6% to 45.4% accuracy, especially on tasks amenable to code. His coding-agent comparison is preliminary and potentially unfair, so it does not establish a general ranking of approaches.
Structured boundaries remain useful even when the model chooses the procedure. The cohort example supplies three data frames and output types, lets the model iterate and submit within an iteration limit, and does not actually use submodel delegation. Schemas can also make delegated handoffs more precise and maintainable.
The closing applications span invoice consolidation, logs, harness optimization and a security report over approximately 500,000 lines of code. They illustrate broad applicability without establishing complete accuracy or coverage. Benefits from RLM-aware post-training remain a forward-looking bet.
Context becomes an object the model can work on
Kevin Madura of AlixPartners begins with the defining distinction of a recursive language model, or RLM: it treats context as an object in its environment. Rather than requiring the model to attend to the entire input as tokens, the system gives it a way to interact with that input symbolically, typically through a Python REPL. The input becomes something the model can access and manipulate through code.
Madura contrasts this with a typical tool call: the model sends JSON or another string representation, a separate program interprets it, and a result comes back as a string. In the RLM arrangement he describes, the model works within a symbolic environment. That distinction concerns how the model accesses data and results, rather than merely whether it has permission to run code.
The second defining capability is delegation. The model can call another language model with particular parameters; that model may be the same model or a different one. A submodel can then interpret its assignment, write code and delegate further. This makes decomposition recursive: the main model chooses how to break up a problem, while each submodel can make similar decisions about its own part. Madura’s broader bet is that improving models will make it practical to leave more of those decisions to the model.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Working beyond a single context window
Madura identifies an earlier long-document summarization concept as one of his first inklings of this approach, while explicitly stopping short of claiming it was the historical starting point for RLMs. The task was to accept an arbitrarily long document and produce a table of contents and summary. Its significance was the possibility of processing material beyond a single context window through a surrounding procedure. Deliberate context management could still help, but the window did not have to define the maximum size of the source material.
He then describes reported benchmark gains on answering questions about very long inputs and searching a large corpus of text. In the comparisons he presents, the RLM performs better than the alternatives; one baseline that calls a BM25 retrieval tool costs more while performing worse. These are results reported for the presented comparisons. The supplied account does not give the experimental conditions needed to turn them into a general claim that RLMs always outperform retrieval or always cost less.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Define the task’s boundaries and let the model fill the middle
Madura’s implementation model is a relatively deterministic shell around a flexible interior. The developer defines the task, the inputs the model should expect, the outputs it should produce and guidance about the objective. Inside those boundaries, the RLM chooses the decomposition and writes the code it needs. Its integration with the REPL lets those choices become operations in the same environment.
This moves part of the implementation burden from a developer-written sequence of steps to the model. The stable contract is what goes in and what should come out; the middle can adapt to the task. Madura describes this as a way to worry less about the internal implementation. A defined input and output contract supplies structure, although it does not by itself establish that the model’s analysis is correct.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Why variables and delegation reduce context pressure
The problem this arrangement addresses is context rot: Madura describes performance degrading as a context window fills. An RLM can slow that growth because the full input lives in a REPL variable rather than being placed directly into the main model’s context. The main model chooses how to access it and can assign subtasks to other models, receiving the results that matter instead of carrying every subtask’s full working context.
His comparison with RAG and agents centers on where information accumulates. In the RAG pattern he discusses, retrieved material fills the context window. In conventional agent and tool interactions, strings return to the model, while logic, execution and results remain loosely coupled. With an RLM, input and intermediate results exist as variables that generated code can compute over. The model can perform additional computation on those objects instead of trying to reason over all their contents as tokens.
The boundary with coding agents is less absolute. Madura again emphasizes the overhead of passing strings back and forth, but also points to Anthropic workflows as a related direction: intermediate results live in script variables. His comparison suggests that keeping results in an execution environment is a mechanism other systems can adopt too. He also recounts an attribution of those workflows to the RLM paper, though his account is tentative about who made that statement.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Choose tasks that benefit from decomposition and code
Madura recommends RLMs for large or dense inputs, tasks that decompose into smaller investigations and longer-horizon sessions. His hypothetical example is exploring an entire tax code: submodels could investigate interesting areas, return relevant sections and let the main model reason over those results. He also proposes very large output generation—potentially hundreds of thousands of lines—as an underexplored application, rather than presenting it as a demonstrated result.
The clearest reasons to skip the approach are that the task already fits in context or needs low latency. Those cases give less reason to introduce an iterative execution process. Coding capability is also part of the suitability discussion: the approach depends on a model being able to turn portions of the task into useful code.
On a long chain of thought benchmark, he reports an accuracy increase from 2.6% to 45.4%. He highlights logic puzzles, chess and chemistry as areas that benefit when the model can write code, bring in relevant context and compute a result. The main model then gathers results from submodels rather than trying to perform every operation itself. The figures support his emphasis on tasks amenable to computation, but the talk does not supply enough experimental detail to isolate which parts of the RLM arrangement caused the gain.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Buried numbers, data frames and the value of a defined pipeline
A small example makes the computational advantage concrete: sum 12 numbers buried across 30,000 tokens. A base model must identify the relevant values and calculate the answer while attending to a large body of text. A coding approach can use a regular expression or similar extraction procedure to find the values and then compute the sum. Madura acknowledges that examples like this are somewhat unfair to a base model; they deliberately expose tasks where computation is a better fit than direct token-based reasoning.
Data frames provide a related example with richer structure. By interacting with a data frame inside the REPL, the model can inspect and iterate over the object directly. Madura argues that this makes exploration easier and faster than repeatedly translating requests and results into JSON strings for separate tool calls.
His comparison with a coding agent is explicitly preliminary. He observed a bloated approach to these tasks, but says he did not investigate deeply and that the comparison may be unfair. His production recommendation is therefore more specific than a claim that coding agents are inferior: define inputs, outputs and a pipeline instead of sending a broad prompt and hoping for a good result. He expects that structure to reduce cost, complexity and unnecessary work, while acknowledging that better comparisons between base models, RLMs and coding agents remain to be done.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Implementations extend the idea to knowledge work and production traces
Madura describes a range of open-source implementations, from libraries focused on RLMs to broader frameworks incorporating the approach. Some target knowledge work involving spreadsheets and PDFs. The distinction matters because an execution environment can be organized around the kinds of objects a workload already uses, rather than requiring every task to be represented as a long text prompt.
Another example uses an RLM to extract insights from production workload traces and identify work that could be assigned to another model. Madura describes that analysis as iterative and automatic as traffic passes through. His emphasis is on letting the RLM explore a large body of traces instead of manually engineering the context for each investigation. He then turns to a cohort analysis walkthrough, concentrating on its traces because of the remaining time.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
A cohort analysis runs as an iterative notebook-like session
The cohort retention example supplies three data frames, guidance about what to look for and the desired output types. Madura presents this as a task one might give to a data scientist. The setup defines the analytical objective and result contract, then lets the RLM choose how to investigate the data.
Inside its own REPL, the model decides what to do first, writes code and interacts directly with the data frames, much as someone would type into a Jupyter notebook. It examines results and iterates. This particular run did not delegate to a submodel, although it had that option: it could have handed a large subset of the data to a submodel for analysis and received the result. The example therefore demonstrates direct execution and iteration without establishing that recursion was necessary for this task.
The trace presentation separates the model’s reasoning from the generated code and final output. The final answer formats key findings and recommendations, then uses a final submit operation to return the typed outputs defined at the beginning. This makes the task’s endpoint explicit: exploratory work eventually becomes a structured answer.
The model decides when to stop, within a configurable maximum iteration count. Madura gives 10 and 100 as possible limits, not as measured requirements for this run. The model explores until it considers itself ready and then submits. The limit bounds iteration, while the stopping decision remains with the model; the talk does not present an independent correctness test for that decision. Madura sees this as a path toward higher levels of abstraction, where developers increasingly specify objectives and models determine the procedure.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Invoice consolidation combines large inputs with structured handoffs
The first closing case study is consolidating a directory of invoices into one inventory. Invoices may be long, complicated and inconsistent, making a conventional processing pipeline difficult to build. Madura uses a 200-page invoice or contract as an example of material an RLM could work through without the developer having to design chunking, embedding and context-window strategies around it. The claimed benefit is less manual context engineering; the account does not provide an extraction accuracy measurement.
He then highlights schemas between the main model and submodel calls. Specifying what a submodel should receive and what data it should return makes the handoff more readable and maintainable. It also lets the main model request particular types of information more precisely. The system can retain flexibility in how it explores a large input while enforcing structure at the points where work passes between models.
Madura hypothesizes that these explicit contracts could improve performance with cheaper models, because inputs and returned types are more tightly specified. He says he would want experiments to test that idea. The supported distinction is between the structural benefit of clearer handoffs and the still-unmeasured possibility of better performance from less expensive models.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
From logs and harnesses to code analysis—and a post-training bet
A log-analysis example illustrates exploratory use: an AWS engineer supplied a body of log data to an RLM, surfaced interesting results and found it useful. Madura does not describe the specific patterns or provide a measured outcome. He then discusses Halo, a project that examines traces of agent tasks to improve the harness itself. The target is the machinery surrounding agent execution, rather than only a particular workflow. Long, complicated traces give the RLM both a large input to investigate and structure it can use when recommending a better harness.
His final experiment uses an intentionally vulnerable web application to generate a security report over approximately 500,000 lines of code. He emphasizes how little setup code and manual context engineering the example requires. The result illustrates an approach to obtaining insights from a large codebase, but the talk does not establish vulnerability coverage, false-positive rates or report accuracy. Processing a large body of code and producing a report therefore remains distinct from demonstrating a complete security assessment.
Madura closes with his largest forward-looking claim: models post-trained to be RLM-aware could learn to use this methodology more effectively and natively. That is a prediction about future capability, not a result demonstrated by the examples. His closing bet is that training models to take advantage of the RLM arrangement could produce a substantial further change in how they solve problems. He offers to answer questions afterward and ends the talk.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Read the complete timestamped transcript
- 0:12
Yep. Awesome. Thanks everyone for being
- 0:15
here. My name is Kevin Madura. I'm from
- 0:17
a company called Alex Partners. We're
- 0:19
we're a consulting firm. Um I'm here to
- 0:21
talk to you today about RLMs. Just
- 0:23
curious, show of hands, who here is
- 0:26
familiar with RLMs? So we know how much
- 0:29
time to spend on it. Okay. So not many.
- 0:31
All right. Well, that's good. So we'll
- 0:33
start with what an RLM is and and why
- 0:35
it's different. So RLM is recursive
- 0:38
language model. And really the the key
- 0:40
difference here is that it treats the
- 0:43
context as an object that it can
- 0:46
interact with symbolically in its
- 0:47
environment. So it differs from a tool
- 0:50
call in the sense that typically when
- 0:52
you do a tool call it's JSON or some
- 0:55
type of string that's being sent being
- 0:58
interpreted elsewhere maybe by some
- 1:00
other program and that's that's
- 1:02
returning effectively as a string. The
- 1:04
key difference here is that it's
- 1:06
interacting with a symbolic environment.
- 1:08
So typically that's a ripple Python
- 1:10
ripple. Um so that's key difference
- 1:13
number one. Key difference number two is
- 1:15
that it's it has the ability to delegate
- 1:18
to another LM often to itself. You can
- 1:20
specify whether it's the same model or a
- 1:23
different model, but fundamentally
- 1:24
because it lives in this environment,
- 1:26
you can offload or or make a sub call to
- 1:29
another LM with particular parameters
- 1:31
that also lives in that ripple
- 1:33
environment. And so you get this ability
- 1:36
to recursively decompose problems and
- 1:40
apply and have the LLM basically decide
- 1:42
how to apply certain logic or certain
- 1:45
interpretations or write its own code to
- 1:48
solve those problems and then that
- 1:50
recurses down. So the subLM can do the
- 1:52
same sort of thing in terms of
- 1:53
understanding and interpreting what it
- 1:55
thinks it needs to do. And I added this
- 1:58
last one here. It's largely bitter
- 2:00
lesson pilled in my opinion, right? is
- 2:03
and and shared by Alex and the rest of
- 2:05
the the creators of it. But as models
- 2:08
get better, you should be able to defer
- 2:10
more and more to the model for it to
- 2:13
kind of figure out on its own what it
- 2:15
needs to do.
- 2:17
So the I don't know if this is the
- 2:19
actual kind of starting point for RLMs.
- 2:22
This is one that that I consider to be
- 2:24
one of the the first kind of inklings of
- 2:26
it. This is a tweet from Omar who is
- 2:28
Alex's adviser um for for RLMs. And this
- 2:32
was a concept that he had come up with
- 2:34
where it was basically an ability to use
- 2:37
DSPI and some other techniques to take
- 2:39
in arbitrary
- 2:41
um arbitrary length inputs. And
- 2:43
basically the use case here would be
- 2:45
summarizing an arbitrarily long document
- 2:47
and coming up with a table of contents
- 2:49
and some summary of of that content. But
- 2:53
at least to me, this is kind of the
- 2:54
first inkling of okay, context windows
- 2:56
might not be something you need to
- 2:59
deliberately manage. Although there's of
- 3:00
course benefits to doing so, uh there
- 3:02
there could be ways to um to exceed the
- 3:05
the the context windows using some of
- 3:07
these clever techniques.
- 3:10
Uh and so if you read the paper and some
- 3:12
of the blog posts that are out there
- 3:13
from Alex and Omar, I mean it it it has
- 3:16
demonstrabably better performance on
- 3:18
some of these long context tasks. So,
- 3:21
ulong is one benchmark where um the the
- 3:25
intent of the benchmark it's is to
- 3:26
measure model performance on answering
- 3:28
questions about excessively long
- 3:29
context. This another one browse comp
- 3:32
where it needs to iterate through a
- 3:34
large a large body and corpus of text
- 3:36
and answer particular questions about
- 3:38
it. You can see the blue line at the top
- 3:40
there is the RLM. It's very good
- 3:42
performance as compared to some of these
- 3:44
other models. And even on on the price
- 3:46
curve, the the purple is actually just
- 3:49
using tool calling um with GBT5 calling
- 3:52
a BM25
- 3:54
tool. And that's actually even more
- 3:56
expensive for worse performance than
- 3:58
than an RLM. So it's worth reading into
- 4:01
if you're interested in in some of the
- 4:02
benchmarks and how RLMs perform. Um but
- 4:05
fundamentally uh an RLM again takes in
- 4:09
your input and you're kind of deferring
- 4:10
to the model about how to decompose the
- 4:13
process what code it needs to write and
- 4:16
it is very tightly integrated with the
- 4:18
ripple itself. So it it by itself
- 4:20
defines what it needs to do. And so I
- 4:22
kind of had this mental model in terms
- 4:24
of and I'm very DSP pipel if if you
- 4:27
couldn't tell by now basically a student
- 4:29
of of Omar and the rest of the group
- 4:31
there where you have this relatively
- 4:33
deterministic shell of what you want to
- 4:36
do like what what is your intent what is
- 4:38
your actual task that you're trying to
- 4:40
accomplish. You define that in terms of
- 4:42
your inputs and your outputs and some
- 4:44
type of guidance or prompt or what have
- 4:47
you to the model to say this is
- 4:49
generally what I want to achieve. go off
- 4:51
and do it. Here's the things that you
- 4:53
can expect as your input. Here's what I
- 4:54
want out of it. Go figure out the rest.
- 4:57
And so this applies for using something
- 4:59
like DSPI, but I think it applies to
- 5:00
RLMs as well because you don't have to
- 5:03
worry as much now about how the actual
- 5:07
implementation works in the middle. You
- 5:10
can just have some guarantees about the
- 5:11
inputs and the outputs and you can let
- 5:12
the model figure out the rest of of that
- 5:15
part of it.
- 5:17
So, a lot of this comes down to if if
- 5:18
you were at um I think it was code in
- 5:21
November in uh in New York City, Dex had
- 5:24
this great talk about just broader
- 5:25
context engineering and he he coined
- 5:27
something like the dumb zone which it's
- 5:30
kind of grayed out at the bottom there.
- 5:31
But the point is that we all know that
- 5:33
there's context rot, right? Once you
- 5:35
fill up the context window to a certain
- 5:37
degree, performance starts to degrade.
- 5:39
And so RLMs somewhat get around this
- 5:42
problem because the context itself
- 5:46
doesn't fill up as quickly because
- 5:47
you're deferring a lot of the subtasks
- 5:49
to the subm models and it's the full
- 5:53
kind of context and the inputs aren't
- 5:55
exposed to the context window itself. It
- 5:58
lives as a variable in the ripple and so
- 6:00
the main LM can choose how to um how to
- 6:04
access that. It can offload some of
- 6:06
these subtasks to to sublim. And really
- 6:09
the only context that it gets back are
- 6:11
the things that actually matter. So in
- 6:13
terms of how it's meaningfully
- 6:15
different, rag of course you kind of
- 6:16
just stuff the context window. You want
- 6:18
it to limit there. Agents are largely
- 6:21
just bringing strings back and you don't
- 6:24
have this tight coupling between the
- 6:26
logic, the execution and the results.
- 6:29
And so you still run into the same sort
- 6:31
of problem there. Same thing with tool
- 6:33
calling and and codec. And then RLMs as
- 6:37
I mentioned you're act the the LLM is
- 6:40
actually just interacting with the
- 6:42
context the results as variables in the
- 6:44
ripple so that it can do additional
- 6:46
computation on versus it trying to
- 6:49
attend to all these different tokens in
- 6:50
this in its context window. It's it's a
- 6:52
meaningfully different way of of the LLM
- 6:54
interacting with the uh the actual
- 6:57
content itself.
- 6:59
And so people always say, okay, what's
- 7:00
the difference between that and and
- 7:02
encoding agents? Um,
- 7:05
in my mind, the largest difference is
- 7:07
that the way that tool calls are tool
- 7:09
calls calls are done is passing strings
- 7:12
back and forth. Um but you can see with
- 7:14
the release recently of workflows that
- 7:18
uh Anthropic is doing something fairly
- 7:20
similar and they um at the CIS
- 7:23
conference I think it was Tar or someone
- 7:25
similar um mentioned the RLM paper as a
- 7:30
key driver of workflows and how they're
- 7:33
how they've implemented it. And you can
- 7:35
see here the intermediate results for
- 7:38
workflows live in script variables i.e.
- 7:42
a variable in the context. So, it's
- 7:44
driving some of these these
- 7:46
breakthroughs and some of these
- 7:47
techniques from the from the labs as
- 7:48
well.
- 7:53
I'll skip through this a bit just
- 7:54
because I have about 10 minutes left,
- 7:56
but generally speaking, when you want to
- 7:58
use it, it's obviously for large or
- 8:00
dense input context.
- 8:02
An underexplored area is outputs as
- 8:05
well. So if you have a some type of task
- 8:09
where you need to generate hundreds of
- 8:11
thousands of lines or whatever it might
- 8:12
be, RLMs I think would be a good
- 8:14
candidate for that as well. Obviously
- 8:17
tasks that are imunable to some type of
- 8:18
decomposition. So if you want to look
- 8:21
through the entire I don't know the
- 8:23
whole tax code as an example and try and
- 8:25
find loopholes or something. You can't
- 8:27
obviously put all of that into context
- 8:29
at once. You could use an LLM to crunch
- 8:32
through all of that and iteratively
- 8:34
explore and use sub agents to explore
- 8:36
interesting areas of this of the tax
- 8:38
code. Bring back those sections and then
- 8:40
reason over that and then just generally
- 8:42
for for longer horizon sessions. And
- 8:45
when you want to skip it, of course, it'
- 8:46
be something that fits in context. You
- 8:48
want something that's low latency or the
- 8:50
the model itself is as strong of a
- 8:52
coder.
- 8:54
And uh our friend Raymond here did some
- 8:56
great perfor performance testing on the
- 8:58
long chain of thought benchmark. Um I'll
- 9:01
leave this link as a as a leave behind
- 9:03
after, but just to give you a sense of
- 9:04
how well it performs on some of these
- 9:06
tasks. It's a meaningful jump overall
- 9:09
from from 2.6 to 45.4%
- 9:12
um accuracy on many of these tasks. And
- 9:14
you can see it performs really well on
- 9:16
things that are amanable to code. So
- 9:18
logic puzzles and and chess and
- 9:20
chemistry and things like that where it
- 9:23
can dynamically write code bring in only
- 9:26
the relevant part of the context compute
- 9:29
that and then return the result where
- 9:31
the main model is really just harvesting
- 9:32
the results from from the subLM and try
- 9:34
instead of trying to do that by itself.
- 9:38
Um I put together a few just super
- 9:40
simple examples. I mean, these are kind
- 9:42
of they're somewhat unfair, I suppose,
- 9:44
to to the base model, but it it makes
- 9:46
the point that there are certain tasks
- 9:48
that base models just aren't really fit
- 9:51
to do themselves because they because
- 9:53
they have to attend all these to
- 9:54
different tokens at once in the context
- 9:56
window where you need or want to use
- 9:59
some type of coding approach to that. So
- 10:02
in this random example, summing 12
- 10:04
numbers that are buried across 30,000
- 10:05
tokens, the LLM trying to figure all
- 10:09
that out by itself and give you the
- 10:10
answer isn't always going to work as
- 10:12
well as something that you can write reg
- 10:14
x4 or something similar. And then the
- 10:17
same same sort of thing particularly for
- 10:19
data frames and we'll walk through a
- 10:20
brief example here where because the LLM
- 10:23
can
- 10:25
interact with the data frame within the
- 10:27
ripple. It just has a much better
- 10:29
understanding of the content and can
- 10:31
iterate through that much more quickly
- 10:32
than having to pass tool calls back and
- 10:35
forth in terms of like JSON strings and
- 10:37
and that sort of thing.
- 10:39
Um, and then I threw this in there in
- 10:41
terms of running the same experiments
- 10:43
with a coding agent. Now, I didn't look
- 10:45
into this too deeply. There's probably
- 10:47
some unfair math going on here, but you
- 10:49
can see that it was totally bloated in
- 10:51
terms of the way that cloud code tried
- 10:53
to um tried to solve these tasks. So,
- 10:57
there's more work to be done there, of
- 10:59
course, in terms of like running
- 11:01
experiments to compare base models
- 11:03
versus RLMs versus something like a
- 11:06
coding agent. But there's just for
- 11:07
certain tasks for like production
- 11:09
workloads. My sense is you probably
- 11:11
don't want to just do cloud-p
- 11:14
your prompt and like hope for a good
- 11:16
result. Like you want more of a
- 11:17
structured approach to your inputs, your
- 11:20
outputs and you want a defined pipeline
- 11:21
for doing so which reduces your cost, it
- 11:24
reduces your complexity, reduces your
- 11:25
bloat, all that sort of thing. Um where
- 11:28
RLMs can can shine.
- 11:32
So in the real world there are a bunch
- 11:34
of different open source libraries that
- 11:36
implement RLMs at some level. Some of
- 11:38
them are more RLM focused uh like a
- 11:42
predict RLM would be a good example of
- 11:44
that versus others are kind of just
- 11:46
integrating it into the broader approach
- 11:48
or the broader framework. DSPI obviously
- 11:51
uh there's axe which is really
- 11:53
interesting work uh that's being done
- 11:55
there. Predict RLM is more focused on
- 11:57
like knowledge work. So it works with
- 11:59
spreadsheets and PDFs and that sort of
- 12:01
thing and then fast RLM. And then
- 12:04
there's a tweet yesterday from this guy
- 12:06
Sam Hogan
- 12:07
um where who runs inference.net. He's
- 12:09
using an RLM to basically run and
- 12:13
extract um insights from your particular
- 12:16
um production workload traces so that
- 12:19
they can see what makes sense to defer
- 12:22
off to something like a GLM 5.2 too and
- 12:25
do that iteratively and automatically as
- 12:26
your traffic goes through. So point
- 12:29
being, you don't have to worry about
- 12:32
context engineering. You can kind of
- 12:33
just throw the RLM at it and have it
- 12:35
figure it out. Um, I only have five
- 12:38
minutes left, so we won't go through
- 12:39
this whole example and I'll I'll skip to
- 12:41
some of the traces because that's
- 12:42
probably the most interesting. Um, but
- 12:44
this is all you would really need to do
- 12:46
in terms of a simple, in this case it's
- 12:49
like a a cohort retention analysis,
- 12:51
something that you might give to a data
- 12:53
scientist. But this concept of applying
- 12:56
an RLM to a complex data structure like
- 12:59
a data frame becomes very easy to do.
- 13:02
This is all the code you need to do it
- 13:04
where I'm feeding in three different
- 13:06
data frames. I'm saying these are the
- 13:08
sorts of things you need to look for.
- 13:09
These are the output types that I want.
- 13:11
and then just let the RLM go on it. And
- 13:15
I'll I'll show you some of the traces.
- 13:18
Um, and so it has its own ripple where
- 13:21
it can interact with those data frames.
- 13:23
And you can see it reasoning through.
- 13:25
Okay, first I need to do this. It's
- 13:26
writing the code. And because it's li
- 13:28
it's living in the ripple with the dataf
- 13:30
frame, you don't have this additional
- 13:32
bloat of the tool calls back and forth.
- 13:34
It's actually interacting directly with
- 13:36
the dataf frame as if it was typing in
- 13:38
its own Jupyter notebook. And there
- 13:40
there's significant advantages for for
- 13:43
doing so. And so you can see the sorts
- 13:45
of outputs that it gets as a result. And
- 13:48
it by itself will iterate. And in this
- 13:51
case it didn't, but it has the option to
- 13:53
defer to subLM to do okay. And now I
- 13:56
have this big whatever this big subset
- 13:58
of the data sublm go off and do this
- 14:00
analysis give me the result and it can
- 14:02
do that iteratively over time. Uh but
- 14:05
the point is that the LM is directly
- 14:09
interacting with the data frame in its
- 14:10
ripple
- 14:12
um and kind of iterating through the
- 14:14
results. And so this u this platform
- 14:17
compound is RLM and DSPI native. So it
- 14:21
gives you this really nice breakdown of
- 14:23
the reasoning. It separates out the code
- 14:25
that's being generated and ultimately
- 14:27
you can see
- 14:29
uh the final output which is here where
- 14:33
it's formatting. Okay, here are the key
- 14:35
findings that I have. Here are the
- 14:36
recommendations. And then you have this
- 14:38
final submit which is the final answer
- 14:41
that gives you the the typed um outputs
- 14:43
that you had defined up front. And the
- 14:46
key thing here is that the LLM itself is
- 14:48
deciding when to stop. So you have this
- 14:51
you have a variable of max iteration. So
- 14:53
you can just you can decide whether you
- 14:55
want it to have a maximum of 10 or 100
- 14:57
or whatever it is. But it will by itself
- 15:00
explore the data, understand what needs
- 15:02
to happen and then when it it itself is
- 15:05
comfortable, it can run submit and give
- 15:07
you the final output. Again, being
- 15:10
bitter or less impilled, this will get
- 15:11
better over time. You can kind of just
- 15:13
defer everything and it will figure out
- 15:15
what to do. And so the hope would be you
- 15:18
don't have to I mean we're already you
- 15:20
know whatever this is 20 lines of code
- 15:22
or something. Um, but you can you can
- 15:25
see a world where you can continue to go
- 15:27
up levels of abstraction. As long as you
- 15:29
can define what your objective is and
- 15:31
what you want it to do, the the model
- 15:33
will kind of figure out the rest. Uh, so
- 15:36
we just walk through a bunch of this,
- 15:37
but um these are the different steps
- 15:39
that it took in this example in the code
- 15:42
that it wrote. Um, and then I'll just
- 15:45
breeze through a few real world case
- 15:47
studies and where it's actually being
- 15:48
used. So I mentioned predict rm before.
- 15:51
So the company trampoline AI I think it
- 15:54
is they're doing really interesting work
- 15:56
in applying RLMs u like I mentioned
- 15:58
before for different pieces of knowledge
- 16:01
work. So natively interacting with PDFs
- 16:04
and and spreadsheets and that sort of
- 16:06
thing. So in this relatively simple
- 16:08
example okay I have a bunch of I have a
- 16:11
directory of invoices that I need to
- 16:13
create one consolidated inventory out
- 16:15
of.
- 16:17
As we all know invoices can be
- 16:19
complicated. that can be very long, that
- 16:21
can kind of be all over the place. To do
- 16:24
that today without RLMs or this sort of
- 16:27
like framework gets very complicated
- 16:30
very quickly. I have a lot of battle
- 16:32
scars to to prove it. Um, but with
- 16:34
something like an RLM, you you don't
- 16:35
need to worry as much about, okay, if I
- 16:37
have a 200page invoice or contract or
- 16:40
whatever it is, you can let the RLM just
- 16:43
churn through all of that and give you
- 16:44
the result instead of having to worry
- 16:46
about chunking and embedding maybe and
- 16:49
doing all these different strategies to
- 16:51
try and get around the context window
- 16:53
management that we've all had to to do
- 16:55
previously.
- 16:57
Um, so it allows you, the point there is
- 16:59
that you can focus on the abstractions
- 17:02
and what you actually want to do instead
- 17:03
of the context engineering itself, which
- 17:05
I think is a really helpful um, helpful
- 17:08
output of all of this. And an
- 17:10
interesting tidbit for all the DSPI fans
- 17:12
in the room, predict RLM uses DSPI to
- 17:16
determine the schemas between the main
- 17:19
LM and the subLM calls, which I
- 17:22
personally think is is a nice feature
- 17:24
because you have a lot more readability
- 17:26
and maintainability. So you understand
- 17:29
exactly what the model is trying to
- 17:31
achieve and the model can be much more
- 17:32
precise and prescriptive about the types
- 17:35
of data that it's looking for from the
- 17:37
subLM. And I would want to do some
- 17:40
experiments to test this out, but I
- 17:42
would think that this would improve
- 17:43
performance for cheaper models like a a
- 17:46
Quinn or some of the other ones because
- 17:48
you're specifying the inputs and outputs
- 17:49
and you're enforcing those types coming
- 17:51
back. And so you get all the benefits of
- 17:54
the RLM being able to churn through all
- 17:56
this information, but you have a lot
- 17:58
more of the structure in between where
- 18:01
when it's handing off to a sublm, it it
- 18:03
enforces some of the uh some of those
- 18:05
schemas.
- 18:07
This is an example from um an AWS
- 18:10
engineer from a couple days ago. We were
- 18:13
just kind of playing around with it, but
- 18:14
I just thought it was a nice example of
- 18:17
you can kind of just throw arbitrary
- 18:20
data at RLM. In this case, it was a
- 18:23
bunch of log data um to surface some
- 18:26
interesting uh results and he he found
- 18:28
it useful. Um there's a a project called
- 18:32
Halo which uses an RLM to look at traces
- 18:36
of um of different t uh agent tasks.
- 18:41
And basically the promise of Halo is
- 18:43
that instead of optimizing a particular
- 18:45
like workflow or DSPI uh or or other
- 18:49
framework
- 18:51
uh like structure itself, it's it's
- 18:53
actually iterating on the harness. So
- 18:56
it's like a meta abstraction almost or
- 18:58
meta optimization of the harness itself
- 19:01
and it uses an RLM because as we all
- 19:03
know tracing can get very long and and
- 19:05
complicated.
- 19:07
So the RLM can not only take in all that
- 19:09
context but also leverage the um the
- 19:13
structure of those traces to to
- 19:15
recommend a better um a better harness.
- 19:18
And then this last one uh this is all
- 19:21
the code you need. I ran this little
- 19:23
experiment. There's a an intentionally
- 19:25
vulnerable application called uh it's
- 19:27
from OASP, but basically there's a it's
- 19:30
a web app with a bunch of
- 19:31
vulnerabilities in it. This is all the
- 19:33
code you need on the right hand side to
- 19:35
run basically an agent to run through
- 19:38
whatever it is 500,000 lines of code to
- 19:41
generate some type of security report.
- 19:42
That's just an arbitrary example, but
- 19:44
the point is you don't need a lot of
- 19:47
context engineering. You don't need a
- 19:48
lot of structure around it to achieve
- 19:51
what you want to do. And so you can feed
- 19:53
in an arbitrary uh size codebase into
- 19:56
this and get some type of insights out.
- 19:58
So you can imagine that being applied to
- 20:00
other areas as well. Um so I know I I
- 20:04
rushed through everything a little bit
- 20:05
but I'm happy to answer questions
- 20:06
afterwards. Uh the I'll leave you leave
- 20:09
you with this. The biggest promise I see
- 20:11
here is just imagine a world where the
- 20:13
models are actually post-trained and
- 20:16
actually like RLM aware. I think things
- 20:18
will get pretty crazy pretty quick when
- 20:21
they actually know how to use and kind
- 20:24
of take advantage of the RLM methodology
- 20:27
natively. So, thank you so much for your
- 20:29
time.