Confirmed · 3 videos

Program models with deliberate context

Treat prompts, examples and the context window as the program: condition the model toward the answer you want, give it tokens to reason, and supply context in forms LLMs can read and act on.

An LLM imitates the full quality range of its training data and spends a fixed amount of compute per token, so it needs explicit conditioning. Useful tools include few-shot examples, step-by-step reasoning, self-checks, exact output formats and clean context. Karpathy extends the same idea to infrastructure, arguing that documentation and services should be legible and actionable for agents.

Based on Andrej Karpathy's public content. Not affiliated with or endorsed by Andrej Karpathy.

What following it looks like

  • Asks the model to work step by step and to check its own answer
  • Includes concrete input-output examples and an exact output format
  • Starts a new chat when switching topics and pastes current docs when the model's API knowledge is stale
  • Writes Markdown docs and CLI commands for agents instead of 'click here' instructions

Evidence · 12 quotes from 3 videos

Each quote was matched word for word against the transcript. Tap the time to hear it.

“Software 3.0 now is you design the prompt”

20:32realm of I design the algorithm. It's been with us for 70 years.
20:34been with us for 70 years. Software 2.0 is this data set iteration.
20:37Software 2.0 is this data set iteration. You design the data set. Software 3.0
20:39You design the data set. Software 3.0 now is you design the prompt
20:41now is you design the prompt and basically you're conditioning a

“"These transformers need tokens to”

24:59expect it to get the answer in a single token.
25:00There's just not enough time for it.
25:02"These transformers need tokens to
25:04think," I like to say sometimes.
25:06This is some of the things that work well,

“shows the transformer that it should show”

25:06This is some of the things that work well,
25:08you may for example have a few-shot prompt that
25:10shows the transformer that it should show
25:12its work when it's answering
25:14question and if you give a few examples,

“You have to really spread out”

24:48you can't expect the transformer
24:49to do too much reasoning per token.
24:52You have to really spread out
24:53the reasoning across more and more tokens.
24:56For example, you can't give a transformer

“these prompts really matter and there's a lot of art and science to designing these prompts.”

19:13the chatbot on Bing, new Bing. And so what I'm getting at, I think uh
19:14And so what I'm getting at, I think uh is
19:16is these prompts really matter and there's
19:18these prompts really matter and there's a lot of art and science to designing
19:20a lot of art and science to designing these prompts. And so what we've seen

“Basically, feel free to ask for a strong solution.”

31:29on low-quality solutions,
31:31as ridiculous as that sounds.
31:33Basically, feel free to ask for a strong solution.
31:37Say something like, you are
31:38a leading expert on this topic.

“So when you just change the URL from GitHub to get ingest then uh this will actually concatenate all the files into a single giant text and it will create a directory structure etc.”

36:42repo like my nanoGPT repo, I can't feed this to an LLM and ask questions about
36:44this to an LLM and ask questions about it uh because it's you know this is a
36:46it uh because it's you know this is a human interface on GitHub. So when you
36:48human interface on GitHub. So when you just change the URL from GitHub to get
36:50just change the URL from GitHub to get ingest then uh this will actually

“its not going to check by itself”

27:19and you have to get it to check,
27:21if you don't ask it to check,
27:23its not going to check by itself
27:24it's just a token simulator.
27:28I think more generally,

“when you ask it to uh think step-by-step, it gets to break down the problem, and it's not thinking too much per token.”

9:27because it it requires quite a bit of thought to sort of derive answers to
9:28thought to sort of derive answers to these questions. So, in an uh basically
9:31these questions. So, in an uh basically when you ask it to uh
9:33when you ask it to uh think step-by-step, it gets to break
9:35think step-by-step, it gets to break down the problem, and it's not thinking

“and it's not thinking too much per token. And so it has more tokens, and it has more time to think, and then it actually has a higher chance of getting the answer.”

9:31these questions. So, in an uh basically when you ask it to uh
9:33when you ask it to uh think step-by-step, it gets to break
9:35think step-by-step, it gets to break down the problem, and it's not thinking
9:36down the problem, and it's not thinking too much per token. And so it has more
9:39too much per token. And so it has more tokens, and it has more time to think,

“We actually have to change the docs because anytime your docs say click this is bad.”

35:57unfortunately have to it's not just about taking your docs and making them
35:58about taking your docs and making them appear in markdown. That's the easy
36:00appear in markdown. That's the easy part. We actually have to change the
36:01part. We actually have to change the docs because anytime your docs say click
36:04docs because anytime your docs say click this is bad. An LLM will not be able to

“Verscell, for example, is replacing every occurrence of click with an equivalent curl command that your LM agent could take on your behalf.”

36:04docs because anytime your docs say click this is bad. An LLM will not be able to
36:06this is bad. An LLM will not be able to natively take this action right now. So,
36:09natively take this action right now. So, Verscell, for example, is replacing
36:11Verscell, for example, is replacing every occurrence of click with an
36:13every occurrence of click with an equivalent curl command that your LM

Linked topics