AI Engineer World's Fair 2026

Beating RL With Reflection: GEPA and Optimize Anything — Lakshya A. Agrawal, GEPA

Read the talk

Beating RL With Reflection: GEPA and Optimize Anything

Lakshya A. Agrawal explains how full execution traces can teach an optimizer more than a reward alone—and how the same search can improve prompts, agent programs, repository skills and evaluators.

From a talk by Lakshya Agrawal

At a glance

Ideas worth remembering

  • Reflection uses the diagnostic content of an attempt—intermediate outputs, tool responses and errors—to propose a behavioral change in text.

  • GEPA’s Pareto pool preserves candidates with strengths on individual examples, allowing search to continue along alternatives when the highest-scoring prompt stops improving.

  • Optimize Anything can search over prompts, programs and policies when they can be represented as text and scored. The evaluator should return actionable feedback alongside its score.

  • Learned repository skills can carry practical knowledge between attempts and models, reducing repeated exploration as well as improving task completion.

  • For subjective tasks, detailed human annotations can first train an LLM judge prompt; that judge can then guide agent optimization in a continuing production feedback cycle.

When each attempt takes hours, learning from a score gets expensive

Teaching an AI system a new task usually means updating its weights: during pretraining, supervised fine-tuning or reinforcement learning. Lakshya A. Agrawal opens with the practical obstacle to that approach. Most teams do not have the data and compute needed for large training runs, especially when the task involves unfamiliar domain knowledge or an agent that works for hours.

Source frame: When each attempt takes hours, learning from a score gets expensive
Source frame: When each attempt takes hours, learning from a score gets expensive

Two costs make sample efficiency—the amount learned from each example—central:

  • Scarce domain examples. A specialized task may have too little existing knowledge or labeled data for supervised fine-tuning.
  • Expensive attempts. Running the agent, waiting for its tools and measuring the result can all take substantial time. Repeating that process hundreds of thousands of times becomes impractical.

In the reinforcement-learning setup described here, a model produces several rollouts, an evaluator assigns rewards, and an algorithm such as GRPO converts those rewards into weight updates. The learning signal compresses a rich attempt into a scalar score. Yet the attempt also contains intermediate reasoning, tool calls, environment responses and error messages. A failure score tells the optimizer that something went wrong; an error message may tell it what went wrong.

0:120:29
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:12 · section reference included

Use the trace to change the instructions

Reflective optimization gives a language model the rollout itself. The model examines what worked and what failed, then proposes a change to the prompt. Reflection can use intermediate outputs and, potentially, retrieve supporting information from a company knowledge base or a guide. The update happens in text, where a short instruction can express a large behavioral change.

Source frame: Use the trace to change the instructions
Source frame: Use the trace to change the instructions

A summarizer makes the idea easy to see. Change its instruction from producing a one-line summary to producing a ten-line summary, and the requested output changes substantially through a tiny edit. The example illustrates the size of an update available in prompt space: reflection can identify a desired behavior and state it directly, rather than trying to obtain it through a sequence of small weight updates.

GEPA combines this reflection with an evolutionary search over candidate prompts. Each attempt supplies a score and textual feedback, including domain-specific information. In Agrawal’s presented comparison, one reflection round using three examples produced twice the performance gains that GRPO achieved after 25,000 rollouts. Further reflection increased the gap, and the model performed its own reflection without an external expert teacher. These and the later benchmark results are task-specific reported outcomes; the recording does not establish complete evaluation protocols or dataset splits, so they do not establish a universal advantage over reinforcement learning.

3:023:04
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:02 · section reference included

A better prompt can be a better problem specification

The useful output of reflection is often a clearer specification of the task: how to interpret the input, what a pipeline stage is supposed to accomplish, and which lessons the examples reveal. In a multihop question-answering system, the optimized second-hop prompt captured a division of work. First-hop documents often cover one entity or aspect of the question; the next retrieval should find documents related to that information. The prompt teaches the stage how to contribute to the whole pipeline.

Source frame: A better prompt can be a better problem specification
Source frame: A better prompt can be a better problem specification

This automates part of the work teams otherwise do by repeatedly editing prompts and discovering the task specification themselves. Agrawal gives a run-time estimate of half an hour to one hour, depending on the pipeline. The approach also works through proprietary model interfaces: an optimized GPT-4.1 mini prompt outperformed GPT-4.1 on the math task presented.

The AMD example shows what a concrete learned correction can do. A coding agent had to program a new NPU through an unfamiliar API with very little information available online. Its initial performance was roughly 4%. GEPA changed the prompt, leaving the rest of the agent unchanged, and the reported result rose to roughly 30%. One discovered instruction told the agent to avoid an AMD library header that existed for NPU programming but did not work with the hardware generation being tested.

The causal change is specific: an apparently relevant library was unsuitable for this target, reflection discovered that restriction, and the prompt carried the restriction into subsequent attempts. GEPA found it in one step. The overall gain belongs to the optimized prompt as a whole; the example does not isolate how much of that gain came from this single instruction.

5:395:53
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

5:39 · section reference included

Optimize Anything makes the editable object larger

A prompt is one text artifact that controls behavior. An agent’s Python or JavaScript program is another. Optimize Anything extends the same search to an object that can be represented as text and evaluated with a score. Instead of editing only instructions inside an agent, the optimizer can edit the program that determines its tools and control flow.

Source frame: Optimize Anything makes the editable object larger
Source frame: Optimize Anything makes the editable object larger

The evaluator has two jobs: measure the candidate and return information that can help improve it. The examples make that distinction concrete:

  • CUDA kernels. Compilation and profiling can produce both a score and diagnostics about the code.
  • Numeric parameters. Numbers can be serialized as text, making them editable candidates too.
  • Cloud scheduling policies. A policy or heuristic can be scored on cost or efficiency, while job traces and service-level agreement violations explain where it failed.

The API accepts the problems to solve and a fitness function that returns a score plus an open-ended dictionary of side information. Expert feedback, compiler errors, profiler messages, tool errors and documentation can all go into that dictionary. This is the integration work that makes reflection useful: expose what the environment knows about the candidate, rather than reducing everything to whether it passed.

A playful example optimizes a Python script that renders a 3D unicorn to a PNG. It demonstrates that the candidate can be an image-producing program, rather than a prompt that returns text. The recording compares the resulting renderings, but does not explain the visual fitness function; the example illustrates the range of editable artifacts rather than a reproducible measure of visual quality.

10:3210:34
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

10:32 · section reference included

From a single model call to an agent—and from trajectories to skills

Agent development usually involves choosing tools, writing their descriptions and arranging control flow. In the ARC-AGI example, the starting point was a four-line Python program that called a model to reason through the problem. After 16 reflection rounds, Optimize Anything produced a six-step agent, raising the reported Gemini Flash accuracy from 32.5% to 89.5%. The editable object was the agent file itself, so search could introduce new steps.

Source frame: From a single model call to an agent—and from trajectories to skills
Source frame: From a single model call to an agent—and from trajectories to skills

The generated agent induced rule hypotheses, synthesized code, executed and traced that code, debugged it and proposed revisions. It then ran the resulting code on the test inputs and returned the output. This changes how an answer is produced: the system can inspect the consequences of an executable hypothesis and revise it before returning a result. A second harness example on MATH-500 produced a two-step agent and a reported accuracy improvement of 20% for GPT-4.1 nano; the recording does not specify whether that figure means a relative increase or percentage points.

Repository skills offer a different place to store what reflection learns. The objective is to learn a skill from an agent trajectory that will help when a similar problem appears. In the Go repository issue-resolution example, learned skills raised a budget-constrained GPT-5 mini coding agent from 24% to 93%. The skills contained practical repository knowledge: where features live, how the repository is organized, how to invoke tests and which build system it uses.

Those skills also transferred to Claude Sonnet, where Agrawal reports 100% issue resolution on the tested tasks and almost a 50% reduction in resolution time. The proposed explanation is practical: carrying repository knowledge into the next attempt reduces repeated discovery and token use. The skills learned with a cheaper model could therefore help a different model work more efficiently. The open-source skill-learning feature is available through the GEPA repository.

13:3513:38
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

13:35 · section reference included

Choose whether to solve this instance or learn for future ones

Optimize Anything distinguishes three optimization modes by what the result must serve:

  • Single problem. Improve one artifact, such as a particular matrix-multiplication kernel.
  • Multitask search. Work on related problems, such as matrix-multiplication and dot-product kernels, where information may transfer between them.
  • Generalization. Optimize using a set of examples, then deploy the prompt, skill or agent architecture on new problems.
Source frame: Choose whether to solve this instance or learn for future ones
Source frame: Choose whether to solve this instance or learn for future ones

The production examples span different objectives. Agrawal reports almost 40% lower cloud scheduling costs compared with expert heuristics and almost 35% lower OCR error rates for leading models. He also describes Databricks tuning an open model to outperform Claude Opus on its agent task at 90 times lower cost. These examples put accuracy, error rate and operating cost on the same agenda: a successful optimization need not mean buying a larger model.

Does a better model make prompt optimization less useful? Agrawal’s answer is the opposite: stronger instruction following can increase the value of precise task instructions. In the presented comparison, Claude Opus gained more from optimization than the open model did. That supports his view that model capability and task specification can reinforce each other, although it does not establish how every future model will respond.

16:4316:45
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

16:43 · section reference included

Learn the evaluator, then use it to improve the agent

Subjective tasks complicate the requirement to score a candidate. The proposed starting point is production experience: collect agent trajectories and ask a human to annotate about 50 of them with detailed feedback. Comments can describe response length, quality, terminology or other task-specific preferences. GEPA then optimizes an LLM judge prompt using those annotations, and that judge evaluates candidates while the agent is optimized.

Source frame: Learn the evaluator, then use it to improve the agent
Source frame: Learn the evaluator, then use it to improve the agent

How does human feedback reach the next deployed agent? The cycle below makes the intermediate evaluator visible. Human annotations first shape the judge; the judge then guides agent optimization; deployment produces the next set of trajectories. The judge’s usefulness depends on how well the annotations capture the intended quality standard—this procedure makes that standard learnable, without making subjective evaluation objective.

The ending returns to weight training. In work called “Learning Fast and Slow,” Agrawal describes co-optimizing model weights and prompt harnesses for continual learning. He does not develop the update procedure in this recording. The proposal nevertheless changes the relationship established at the start: reflection in text can accompany weight updates, with both becoming parts of a learning system.

Agrawal closes with reports of production adoption and an integration claim: GEPA can work with different frameworks and models without hard dependencies. His practical advice is to expose as much actionable domain information as possible. A score selects the desired result; traces, errors, documentation and expert feedback give reflection something useful to change. That is the starting point for trying the approach through the open-source implementation.

How it fits togetherHuman feedback trains the judge that guides the agent

Collect attempts from the deployed agent.

The evaluator is learned from annotated production behavior before it is used to optimize the agent.

19:0719:09
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

19:07 · section reference included

Resources

From the talk

Read the complete timestamped transcript
  1. 0:12

    Hi everyone, my name is Lakshia Agraal

  2. 0:15

    and today I'll be presenting on behalf

  3. 0:17

    of a very large effort uh the problem of

  4. 0:21

    reflective optimization or how can we

  5. 0:24

    self-improve prompts agents and models

  6. 0:27

    from textual feedback. The question we

  7. 0:29

    start with is how can we teach AI to

  8. 0:32

    perform new tasks. The standard way has

  9. 0:35

    been to perform weight updates with

  10. 0:37

    gradient descent either during

  11. 0:38

    pre-training, supervised fine-tuning or

  12. 0:41

    reinforcement learning. This has proven

  13. 0:43

    to be extremely effective, but it

  14. 0:45

    requires a huge number of examples.

  15. 0:48

    trillions of tokens for pre-training,

  16. 0:50

    tens of thousands of labeled examples

  17. 0:52

    for supervised fine-tuning or hundreds

  18. 0:54

    of thousands of rollouts for

  19. 0:56

    reinforcement learning in domains like

  20. 0:58

    math, coding, etc.

  21. 1:02

    However, most teams do not actually have

  22. 1:05

    that much data or compute and in fact

  23. 1:08

    the problems are that we are trying to

  24. 1:10

    tackle with AI now are bottlenecked by

  25. 1:13

    sample efficiency. What do we mean by

  26. 1:15

    that? Two things. First of all, there is

  27. 1:18

    low availability of domain specific

  28. 1:21

    knowledge resources which means there is

  29. 1:23

    not enough data to perform offline

  30. 1:25

    algorithms like SFT. Second, the domains

  31. 1:28

    that we are trying to apply AI

  32. 1:30

    increasingly are having expensive

  33. 1:32

    rollouts where either the LLM workflow

  34. 1:34

    pipeline or agentic rollouts are itself

  35. 1:37

    uh very slow or expensive to do or the

  36. 1:40

    task metric is very slow or expensive to

  37. 1:42

    execute. We are seeing that agents can

  38. 1:44

    now work for hours on end and if you

  39. 1:47

    were to apply an online learning

  40. 1:49

    algorithm to this uh it would require

  41. 1:52

    hundreds of thousands of rollouts and it

  42. 1:53

    would not be feasible. So we are seeing

  43. 1:56

    increasing use of agents for real world

  44. 1:58

    product uh applications where uh these

  45. 2:01

    invoke tools which can also be long

  46. 2:03

    running further exacerbating the sample

  47. 2:05

    inefficiency issue.

  48. 2:08

    The current dominant paradigm is

  49. 2:10

    reinforcement learning with verified

  50. 2:11

    rewards where given a model and a task,

  51. 2:14

    we perform any number of parallel

  52. 2:16

    rollouts and get rewards at the end.

  53. 2:20

    Finally, an algorithm like GRPO takes

  54. 2:22

    these rewards and converts it into

  55. 2:24

    gradients that are applied back to the

  56. 2:26

    model. However, as we can see, there was

  57. 2:29

    a lot of information in each of these

  58. 2:32

    rollouts, but we only learned an O of

  59. 2:35

    one score and propagated that via

  60. 2:38

    gradient descent. We can see that there

  61. 2:40

    is chains of thought, the tool calls

  62. 2:42

    made to the environment, the envir

  63. 2:44

    environment's responses to those tool

  64. 2:46

    calls, which could potentially contain

  65. 2:48

    error messages which also provide

  66. 2:50

    diagnostic value and we learned almost

  67. 2:53

    nothing from all of that. So the

  68. 2:55

    question we ask is can we make use of

  69. 2:58

    this other extremely rich information.

  70. 3:02

    Our idea is to perform reflective

  71. 3:04

    optimization in text space where instead

  72. 3:07

    of only using the zero or one reward

  73. 3:10

    signal, we can have a language model or

  74. 3:12

    an agent look at the trace of the entire

  75. 3:16

    rollout and reflect on what worked in

  76. 3:18

    them, what did not work in them. And

  77. 3:20

    this reflection could potentially use

  78. 3:22

    all intermediate outputs and potentially

  79. 3:25

    even make other tool calls such as

  80. 3:27

    retrieval from your company's knowledge

  81. 3:29

    base or some guide textbook and so on.

  82. 3:33

    So that's the first key idea and the

  83. 3:35

    second is that instead of only updating

  84. 3:38

    weights with small deltas, we can

  85. 3:40

    instead update a prompt where a single

  86. 3:43

    natural language update can give a very

  87. 3:45

    large behavior change. Let's take a

  88. 3:47

    simple example. Let's say you're tasked

  89. 3:48

    with writing a text summarization system

  90. 3:51

    and the prompt of that system says

  91. 3:53

    generate a oneline summary. If I just go

  92. 3:56

    and tweak that prompt to say generate a

  93. 3:58

    10-line summary, we can all agree that

  94. 4:01

    the behavior of the system would change

  95. 4:03

    quite significantly with that just one

  96. 4:05

    word change. And making that one word

  97. 4:07

    change is quite quick and we can reflect

  98. 4:09

    on our own behavior and identify what

  99. 4:12

    needs to change. If we were to achieve a

  100. 4:15

    similar kind of behavior update from our

  101. 4:17

    AI system, we would have to have

  102. 4:19

    thousands of gradient very tiny gradient

  103. 4:21

    updates sequentially.

  104. 4:23

    So with that key idea, we proposed JPEA

  105. 4:26

    which is a reflective prompt

  106. 4:27

    optimization technique for agents. It

  107. 4:30

    uses an evolutionary loop along with a

  108. 4:32

    novel parto-based candidate selection

  109. 4:34

    which I will come to later. It is akin

  110. 4:37

    to doing reinforcement learning in text

  111. 4:39

    space where instead of just rewarding

  112. 4:41

    receiving a reward score we are actually

  113. 4:44

    obtaining score along with textual

  114. 4:46

    feedback which can be very domain

  115. 4:47

    specific and learn all about the domain

  116. 4:50

    from it.

  117. 4:52

    Let's compare Japa with gRPO which is

  118. 4:54

    one of the leading RL techniques. On the

  119. 4:56

    x-axis we have the number of training

  120. 5:00

    steps uh also proportional to number of

  121. 5:02

    data samples seen and on the y-axis we

  122. 5:05

    have the performance on our domain that

  123. 5:07

    we are training for. And what we can see

  124. 5:09

    is that Japa in just one round of

  125. 5:12

    reflection using just three data points

  126. 5:14

    is already able to get twice the

  127. 5:16

    performance gains that gpo got after

  128. 5:19

    25,000 rollouts. Continuing to run Japa

  129. 5:22

    for a few more steps further increases

  130. 5:25

    that gap itself by another 2x. I want to

  131. 5:29

    note here that the model Quen 38B is

  132. 5:33

    optimizing itself here. There is no

  133. 5:35

    external expert teacher involved

  134. 5:37

    whatsoever.

  135. 5:39

    And what does Japa learn? Unlike prior

  136. 5:42

    prompt optimizers somewhat which would

  137. 5:44

    uh uh use model idiosyncrasies like my

  138. 5:48

    grandmother will be really angry if you

  139. 5:50

    don't generate a good prompt. Here Jpa

  140. 5:53

    is actually giving a very detailed

  141. 5:55

    problem specification which includes how

  142. 5:57

    to make sense of the input. What is the

  143. 6:00

    purpose and context of this particular

  144. 6:02

    pip part of the pipeline? What are some

  145. 6:04

    key observations and lessons from the

  146. 6:06

    data? So the prompt we are seeing here

  147. 6:08

    is for the second hop of a multihop

  148. 6:11

    question answering system where given a

  149. 6:13

    question we need to retrieve some

  150. 6:15

    documents that could potentially answer

  151. 6:16

    that question. Look at those documents

  152. 6:18

    summarize it and then finally answer the

  153. 6:20

    question. And here what we see is Japa

  154. 6:22

    has found out that first hop documents

  155. 6:24

    that often cover one entity or aspect

  156. 6:28

    and the second hop should actually be uh

  157. 6:31

    recovering documents that are related to

  158. 6:32

    it. We have seen that human engineering

  159. 6:35

    teams whenever a new model comes out

  160. 6:37

    spend weeks of their time manually

  161. 6:40

    tweaking one word here and there trying

  162. 6:43

    to discover the problem specification.

  163. 6:45

    This entire process is fully automated

  164. 6:48

    now with Japa which takes about half an

  165. 6:50

    hour to 1 hour to run depending on your

  166. 6:53

    uh pipelines.

  167. 6:56

    We can also apply Japa to leading

  168. 6:58

    proprietary models. Just for an example

  169. 7:01

    here we were able to optimize GPT 4.1

  170. 7:04

    minis performance to outperform GPT 4.1

  171. 7:08

    on a math task and we can see the kind

  172. 7:10

    of information distillation JPA has done

  173. 7:13

    in the prompt space itself. Coming back

  174. 7:16

    to the problem of sample efficiency, AMD

  175. 7:19

    developed a new hardware accelerator

  176. 7:21

    called NPU XDNA2 which had used a

  177. 7:24

    completely new API to program which had

  178. 7:27

    almost zero available information over

  179. 7:29

    on the internet and because of this uh

  180. 7:32

    the leading models at the time which was

  181. 7:34

    GPT4 was failing miserably to perform

  182. 7:37

    this task. We are able to take an

  183. 7:39

    existing agent which was getting 4.25%

  184. 7:41

    25% on this task and apply Japa without

  185. 7:45

    any other change to the agent itself and

  186. 7:47

    we got this prompt and pushed this

  187. 7:49

    performance 7x to 30.52%.

  188. 7:53

    So what this is uh what this goes to say

  189. 7:55

    is there can be lots of domain specific

  190. 7:57

    information which if you include in your

  191. 8:00

    AI systems prompts the models could

  192. 8:02

    actually perform much better and JPA can

  193. 8:04

    help you fully automatically discover

  194. 8:07

    that. I want to highlight the sentence

  195. 8:09

    saying avoid including ADF.h H. Now the

  196. 8:11

    interesting thing is AMD actually ships

  197. 8:13

    a library called ADF.h for programming

  198. 8:15

    NPUs but that did not work with this

  199. 8:18

    latest uh generation of hardware that we

  200. 8:21

    were working with and Jeppo was able to

  201. 8:22

    discover that in just one step. So how

  202. 8:26

    does it work? It's an extremely simple

  203. 8:28

    algorithm which simply takes your AI

  204. 8:30

    pipeline written in any agentic

  205. 8:32

    framework or even raw LLM calls that you

  206. 8:34

    may have. It simply runs your systems on

  207. 8:37

    a few examples and collects domain

  208. 8:39

    specific feedback. whatever information

  209. 8:41

    your environment contains is observed.

  210. 8:44

    Second, it runs reflection with an LLM

  211. 8:46

    or agent that reads the feedback and

  212. 8:49

    proposes a better prompt. Finally, and

  213. 8:51

    most importantly, it keeps a parto pool

  214. 8:54

    where it keeps every single candidate

  215. 8:56

    that wins on even one training example

  216. 8:59

    and not just the top scorer. The

  217. 9:01

    question is, but why keep a parto pool?

  218. 9:04

    And we kept getting asked this question

  219. 9:06

    a lot that is Jepper really better than

  220. 9:09

    running the model in a loop. So we went

  221. 9:11

    and tested it out and what happens is a

  222. 9:13

    loop keeps only the best and gets stuck

  223. 9:16

    in a local optima. So on the left hand

  224. 9:18

    side you see a search tree that was

  225. 9:20

    generated by using an LLM in a loop

  226. 9:23

    starting from a seed prompt at the top

  227. 9:25

    left where um we asked the LLM to

  228. 9:28

    improve the prompt. It improved the

  229. 9:30

    prompt and it generated a prompt that

  230. 9:32

    gave us the middle node. However, this

  231. 9:34

    prompt got stuck in a local optima and

  232. 9:36

    once again when we asked the LLM to try

  233. 9:39

    and improve it, it proposed something

  234. 9:40

    but that was not actually better. So, it

  235. 9:42

    went back and it again tried to improve

  236. 9:44

    it and it kept doing this and it

  237. 9:46

    exhausted all of the search budget. On

  238. 9:48

    the other hand, with Japa's parto based

  239. 9:50

    candidate selection strategy on the

  240. 9:51

    right, we can see that it maintains a

  241. 9:53

    much more balanced search process

  242. 9:56

    eventually converging to a much higher

  243. 9:58

    score. Across four benchmarks, we saw

  244. 10:00

    that more than half of the gains seen

  245. 10:03

    with Japa actually account for this and

  246. 10:05

    it gets almost twice the performance

  247. 10:07

    gains that you would get with just

  248. 10:09

    applying the model in a loop.

  249. 10:11

    Japa can perform really well across

  250. 10:13

    diverse benchmarks. Here we see results

  251. 10:15

    on question answering, instruction

  252. 10:17

    following, claim verification as well as

  253. 10:19

    math which all the leading frontier

  254. 10:21

    model companies are already optimizing

  255. 10:23

    their models a lot for and we are still

  256. 10:25

    able to get plus 10% just by optimizing

  257. 10:28

    the prompt on it. So we have so far seen

  258. 10:32

    Japa only optimizing the prompts but

  259. 10:34

    Japa goes far beyond prompts. And

  260. 10:36

    because prompts are just text artifacts

  261. 10:38

    that determine AI system behavior, the

  262. 10:41

    same algorithm can improve anything that

  263. 10:43

    you can express as a piece of text and

  264. 10:46

    you can score. For example, your entire

  265. 10:49

    agent harness is eventually just a

  266. 10:50

    Python or a JavaScript file and we can

  267. 10:53

    apply the same kind of reflective

  268. 10:55

    optimization process to that entire file

  269. 10:57

    and we can work with it. So if you can

  270. 11:00

    write it as text and score it, JPA can

  271. 11:02

    optimize it. So with that insight in

  272. 11:05

    mind, we propose optimize anything which

  273. 11:07

    is a universal API for optimizing any

  274. 11:10

    text parameter given any domain like

  275. 11:14

    code optimization where let's say you

  276. 11:15

    want to optimize the CUDA kernel code.

  277. 11:17

    The input is just that CUDA kernel code

  278. 11:20

    where an evaluator looks at this piece

  279. 11:22

    of code, maybe compiles it, profiles it,

  280. 11:25

    generates a bunch of related information

  281. 11:27

    that we call as actionable side

  282. 11:28

    information which is then provided to an

  283. 11:31

    LLM which proposes an better candidate

  284. 11:34

    maintaining this parto and it keeps the

  285. 11:36

    uh repeating this process um till we get

  286. 11:39

    convergence. The same thing can be

  287. 11:41

    applied to numeric optimization where

  288. 11:42

    your numbers can actually be serialized

  289. 11:44

    as text or harness optimization where an

  290. 11:46

    entire harness can be serialized as text

  291. 11:49

    or even cloud scheduling policy

  292. 11:51

    optimization where the scheduling policy

  293. 11:53

    or heristic algorithm can be expressed

  294. 11:55

    as a piece of text and the evaluator can

  295. 11:58

    be something like the negative of cost

  296. 11:59

    or some function measuring accuracy uh

  297. 12:02

    efficiency and the actionable side

  298. 12:04

    information can be something like job

  299. 12:05

    traces SLA violations and so on.

  300. 12:09

    The API is dead simple to use. All it

  301. 12:12

    requires is you give us the set of

  302. 12:14

    problems that you care to be solved

  303. 12:16

    along with an evaluator function or a

  304. 12:18

    fitness function that returns a score

  305. 12:20

    along with any available domain specific

  306. 12:23

    side information. If your domain

  307. 12:25

    produces expert feedback, return that.

  308. 12:27

    If your domain produces compiler error

  309. 12:29

    messages, profiler messages, tool call

  310. 12:31

    error messages, return that. If you have

  311. 12:33

    maybe a written up documentation, return

  312. 12:36

    that. any kind of it's a very open-ended

  313. 12:38

    dictionary. You can return literally

  314. 12:40

    anything and all you do is you call

  315. 12:42

    optimize anything with this fitness

  316. 12:44

    function and the set of problems that

  317. 12:46

    you have and optimize anything will sort

  318. 12:48

    of take care of it um and give you a

  319. 12:51

    optimized solution. Let's see some

  320. 12:52

    applications. Let's say you were tasked

  321. 12:55

    with generating a 3D unicorn. This is

  322. 12:58

    all the code that you would write or

  323. 13:00

    your agent can now write it because we

  324. 13:02

    have seen that optimize anything is a

  325. 13:04

    very easy to use API for leading agents

  326. 13:06

    like plot code. So all you do is write

  327. 13:09

    this code which says optimize a Python

  328. 13:11

    program to generate a 3D unicorn. Um and

  329. 13:14

    the candidate is a Python script that

  330. 13:15

    produces a PNG rendering whatever and

  331. 13:19

    here is the result. On the left hand

  332. 13:20

    side we can see claude opus 4.6. If you

  333. 13:23

    gave it this task, this is what it

  334. 13:25

    generated. And on the right hand side,

  335. 13:27

    what what we the unicorn that we get

  336. 13:29

    with optimize anything. This just for

  337. 13:32

    fun. But let's say you were tasked with

  338. 13:35

    writing an agent to solve a specific

  339. 13:38

    task. Typically teams spend lots and

  340. 13:41

    lots of time tweaking their agents,

  341. 13:42

    building tools for it, writing tool

  342. 13:44

    descriptions, uh carefully orchestrating

  343. 13:47

    the control flow and so on. Here we

  344. 13:49

    started with a simple four-line Python

  345. 13:51

    program that was simply calling a

  346. 13:53

    model's uh chain of thought to solve an

  347. 13:56

    RKGI problem. Within just 16 rounds of

  348. 13:59

    reflection, JEPA within optimize

  349. 14:01

    anything was able to find this

  350. 14:04

    sophisticated sixstep agent that took

  351. 14:07

    RKGI accuracy on RKGI uh that took RKGI

  352. 14:10

    accuracy of Gemini flash from 32.5% to

  353. 14:15

    89.5%. And we can see that this agent is

  354. 14:18

    automatic like by itself doing rule

  355. 14:20

    hypothesis induction code synthesis. It

  356. 14:22

    executes and traces the code

  357. 14:24

    automatically debugs this code goes back

  358. 14:26

    and proposes new versions of that code.

  359. 14:28

    And finally it runs it on the actual

  360. 14:31

    test inputs and returns the output. This

  361. 14:33

    is a runnable example. You can go to

  362. 14:35

    this QR code and you can run this

  363. 14:36

    example right now.

  364. 14:40

    So um applying the same uh uh like

  365. 14:43

    approach of discovering agent harnesses

  366. 14:46

    to math 500 we are able to push its

  367. 14:48

    accuracy of GPT 4.1 nano by 20% by

  368. 14:52

    simply creating a two-step agent and

  369. 14:54

    again I want to emphasize that all we

  370. 14:56

    did is we asked optimize anything to

  371. 14:59

    optimize an agent file and it was

  372. 15:01

    automatically discovering the

  373. 15:03

    sophisticated agent architecture and we

  374. 15:04

    did not have to do anything other than

  375. 15:06

    specifying the objective and the task.

  376. 15:10

    Finally, every single one of us is using

  377. 15:12

    uh some coding agent like cloud code or

  378. 15:15

    codex or maybe your favorite agent and

  379. 15:18

    agent skills has become a very leading

  380. 15:20

    part of the ecosystem where almost all

  381. 15:22

    coding agents understand skills. Let's

  382. 15:24

    say you want to optimize skills for your

  383. 15:27

    specific repository. This is the code

  384. 15:29

    that you write which says learn a skill

  385. 15:31

    from the trajectory. When the coding

  386. 15:33

    agent is presented with similar problem,

  387. 15:35

    the skill should be helpful. We just

  388. 15:37

    gave it this natural language behavior.

  389. 15:39

    And what we see is we started with

  390. 15:41

    minisu agent with GPT5 mini because we

  391. 15:44

    were very budget constrainted and we

  392. 15:46

    were able to take its performance from

  393. 15:48

    24% to 93%. An almost 3x jump on go

  394. 15:53

    repository issue resolution but more

  395. 15:56

    importantly the skills that were

  396. 15:57

    optimized very cheaply on a GPT5 mini

  397. 16:00

    agent we are able to take that and apply

  398. 16:02

    to the latest claude sonnet. This was

  399. 16:04

    done of uh about a few months back but

  400. 16:06

    we applied it to clots onet 4.5 pushing

  401. 16:09

    its accuracy to 100% issue resolution

  402. 16:12

    while more importantly cutting down the

  403. 16:14

    execution time or issue resolution time

  404. 16:17

    by almost 50%. We cut it down into half

  405. 16:20

    which also means it spent less tokens

  406. 16:22

    because skills contain information about

  407. 16:25

    how the repository is organized, how to

  408. 16:27

    invoke the test cases, where a

  409. 16:29

    particular feature is implemented, um

  410. 16:32

    what are the build system used by this

  411. 16:33

    repository and so on. This is a a

  412. 16:37

    feature called GSkill. You can find it

  413. 16:39

    in the JPA repository and it's fully

  414. 16:40

    open source as well. So, optimize

  415. 16:43

    anything is a single uh interface that

  416. 16:45

    provides three optimization modes. If

  417. 16:47

    you have just a single problem like

  418. 16:48

    there is a single matrix multiplication

  419. 16:50

    kernel that you want to optimize you can

  420. 16:52

    use it that way. If you have any number

  421. 16:54

    of related problems like you want to

  422. 16:55

    optimize a matrix multiplication kernel

  423. 16:57

    along with a dot product kernel and you

  424. 16:59

    know there might be some information

  425. 17:00

    transfer between these two you can use

  426. 17:02

    what we call as the multitask search

  427. 17:04

    mode and finally build a skill which is

  428. 17:07

    if you want to optimize on a set number

  429. 17:09

    of problems but your uh deployment can

  430. 17:12

    actually come up with many new problems.

  431. 17:14

    So like uh in case of math op like in

  432. 17:16

    case of math prompt optimization we are

  433. 17:19

    training on some examples but when we

  434. 17:21

    deploy it we can receive a completely

  435. 17:22

    new kind of query. So we care about

  436. 17:24

    generalization mode. So there you can do

  437. 17:26

    prompt optimization agent architecture

  438. 17:28

    optimization and so on.

  439. 17:30

    So optimize anything is can be used for

  440. 17:34

    a broad set of domains including cloud

  441. 17:36

    scheduling policy optimization where we

  442. 17:38

    were able to cut costs by almost 40%

  443. 17:41

    compared to expert huristics write

  444. 17:44

    custom solvers to match and exceed

  445. 17:45

    Optina even in blackbox mathematical

  446. 17:47

    optimization create agent skills prompt

  447. 17:50

    optimization and so on. It is so easy to

  448. 17:53

    use that within just 20 hours of

  449. 17:55

    releasing it, people at Snorkel had

  450. 17:58

    already improved some of their internal

  451. 17:59

    benchmarks with it and were tweeting

  452. 18:01

    about it. So, and Japa also improves

  453. 18:04

    multimodel VLM models performance. Here

  454. 18:06

    we are able to cut OCR error rates for

  455. 18:09

    leading models by almost 35%. And this

  456. 18:12

    is an externally validated report. Um,

  457. 18:14

    similar similarly, data bricks actually

  458. 18:17

    achieved 90x cost reduction in their

  459. 18:20

    deployed agents performance. uh uh

  460. 18:22

    performance and here they were able to

  461. 18:24

    tune GPT OSS 120B to outperform Claude

  462. 18:28

    Opus while being 90x cheaper. More

  463. 18:31

    importantly, the performance delta

  464. 18:32

    improvement that you see on top of

  465. 18:34

    Claude Opus is actually bigger than the

  466. 18:36

    one you see on open source models. Some

  467. 18:39

    people have asked me that oh as models

  468. 18:41

    get better the importance of prompt

  469. 18:42

    optimization will go down. I argue the

  470. 18:45

    opposite which is as models get better

  471. 18:48

    they will get better at instruction

  472. 18:49

    following and the more precise

  473. 18:51

    instruction about your task that you

  474. 18:53

    have to give to a very smart model the

  475. 18:55

    better that model will be at a uh

  476. 18:58

    solving your task and this is exactly

  477. 18:59

    what we see happening here the better

  478. 19:01

    the instruction was claopus actually

  479. 19:03

    jumped much uh higher

  480. 19:07

    some people have this question of uh

  481. 19:09

    what if we have subjective tasks which

  482. 19:11

    are very hard to evaluate jpa can

  483. 19:13

    actually learn evals for your task from

  484. 19:15

    production traces. The way to do that is

  485. 19:18

    you collect a bunch of production traces

  486. 19:20

    from your agent. Get a human to annotate

  487. 19:22

    just about 50 of those trajectories

  488. 19:25

    giving very detailed feedback. This is a

  489. 19:26

    long response. This is a short response.

  490. 19:28

    This is a good response. This uses this

  491. 19:30

    terminology, whatever. And once you get

  492. 19:33

    those human annotations, you can use JPA

  493. 19:35

    to optimize an LLM as a judge prompt.

  494. 19:37

    And you can use that LLM as a judge

  495. 19:39

    prompt then to go back and optimize your

  496. 19:41

    agent and deploy that agent. And this

  497. 19:43

    becomes a data flywheel where you can

  498. 19:45

    keep improving it. And this is a

  499. 19:47

    successful paradigm that uh some leading

  500. 19:49

    teams in production are already using.

  501. 19:51

    Then the question we get asked is like

  502. 19:53

    can we actually use this uh reflective

  503. 19:56

    optimization to train models and we

  504. 19:58

    recently had this paper called learning

  505. 20:00

    fast and slow where we propose fast slow

  506. 20:03

    learning where we can co-optimize model

  507. 20:05

    weights and prompt harnesses and this

  508. 20:07

    shows some very strong properties that

  509. 20:09

    one would want in a continual learning

  510. 20:11

    algorithm. Um I don't have much time to

  511. 20:13

    go over details but please uh look at

  512. 20:15

    the uh papers and

  513. 20:19

    uh since uh since release Japa has been

  514. 20:22

    used in production by these companies as

  515. 20:24

    well as the main methodology in these

  516. 20:26

    papers and here the CEO of Dropbox and

  517. 20:29

    Shopify are talking about their use of

  518. 20:31

    Japa and OpenAI also wrote a blog post

  519. 20:33

    about how you can build self-improving

  520. 20:36

    AI systems with Japa. Um so it's very

  521. 20:39

    simple to get started. It can plug into

  522. 20:41

    any framework, any model and it has

  523. 20:44

    absolutely zero hard dependencies. So

  524. 20:46

    you can deploy it any in any kind of

  525. 20:48

    setting. So um don't be afraid to

  526. 20:51

    optimize in the tech space and many

  527. 20:54

    problems can be framed as optimization.

  528. 20:55

    So bring actionable side information and

  529. 20:58

    surface as much domain specific

  530. 21:00

    information as you can to optimizers and

  531. 21:02

    the optimizers of future will be able to

  532. 21:04

    work with them. So please go and check

  533. 21:07

    it out. Thank you very much.