← Blog

Karpathy's Three-Layer AI Method: What He Actually Said

The spec, verifier and environment framework is Austin Marchese's organization of ideas from Andrej Karpathy's April 2026 talk. Karpathy did not name that framework in the talk. Its practical value is straightforward: define the goal before delegating, check whether the result achieves it, and give the AI the standing context and limits it needs.

Austin Marchese’s 13-minute YouTube video, posted on June 9, 2026, presents a practical way to work with Claude. In it, he says Karpathy’s method “can be broken down into three simple layers.” Understanding which ideas come from Karpathy and which Marchese added makes the advice easier to evaluate and use.

Karpathy co-founded OpenAI, was head of AI at Tesla and coined the phrase “vibe coding” for building software by describing it to an AI. Marchese drew on Karpathy’s fireside chat with Sequoia Capital partner Stephanie Zhan at the firm’s AI Ascent 2026 event. Karpathy posted a summary and an edited transcript on his blog on April 30. Specs, checking AI output and investing in your own setup all come up in the conversation. He never groups them into layers.

Most of the method survives a check against the recording, and the parts Karpathy did not say are worth using anyway. The popular version also skips his best example, and it only hints at the idea that explains why the middle layer works.

Each layer, traced to its source

LayerWhat Karpathy said at AI AscentWhat Marchese’s video adds
SpecPeople stay in charge of the spec and the plan. Work out a very detailed spec with the AI, beyond what plan mode produces.Have the AI interview you about the goal. Keep specs small, with checkpoints. Make the AI ask you to confirm key decisions.
VerifierAI automates what can be verified, which makes it uneven. Yelling at a model changes nothing. Stay suspicious and stay in the loop.Write pass criteria first. Use a second model as a critic. Check the work against real signals, such as a live deployment.
EnvironmentInvest in your own setup. Keep an AI-maintained wiki of what you read.A standing instruction file, saved instructions for repeat jobs, limits the tool enforces, and an always do, ask first, never do split.

The spec carries context the AI can’t see

Karpathy raised specs when Zhan asked which human skills gain value as AI does more of the work. His answer started with agents, the AI tools that carry out multi-step jobs on their own, such as writing and testing software. He said agents are like interns right now, and that “people have to be in charge of this spec, this plan.” Then he added:

“I actually don’t even like the plan mode… obviously it’s very useful, but I think there’s something more general here where you have to work with your agent to design a spec that is very detailed.”

Plan mode is a setting in Claude Code and similar coding tools where the AI drafts a plan for your approval before it changes anything. Karpathy wants more detail than a plan carries. He suggested the spec might be “basically the docs,” with the person in charge of oversight and the top-level categories while agents fill in the blanks.

His best example came from MenuGen, a small app he built that turns a photo of a restaurant menu into pictures of the dishes. Users sign in with Google and buy credits through Stripe, the payment service. His agent matched each purchase to an account by comparing the two email addresses. Customers can pay with a different email from the one they signed in with, and anyone who did would pay for credits and never get them. Karpathy had to insist that everything tie to a permanent user ID.

The implementation missed the possibility that one customer could use two email addresses. A spec is where that requirement belongs, and a test using different sign-in and payment addresses is how you check that the system handles it.

Marchese’s steps for writing a spec are practical, and none of them come from Karpathy:

  • Ask the AI to interview you about the goal before it drafts anything. “Create the end-of-month report” is a task. The goal is the decision that report is meant to drive.
  • Keep each spec small, with a checkpoint where you review the output before the next piece starts. Handing over the whole job at once and waiting for a finished product is what Marchese calls working waterfall.
  • Read the spec the AI drafts line by line, and tell it to make you confirm each key decision.

The verifier: AI is strongest where work can be checked

This layer has the deepest roots in Karpathy’s own writing. In a November 2025 blog post called Verifiability, he argued that traditional software automates what you can specify, while AI automates what you can verify. A task counts as verifiable when a model can attempt it many times and have every attempt scored automatically. That is why AI has improved fastest at math and code, where answers can be checked, and lags on work that depends on context and common sense.

At AI Ascent he gave his newest example of that unevenness, which he calls jaggedness:

“I want to go to a car wash to wash my car, and it’s 50 meters away. Should I drive or should I walk? And state-of-the-art models today will tell you to walk because it’s so close.”

The car, of course, has to be at the car wash. “How is it possible that a state-of-the-art model can refactor a 100,000-line codebase or find zero-day vulnerabilities, yet tells me to walk to the car wash?” he asked. His answer was that people need to stay in the loop and treat these systems as tools.

The same talk explains why pleading with a model does not help. Karpathy describes these models as ghosts rather than animals, statistical simulations with none of the drives that push a person to try harder under pressure. “If you yell at them, they’re not going to work better or worse,” he said. “It’s more just being suspicious of it and figuring it out over time.” Marchese swaps the ghost for a robot librarian that answers from the books it has and confidently makes something up when the right book is missing. It is a good picture for explaining the idea to a team, and the picture is Marchese’s own.

Marchese’s three checks turn that suspicion into a routine:

  • Write the pass criteria before the work starts. For a report, name the decision it must support and the evidence each recommendation needs. A required section count may help presentation, but a report can meet it while getting the decision wrong.
  • Consider a second AI model as a critic when it helps expose a specific weakness. Karpathy suggested the idea for writing, where there is no single right answer: “you can imagine having a council of LLM judges.” Agreement between models is not proof that a claim is true. Check factual claims against their sources and use direct tests for results that can be tested. A second model is optional; it adds value only if it finds meaningful errors that the existing checks miss.
  • Connect the AI to a real-world signal. For a website, verify both availability and the customer task by loading the page, completing a booking and checking its receipt. For a report, reconcile its figures to the underlying records before comparing periods.

Boris Cherny, who created Claude Code, offers related practical advice. In a January 2026 thread, his advice was to “give Claude a way to verify its work,” which he called “probably the most important thing to get great results out of Claude Code.” He added that “if Claude has that feedback loop, it will 2-3x the quality of the final result.” The figure is his own estimate and comes from no published study. When choosing an AI system, test representative cases from your own workflow that were held apart from development. Report how many cases you tested, the errors that matter and the uncertainty in the result. A small, convenient sample cannot establish reliability, as we explain in what an AI evaluation actually measures.

The environment carries your setup into every chat

Asked what separates a mediocre programmer using these tools from a fully AI-native one, Karpathy said it is about “getting the most out of the tools available, using their features, and investing in your own setup.” He compared it to the way programmers have always tuned their code editors. Marchese turns that into a workshop you build once and keep improving, so each new chat starts with your rules and reference material already in place.

The part of this layer Karpathy has written about in detail is his personal knowledge base. “When I read an article, I have my wiki being built up from those articles,” he said at AI Ascent. “I love asking questions about it.” He published the idea as a note on April 4, 2026, written to be pasted straight into an AI tool. In it, an AI reads the documents you collect and builds linked summary pages from them. He calls the pattern an LLM Wiki. A large language model (LLM) is the technology behind ChatGPT and Claude.

The pattern has three layers of its own. Raw sources go in untouched, and the AI reads them but never edits them. From those, the AI writes and maintains the wiki, a set of linked pages. The third layer, the schema, is an instruction file that tells the AI how the wiki is organized. Of the wiki, Karpathy writes, “You read it; the LLM writes it.” If you have seen “Karpathy’s three layers” described as sources, wiki and schema, the writer was describing this note.

That schema is the same kind of file that anchors Marchese’s version of this layer, which has four parts:

  • A standing instruction file. Claude Code reads a file called CLAUDE.md at the start of every chat, and OpenAI’s coding tool, Codex, reads one called AGENTS.md. Put the defaults you would otherwise repeat in it, such as “Before building anything multi-step, include a verification plan.”
  • A reference folder organized so the AI can find what it needs, his version of Karpathy’s knowledge base.
  • Saved instructions for recurring jobs, which Claude calls skills. His rule of thumb is to write one for anything you plan to do repeatedly and to fix it each time it falls short.
  • Hard limits for anything expensive to get wrong.

Limits need more than a sentence in that file. A line telling the AI to leave a folder alone is a request, and the model can ignore it. Claude Code also supports hooks, small checks the tool runs before the AI edits a file, and a hook can block the edit outright. Marchese sorts work into three bins: what the AI always does on its own, what it must ask about first and what it never does.

Understanding stays with you

Most write-ups end on “You can outsource your thinking, but you can’t outsource your understanding,” and so did Karpathy’s talk. He introduced the line as a tweet that “blew my mind,” so the words are someone else’s. He explained why they stuck with him: “I am becoming the bottleneck of even knowing what we are trying to build, why it is worth doing, and how to direct my agents.”

Each layer depends on that understanding. You cannot write the spec without knowing the real goal, judge the output without knowing what good looks like, or set limits without knowing which mistakes your business cannot absorb.

Karpathy’s blog write-up of the talk shows the method on a small job. He gave an AI model his recent blog posts and tweets, then had it turn the transcript into a summary and a cleaned-up version. He read both before posting and reported that the result “reads ok without glaring mistakes.” His own writing was the environment, the two outputs he asked for were the spec, and his read-through was the verifier.

Put all three layers to work on one report

Here is an illustrative setup for a weekly sales report. Its job is to help a sales manager decide which opportunities need attention, rather than simply summarize activity.

LayerWhat goes into the setup
SpecUse this week’s CRM export to identify opportunities with an overdue next step. For each, show the owner, the last recorded commitment and the action needed. Treat an absent commitment as missing information.
VerifierCheck every recommended action against its opportunity record. Confirm that the report uses the stated reporting cutoff and excludes closed deals. Reject a recommendation that invents a customer commitment or relies on an outdated next-step date.
EnvironmentKeep the stage definitions, reporting timezone, example of an accepted report and data-access limits together. Give the reporting task read-only access; it prepares recommendations, while the manager decides what to do.

Now test an awkward case: the CRM says the next step is overdue, but the latest note says the customer moved the meeting to next week. A report that calls for an urgent chase has followed the date field and missed the context. The correction is to reconcile the conflicting records and flag the outdated field, not to make the recommendation sound more polished.

Save that case with the setup and check it on the next run. You have a concrete goal, a failure you can recognize and a lasting improvement to the instructions. That is a useful application of the method, regardless of whose name appears on the framework.

Sources

Want AI doing this for your growth?

We build AI-driven acquisition, content, and automation systems for operators across North America. See your levers in 30 minutes.

Teegan Johnson, Founder & Chief Growth Officer, will follow up by email about your request. Unsubscribe anytime. Privacy

Prefer to talk first? Book a 30-minute call instead.

Explore AI automation services →

Add us as a preferred source on Google

A free Google setting to see more of our relevant articles in your own search experience. You can change it any time.