← All AI Engineer talks

AI Engineer World's Fair 2024

Which Jobs Can Be Replaced Today

Fryderyk Wiatrowski· Co-founder, Zeta LabsPeter Albert· Co-founder, Zeta Labs19:59

Read the talk

Which Jobs Can Be Replaced Today?

Start with the work an agent can pick up without being asked, then build its capabilities through better prompts, explicit state, fine-tuning and feedback.

From a talk by Fryderyk Wiatrowski and Peter Albert

Before you start: Familiarity with language-model prompts, tool calls and basic Python dictionaries will help with the implementation examples.

What would you hand to a reliable agent?

If you could hire a fully reliable, fast browser agent today, what would you ask it to handle? The audience’s answers are familiar: travel organization, expenses and calendars. Reliability and speed are assumptions in this opening question, leaving the workflow problem exposed: how should an agent take responsibility for that work?

Fryderyk Wiatrowski’s starting point is that sometimes you should not need to prompt the agent at all. A good employee receives onboarding and initial training, then identifies tasks independently instead of asking every morning what to do. The same expectation suggests an agent interface organized around ongoing responsibility, with less need for constant oversight.

Slide lists human employees, solid onboarding followed by independence, and building UIs for AI employees, with the presenter inset below.
Ideal employees don’t need to be prompted.

That changes the product question. A box for one-off requests can demonstrate an agent’s capabilities, but it leaves the user responsible for noticing, describing and initiating every task. An independent agent needs a way to discover work inside the workflow.

0:330:52
Suggest correction

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

0:33 · section reference included

Automate the work around the valuable decision

Begin by separating activities that multiply your effectiveness from the administrative work surrounding them. For a founder, hiring is a high-leverage activity. Fryderyk illustrates the leverage by imagining hiring 10 people smarter than himself who could do the work 10 times better. Searching LinkedIn and coordinating meetings surround that valuable activity, but need not consume the founder’s attention in the same way.

An executive assistant can absorb meeting coordination and similar work. Fryderyk gives an illustrative salary of 50–70K, without specifying a currency or pay period. But the immediate need may simply be to arrange meetings, rather than to acquire an assistant’s entire bundle of skills. Start with that specific problem and give an agent responsibility for it.

Slide asks about high-leverage activities versus noise, uses scheduling as an example, and asks whether to hire or simply solve the problem.
How to embed agents into workflows: distinguish high-leverage activities from noise.

The Jace AI example makes this concrete: CC the agent into an email conversation, and it handles meeting setup. In the demonstration, Jace replies to an investor interested in Zeta Labs using the founder’s availability. Fryderyk describes this narrow flow as needing calendar and availability access, without browser or tool interaction; he immediately adds that most other tasks do require integrations and tools. The CC flow is the interface shown in the recording, rather than a claim about today’s product interface.

2:272:37
Suggest correction

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

2:27 · section reference included

Find the reactive layer

A useful first division is between reactive work, where an event initiates a reasonably well-defined procedure, and proactive work, where deciding what to do is itself difficult. A customer-support refund request fits the first category:

  1. Receive an email asking for a refund.
  2. Inspect application-use logs.
  3. Decide whether the customer qualifies under the refund rules.
  4. Use a Stripe integration to issue the refund when appropriate.

A founder’s job is harder to capture in a simple rule set, but it still contains this kind of reactive layer. The prediction is that reactive jobs will be automated first because their triggers and responses are easier to specify.

Once the rules and initial training are in place, each incoming event can initiate work without a new prompt. Complexity still limits how far that independence should extend. The talk claims that agents of the time could reliably perform hundreds to roughly 1,000 steps, then immediately warns that they still could not be fully trusted. No task definition, success threshold or evaluation protocol accompanies that estimate.

The proposed implementation starts with a pool of triggers: Slack messages, emails and phone calls. Rules determine which events an agent should pick up and what actions it should prepare. The agent can suggest a solution and do preliminary browser work, then ask for approval before performing the consequential action. This shifts the human’s role from initiating every task to reviewing a prepared proposal; preparation and execution remain distinct.

4:454:57
Suggest correction

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

4:45 · section reference included

From a trigger pool to browser actions

The boundary between reactive and proactive work is not absolute. A founder responding to a macroeconomic shift is reacting too, but the event is unusual and there are fewer established response templates than in customer support. More descriptive rules could cover a wider range of situations, gradually reaching work currently considered proactive.

The larger proposal is an aggregator that brings together market movements, emails, phone calls, Slack messages and Linear issues. Improving foundation-model reasoning would make more complex rules usable, allowing the system to decide what deserves action. A practical starting point is much narrower: let agents pick up tasks from Linear or Slack before attempting to aggregate every possible signal.

Task discovery still needs an execution surface. Browsers offer access to a broad range of actions through the interfaces people already use; Fryderyk contrasts that reach with APIs he describes as often limited or poorly implemented. Making browser agents reliable is therefore a central implementation challenge, which Peter Albert takes up next. The broad aggregator remains a proposed direction, not a demonstrated system that replaces an entire job.

Slide titled “The path forward” lists trigger aggregation, improving AI cognitive abilities, Zeta Labs’ aggregator approach, and the question of agents acting.
The path forward: aggregate triggers and improve general trigger-handling rules.
7:287:34
Suggest correction

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

7:28 · section reference included

Escalate only when the task requires it

Peter, who previously worked on Meta’s Llama 2 models, organizes agent development as a progression: prompting, cognitive architectures, fine-tuning and finally reinforcement learning. Apply that progression separately to each system according to its complexity and performance requirements.

Peter estimates that prompting and cognitive-architecture changes can take hours, while fine-tuning and reinforcement-learning projects take weeks to months. Each escalation slows iteration and makes subsequent changes more expensive. High performance on a demanding task may justify those costs, but it is useful to exhaust the faster methods first.

9:349:48
Suggest correction

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

9:34 · section reference included

Make the prompt familiar and each decision smaller

Peter begins with model-assisted prompt rewriting. His rationale is that a language model can produce wording that is more predictable to another model—lower-perplexity text—and help expose misunderstandings in the original instructions. He also recommends XML tags to separate instructions from content, pointing to Anthropic’s use of that convention.

The broader heuristic is to stay close to familiar training patterns. For GPT-4, that means thinking about likely OpenAI fine-tuning conventions as well as pretraining data. Prefer common formats such as JSON, XML or Markdown to a custom syntax. Apply the same thinking to the division between system and user messages, and to whether material belongs in one message or several. These are Peter’s design heuristics about likely training distributions, not knowledge of a private training recipe.

Reduce the number of decisions the model must combine at each token. If a tool can accept a meaningful text value, requiring an arbitrary element number such as 5 or 4 adds a mapping step: the model must choose the target and translate that choice into an identifier. A textual target can remove that extra demand. For classification, the corresponding pattern is to choose a broad category first and then a narrower one, rather than jumping directly to the most specific class.

When you know how to approach a problem, put that structure into the instructions. A generic request to think step by step leaves the procedure unspecified. A more useful template can begin by summarizing the problem and then name the particular decisions needed to solve it. The aim is to give the model a usable sequence, not merely ask it to reason harder.

Context selection matters for the same reason. Every irrelevant passage creates another filtering task for the model. Long few-shot examples can often be shortened to the portions that demonstrate the important behavior without reproducing their entire inputs and outputs. Peter recommends starting with approximately 10–20 examples to test each prompt revision, alongside end-to-end evaluations. This gives prompt changes a repeatable check from the beginning.

10:4510:54
Suggest correction

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

10:45 · section reference included

Track state explicitly and make updates easy to express

Once prompting improvements are exhausted, split the task into smaller pieces. A cognitive architecture supplies structure that a single prompt would otherwise have to maintain implicitly:

  • State tracking: Record where a long task currently stands so the next call receives useful context.
  • Planning and replanning: Generate a plan, revise it as conditions change and decide what comes next.
  • Verification: Check work after an action or intermediate result.
  • Notes and scratchpads: Preserve information needed by later steps.

Extra calls introduce latency. Where work is independent, parallel execution can preserve the decomposition without making every call wait for the previous one.

The state-update interface should also fit the model’s task. Peter recommends key-value updates resembling Python dictionary assignments: first identify the key, then generate its replacement value. For example, a scheduling agent can record that it has prepared a proposed slot without marking the meeting as booked:

python

notes = {
    "task": "schedule investor meeting",
    "status": "checking availability",
    "proposed_slot": None,
    "booked": False,
}

notes["proposed_slot"] = "Tuesday 14:00"
notes["status"] = "awaiting approval"

Here the slot is a teaching value. Updating the notes records a proposal; it does not create a calendar event. The task and booked flag remain unchanged while two targeted fields change.

Record a proposed slot without booking the meeting

Constructed example: The dictionary keys, status strings and Tuesday 14:00 slot are teaching values illustrating the stated key-value update mechanism, not records from the Jace demonstration.

Scheduling task — unchanged
schedule investor meeting

Operation: Set proposed_slot to Tuesday 14:00, then set status to awaiting approval.

task

Before: Before the notes update
schedule investor meeting
After: After the notes update · Unchanged
schedule investor meeting

status

Before: Before the notes update
checking availability
After: After the notes update · Changed
awaiting approval

proposed_slot

Before: Before the notes update
None
After: After the notes update · Changed
Tuesday 14:00

booked

Before: Before the notes update
False
After: After the notes update · Unchanged
False
Targeted dictionary updates change the proposal fields while preserving the task and unbooked status.

The alternative is to regenerate the whole state or document. Peter reports that full rewrites often perform better because they give the model more generation time, at the cost of latency. He points to Cursor’s text rewriting as an example of preferring regeneration when models struggle to produce small diffs.

Update formModel’s immediate taskTradeoff
Key-value updateSelect a key, then a valueTargeted state changes
Full rewriteRegenerate the complete objectMore generation and latency
Small diffExpress only the precise editHarder for the models Peter describes

The choice is part of the tool design: a compact edit representation is useful only if the model can produce it reliably.

Peter also advises avoiding recursively nested structures when possible, because they add complexity and, in his account, move farther from familiar training patterns. Treat that as a heuristic against unnecessary nesting: current Claude prompting guidance permits XML nesting when it reflects a natural hierarchy.

Slide recommends parallelizing calls, key-value state updates, full rewrites over diffs, and caution with recursively nested structures.
Cognitive architecture considerations: latency, state-update interfaces, and nested structures.
14:0214:17
Suggest correction

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

14:02 · section reference included

Use structure without multiplying failure points

Reasoning templates can encode the known structure of a problem. For visual inputs, Peter suggests an explicit intermediate representation: first have the model describe the image’s key points in text, then reason over that description. His rationale is that models have seen trillions of text tokens but substantially less paired image-text data, making text a more practiced medium for the reasoning step. He presents this as an approach to try, rather than a measured comparison for a named vision task.

Components should also compensate for one another’s errors. If one stage can produce a particular mistake, another should be able to detect or handle it. But every additional component introduces another opportunity for the system to become brittle. Use enough structure to reduce each model call’s burden, while keeping the number of components as small as the task allows. The benefit of decomposition and the cost of coordination have to be considered together.

16:0616:13
Suggest correction

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

16:06 · section reference included

Fine-tune on varied, demanding interactions

Fine-tuning becomes relevant when the system still falls short of its performance target or when inference cost needs to come down. Peter’s proposed data-generation method keeps the application in the loop:

  1. Create templates describing different human roles.
  2. Instruct a language model to act as a person in one of those roles.
  3. Let the rest of the application respond normally.
  4. Collect the resulting interactions as synthetic training data.

The simulator varies the user side of the interaction while exercising the system you actually want to improve. Prompt diversity and difficulty are central to the usefulness of that data.

Peter attributes weaknesses in early Alpaca models partly to prompts that were too easy. His recommendation is to add conditions and complexity even when the eventual task looks simple, giving the model more relationships and constraints to learn from each example. That causal diagnosis is his interpretation; Stanford’s original account does not establish easy prompts as the cause of Alpaca’s weaknesses.

Fine-tuning can also remove intermediate stages from an existing pipeline. Pair the original inputs with the pipeline’s final outputs, then train a model to map directly between them. This distillation skips work that previously required several steps. Peter expects lower latency in exchange for some performance loss, making it a way to trade part of an elaborate architecture’s quality for a faster path through the task.

17:0817:18
Suggest correction

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

17:08 · section reference included

Filter the data, then consider reinforcement learning

Before moving to a more expensive training method, improve the examples used for fine-tuning through rejection sampling or filtering. Peter claims that ordinary fine-tuning can reach GPT-4 performance on a specific task and that filtering can take it further. He supplies no named task, dataset, GPT-4 version or metric for that comparison.

When execution feedback is unavailable, a language-model judge can evaluate the output of an individual model, a larger subsystem or the complete application. Use those judgments to remove examples that likely failed. The judge does not have to be perfect to be useful in Peter’s account: the practical objective is to exclude substantial amounts of poor training data before fitting the model to it.

Reinforcement learning is the final escalation because it can optimize behavior across multiple steps, an especially relevant capability for agents. Execution feedback or language-model judgments of system components can supply the learning signal. Peter reserves this approach for cases where the earlier methods do not work: the setup cost is substantial, and the resulting training investment makes it harder to switch to a different model. The decision to use reinforcement learning therefore includes both the performance target and the cost of changing the system afterward.

18:3018:48
Suggest correction

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

18:30 · section reference included

Resources

From the talk

Updates since the talk

Read the complete timestamped transcript
  1. 0:00

    [upbeat music] My name is Fryderyk, cofounder of Zeta Labs, and me and Peter, my cofounder, today will speak about, uh, the job replacement, the future of job replacement, and, uh, how we see agents in there.

  2. 0:23

    Uh, I will start with a vision, and then Peter will tell you a bit more how you can contribute to that by building agents on your own. Um, cool.

  3. 0:33

    So let me start with asking you a question. Um, if you could hire a re-reliable autonomous browser agent today... Let's assume that it's fully reliable and very fast. What tasks would you want to have replaced?

  4. 0:49

    I, I need three tasks.

  5. 0:52

    Boring ones. Travel organizations.

  6. 0:55

    Yeah. Travel organization, yeah.

  7. 0:58

    Expenses.

  8. 0:59

    Expenses, that's cool. Yes.

  9. 1:01

    Calendar.

  10. 1:02

    Calendar. I, I love the calendar one. Um,

  11. 1:06

    cool. Um, I think if you have a reliable agent and you want it to behave as your employee, um, our claim is that sometimes you don't want to prompt the agent.

  12. 1:24

    Just like when you hire a good employee to your company, you spend some time on the onboarding, initial training, um, but after that, if it's a good employee, it's very independent, um, you don't need to ask them to do things, right?

  13. 1:40

    So you can expect them to come up with the tasks on their own, and you probably shouldn't expect them to ask you every day, uh, what should be done.

  14. 1:49

    You don't want to overlook everything that's being done, and you don't... You want the employee to come up, come up with the tasks on their own. Ideally, you just give them the vision, and they will do the rest.

  15. 2:03

    The question is how we can implement this into agents.

  16. 2:09

    Probably, this is not the right UI for this. Um, in this UI, you just prompt the agent to do things for you one-off. I think it's great for demos and for, uh, showing the capabilities of the agents, like demo drives, um, but I don't think this is what the future looks like.

  17. 2:27

    So the question we can ask ourselves is how to embed agents into our workflows. Um, I think a good place to start is

  18. 2:37

    asking ourselves, what are the high-leverage activities that we want to, uh, preserve in our daily life, and what's noise? I will give you an example. In a founder's role, a very high-leverage activity, um, is hiring.

  19. 2:52

    Of course, if I hire a team of 10 people, they can do, do the job for me 10 times better than me because I hired smart-smarter people, and, um, it, it's a huge leverage.

  20. 3:02

    However, this huge leverage is surrounded by a lot of noise. For example, setting up meetings or searching for them on LinkedIn. So I think the vision that we can, um, keep in mind when building agents and thinking about how we can embed them into our workflows is how to distill the high-leverage activities and preserve them for ourselves

  21. 3:23

    while outsourcing the low-leverage things for agents. Um, o-one solution right now is just to, like, if you're a, I don't know, a big company and a, a big founder, you can hire an executive assistant that will do the meetings for you and set up those things.

  22. 3:39

    Uh, you probably need to give them a big salary, like a fifty, seventy K or something. Um,

  23. 3:44

    but initially, you always start with a problem. It's not like you look for an executive assistant. You start with a problem, "Hey, I need to set up meetings," and I don't have a very specific need for all the surrounding skills that they have.

  24. 3:58

    So instead of hiring high above, we just hire agents to do just this one thing. Um, I think if we find a way to implement agents in this way, um, that would be truly revolutionary.

  25. 4:09

    Um, so for example, here, you know, if, if we build a simple agent today, uh, if you use our agent Jace, go to Jace AI and use our agent, you can just CC Jace into your emails, and it will do the meeting setup for you.

  26. 4:20

    Super simple, doesn't need to interact with browsers, tools, anything. Needs to know your calendar and, uh, and needs to have access to your availability. That's it. So as you can see, I CC'd Jace.

  27. 4:30

    Jace is replying to an, uh, uh, an investor interested in Zeta Labs and setting up a meeting for me and knowing my availability. Um, that's sweet, um, but, you know, most of our tasks require, uh, integrations and tool access, right?

  28. 4:45

    Um, I think in order to think about how we can enable those in, uh, integrations, we can distinguish two modes of human work.

  29. 4:57

    One is reactive, and the other one is proactive.

  30. 5:03

    A great example of a reactive job is a customer support. What happens in customer support is that when you get an email, uh, for example, asking for a refund, you do a very well-defined task.

  31. 5:17

    So what you do is you go to a, uh, go to your logging system or whatever. You see whether someone used the app or not, and based on that, you can give them a, a refund or not.

  32. 5:27

    Um, and that's pretty simple. Uh, you, you need to attach Stripe, the agent can do the refund and everything. And then there are those proactive jobs, like for example, a founder's job, where it's super difficult to describe what needs to be done by a simple set of rules, right?

  33. 5:43

    Um, however, we still think that in every job, even in founder's job, um,

  34. 5:50

    there is the reactive layer that still creates the noise and ideally will be, will be handled for us. Um, so let's focus on, on the reactive part. We think that the reactive jobs will go first.

  35. 6:02

    Um, the beauty of the reactive thing is that once you set the rules for the agent, once you go about the, the-- do the initial training, you don't need to prompt the agents anymore.

  36. 6:12

    Uh, they will, um, they will just follow the rules and do everything for you. Um, but once the complexity comes in, it can be more difficult. Of course, agents as of today can perform reliably, I think hundreds, uh, up to a thousand steps.

  37. 6:28

    Um, but, uh, it, it's more... We, we can't really trust them yet, so we have to be careful.

  38. 6:35

    Mm, okay. So we talked about the reactive bit and the proactive bit. Uh, I think the first step to implementing the reactive, um, job replacement by agents is to create a pool of triggers, the triggers that cause the reactions of agents.

  39. 6:53

    Once you have the pool and the agents know the rules by which they should pick up tasks and perform the actions,

  40. 7:01

    the agents then can... Like, the pool being, being, for example, you know, the Slack messages, emails, or phone calls. The agents can pick up the tasks, suggest solutions for you, uh, do some upfront work in the browser, and then just show you, "Hey, do you, do you want me to perform this action?"

  41. 7:15

    And then you can just approve. So we went from prompting agents to do things to manage our calendars, um, to agents doing this on their own.

  42. 7:28

    I think, I think we all know that everything is a reaction.

  43. 7:34

    In particular, like, even founders' job is about reacting to things like macro market movements, things that are rather,

  44. 7:43

    um, unusual, and there, there are not many templates to being a founder as opposed to, for example, being a, in customer support. Um,

  45. 7:51

    however, you know, the more descriptive our rule set is, the more proactive jobs we'll be able to replace. Um, and as we extend the rule set for reacting to the triggers,

  46. 8:04

    I think we'll go closer and closer to replacing the pr- the proactive jobs.

  47. 8:12

    So assume that we have built the meta aggregator of all the triggers, that is being, you know, uh, macro movements of the market as well as, you know, emails, phone calls, Slack messages, linear issues, whatever, whatever triggers our actions.

  48. 8:25

    Um, I think the continuous improvement of the foundation models and their cognitive, cognitive abilities going up will allow us to have a very complex rule set because those models will be able to reason just like humans in terms of performing their jobs and deciding on what's next.

  49. 8:43

    Um, but the question is how to build this aggregator. And I think a very simple way to start would be, for example, in Linear or in Slack, and then agents just picking up tasks and performing them.

  50. 8:54

    Um, but then once we build the aggregator, the next step is to make the agents act. And, you know, browsers as opposed to APIs, uh, allow us for very generic actions.

  51. 9:08

    Um, APIs are very often limited and not really well implemented. So if we can make the browser agents work,

  52. 9:17

    can we fully replace humans at their jobs? Um, I will pass now to Peter, and Peter will tell you how you can implement browser agents today to reliably perform your daily jobs and what are the challenges on the way.

  53. 9:34

    So hi, I'm Peter. I previously worked on the Llama Two models at Meta, and I'll... Yeah, like Fryderyk said, I will give you a bit more actionable insights on how to actually build agents and kind of what the steps are, uh, you need to go through there.

  54. 9:48

    Um, so I think, like, if you want to build any kind of LLM part in your, in your system, and especially for agents, you go through a few different steps of, uh, based on the complexity of your task and how much performance you want to have.

  55. 10:02

    Um, and basically, this is kind of separate for every single system you have. Um, usually you can start off with prompting, and once things get more complex, you add cognitive ar-architectures.

  56. 10:12

    You can add fine-tuning and, and, and reinforcement learning. But I would only... I would kind of go through each of the steps separately because each of these kind of reduces your iteration speed a lot.

  57. 10:21

    So with prompting cognitive architectures, you can do things within hours. Fine-tuning reinforcement learning is, like, more like a week to month, monthly projects. And any kind of changes you want to make basically slow everything down a lot.

  58. 10:32

    Um, but if you kind of need to go on a certain task to really high performance, you kind of have to go also through steps. Uh, so first steps are, um, some general ideas, so like about how to improve your prompting.

  59. 10:45

    So usually it's a good idea to kind of rewrite your prompts with language models itself because you kind of use a low-plexity text when you give to a model.

  60. 10:54

    So the... Also, you can... Your own misunderstandings that you had initially will kind of be taken out. We also try to use, like, XML syntax. Like, Anthropic kind of started with this for their prompts, um, but I think it's u-useful for any model just to separate instructions from content.

  61. 11:10

    Um, also some useful, uh, mindset is to always try to match the fine-tuning and pre-training distribution of your language model. So if you use GPT-4, you kind of have to think about what did OpenAI probably fine-tune their models with, and, and also what is kind of in rep- in there.

  62. 11:27

    So for example, you should probably prefer JSON or XML or Markdown unified format, um, when trying to output text just because it's more, more, more frequent in pre-training distribution.

  63. 11:38

    So if you... Shouldn't probably do introduce your own format or your kind of own syntax to do things. Uh, you want to w-do things just like the most likely, uh, to appear in the web.

  64. 11:49

    Um, yeah, but it's also similar for what you put in the system prompt versus user prompt, how you... If you, if you decide to split up things into multiple messages or just one, just have to think about, like, what probably OpenAI got in their fine-tuning data set, what most people do, and that's usually a good way to

  65. 12:04

    do, uh, to stay within the distribution of the fine-tuning and will give you better performance.

  66. 12:10

    Um, also you should kind of try to think of how to minimize computation at each token. So if you have like a, a complex task, um, one, one thing is you to keep in mind that you, if you want to output, uh, for example, mappings like, like, uh, element ID five or, or four, you usually want to

  67. 12:25

    prefer text, text values. So if your model can output text, it's better than specific numbers, um, because basically you're skipping one, a mapping step. So you should try to, uh, let the model only reason about one thing at a time.

  68. 12:39

    Um, it's also relevant like if you do classification, for example, like it's better to first classify things into broader categories than smaller ones instead of directly going to the smallest one.

  69. 12:47

    And if you do this, this just, will just improve performance in general. I would also like if you have some, um, idea about how to think about a problem, I would try to give your-- if, if you do chain of thought, I wouldn't just say, say, uh, "Let's st- uh, think step by step," but instead you should

  70. 13:01

    kind of think about how you would approach a problem and specifically add these things in your chain of thought. So for example, first thinking about summar-summarizing the problem you have and, and go on going for all the steps.

  71. 13:14

    Um, a few more ideas is that you should think about everything that you input in a prompt is basically noise and, and some valuable content in, in there. So if you can reduce the noise as much as possible and only have the most relevant context in there, the model doesn't ne-need to, uh, find out what is noise

  72. 13:30

    and what is real context. Um, for featured examples, some really useful tips is that you shouldn't probably like, like if you have really long inputs and really long, uh, featured examples, you don't have to show the full ones.

  73. 13:42

    You just, just only focus on the few most important parts of them, and the model will still usually, um, uh, capture kind of how, how things work. Um, also, like even once you start prompting, you want to already set up some maybe like ten, twenty examples to kind of always run each prompt through.

  74. 13:58

    Additionally, too, will have like some better end-to-end evals as well.

  75. 14:02

    Um, yeah. So once you kind of, uh, exhausted all the gains you kind of get with prompting, you can try to split up tasks into multiple pieces. So basically you can think about how much cognitive load you put on a mo- on, on a model with one prompt, and if you can split things up further and also

  76. 14:17

    if you have some preconceived notion about how the problem should work, you can kind of improve this. So a few ideas about this is kind of when you add explicit state tracking of like if you have a longer task, you basically keep track of the state that the task currently is in.

  77. 14:31

    This basically increases the quality of context you're kind of giving your model. Um, for-- here are some ideas, for example, are using kind of planning. You kind of generate plans, afterwards modify them and replan.

  78. 14:42

    You can also have the verification steps afterwards, um, or you kind of take notes or have a scratchpad, uh, for intermediate work.

  79. 14:50

    Um, but once you kind of split up things in multiple pieces, when latency becomes more of an issue, so there are often, like, good ways to current-- parallelize the work while still, um, kind of getting good performance.

  80. 15:02

    Also, for all of these kind of agents, it's really important to think about really natural interfaces for them to use tools. Um, so for example, we found that if you want to update state, like for example, uh, some, some notes you have, it's often good to address them like with key value updates.

  81. 15:19

    'Cause basically you're kind of mimicking the Python syntax. You can update some dictionary, and this kind of allows you to target elements you develop. 'Cause at first, the model only needs to think about the key and then afterwards can think about what to update and not do both things at the same time.

  82. 15:34

    Um, you can get e-even better performance usually with most models if you do full rewrites of what you kind of want to update, 'cause this gives the model even more time to think about things, but when you add more latency.

  83. 15:44

    So I think that's, for example, why you see in Cursor like all the text rewritten because currently even well-best models are not that good at ge-generating like small discs.

  84. 15:54

    Um, also, you should try to avoid any recursive nest, nested structures if you can. Uh, this will just-- like the more nested it is, will be just be more out of distribution and make it more complex for model.

  85. 16:06

    Um, yeah. Also, you can kind of use some reasoning templates. Like if you know how the problems are structured, you should also kind of reflect this in your prompt.

  86. 16:13

    Um, if you deal with images, then one good idea is that you try to move the reasoning into your text. So you first describe the key points in your im-image, like let model ou-output, uh, the text form what the image contains, and then afterwards reason about this.

  87. 16:27

    Just because the models have been trained on trillions of tokens and text, and most of these, uh, like, uh, uh, im-image language pairs are usually much less data. So if you do reasoning about images, it usually performs worse than if you first convert it into text and then afterwards into, uh, more text.

  88. 16:43

    Um, you should also think about how to design your components to correct for one part. If you have one part, uh, in your system that creates an error that another handles it.

  89. 16:51

    And the more cognitive components you kind of add, the more brittleness you also add to the system. So usually it's try-- it's a good idea to kind of keep it to a minimum.

  90. 17:00

    Um, but on other hand, like the more components you add to kind of more cognitive load you, you split into smaller pieces so the model can, uh, can-- has ma-- less, less load in this.

  91. 17:08

    Um, the next stage, and if you still don't get enough performance out of your model or if you want to get, uh, lower cost, um, you can kind of start for fine-tuning.

  92. 17:18

    And a simple way to kind of collect data, no matter what your, your use case is, is by simulating basically real interactions in your app. And you do this by creating templates about how a human, like basically for different roles of human, and then you instruct one, uh, language model to act as a human and basically while

  93. 17:36

    rest of your system acts as normal. And it's basically synthetic data that you can kind of use to, to fine-tune on. And for this, like prompt diversity and difficulty is really key.

  94. 17:45

    So I think one of the core issues of like Alpaca models, like in the beginning, the first, uh, kind of fine-tuned models that went out there was that the prompt difficulty was way too low.

  95. 17:55

    These new models learn much better the more difficult your prompt is. Even if your task is not very difficult, I would try to add more and more conditions and more and more complexity, because then the model has more things to learn than just for a single question.

  96. 18:06

    Um, yeah. Also, another thing you can kind of, uh, try is like if you have multiple steps in your pipeline, you can, in the end, if you do fine-tune, you can distill to skip some of them.

  97. 18:16

    You basically have like some initial inputs and some final output, and you can directly distill a model to get these first inputs and how to generate your final outputs.

  98. 18:23

    And this can increase a lot of, uh, decrease your latency, but will kind of decrease performance a bit.

  99. 18:30

    Um, when the next step that's really easy is that you, um, kind of filter your data. So this kind of gives you, like usually with just fine-tuning, you get, get to like GPT-4 performance on, on your specific task, but you can get much further if you simply do some rejection sampling or filtering of your data.

  100. 18:48

    And for this, a easy way is if you don't have execution feedback in some way, is that you, um, basically use language model judges. You just judge, judge your output of your model or like of a larger system or even the final output of your system.

  101. 18:59

    When basically you filter out whole swaths of your data that you know probably didn't work that well. Even if your judge is not perfect, this will kind of cre-increase your pro-performance a lot.

  102. 19:09

    Um, yeah. And finally, so last step that you can kind of approach is like reinforcement learning. So this even allows you to kind of optimize over multiple steps in your system, so it's especially important for agents.

  103. 19:22

    And you-- good ways to get a signal for this, for this is execution feedback or like we said, these language model judges of different parts of your system. But I would usually consider reinforcement learning a kind of your final step when other methods don't work, um, because it makes it kind of difficult to move to one, uh,

  104. 19:37

    to different models and also there's a lot of set, setup cost you have to do. Um, yeah. So I think that's it. Awesome. Thanks. [audience cheering] [upbeat music]