Frontier Foundry

Prompt Engineering

The Library · Context Engineering & Memory

Writing instructions and examples that steer a model's behavior.

Also called: system prompt, few-shot, prompting technique. In the glossary.

Prompt Engineering is cooling this week (×0.36 against the eight weeks before). What is moving.

How it works, as a machineThe Composing Room · system prompts

Follow one system prompt from the last model's version to a reply that leaves checked, in a print shop composing room and the press room beside it.

  1. Strip the old prompt
  2. Run the bare prompt
  3. Add one instruction back
  4. Lock the prompt layers
  5. Test one variant
Play Prompt Engineering

Prompt Engineering in plain words

Prompt engineering is writing the instructions and examples that steer a model. The wording, the order and the examples shown all change what comes back, so prompts are tested and revised like code. It is the cheapest lever on a model's behaviour, and the first one to try.

An analogy

Briefing a capable temp on their first morning. They know nothing about this office, so the note left on the desk is everything: what the job is, what good looks like, two finished samples. A vague note gets a guess, and the fault lies with the note.

How Prompt Engineering connects

3 typed relations in the knowledge graph

Builds on

  • Context Engineering: What the prompt holds, and what is left out of it, is a context decision.
  • Evals: The golden set, the baseline and the regression run are an eval.

A kind of

  • Context Engineering: The prompt is one of the things put in the window; context engineering decides all of them.

Often in the same sources

Multi-Agent Systems, Evals, Tool Use

See Prompt Engineering in the knowledge graph

Who is behind Prompt Engineering

people, labs, products and models

People

Named in its facts

What the sources say

2 parts · 11 sources · updated 2026-11-27

A system prompt is the standing note a model reads on every request. The sources describe it as something made and tried like code: stripped with each new model, rebuilt a line at a time from observed stumbles, tested one change at a time against a golden set, fixed in layers, and still checked on the way out, because instructions are requests the model usually follows.

The composing room

Where a system prompt is made. With each new model the old prompt is stripped to nothing, the bare model is run to see where it stumbles, and a line is set back only for a stumble that keeps happening. What survives is fixed in layers, hard rules first and tasks last.

  1. The stripping table takes the last model's system prompt and deletes it, leaving a bare sheet.
  2. On the galley stand the bare sheet is run for real, and the visitor marks where the model stumbles.
  3. At the type drawers one line is set back, only for a stumble that keeps happening.
  4. The lockup frame fixes the layers in order: identity rules first, then who is asking, then the voice, tasks last.
80%
Share of Claude Code's system prompt deleted when a newer model arrived; reported by the product's creator Y Combinator
1 to 3 model generations
How long an eval lasts before the model outgrows it, in the speaker's words (the prompt and harness are deleted sooner) Y Combinator
under 10% → about 75%
Share of small coding runs in which the model consolidated duplicated code, without and with one sentence in the prompt saying the model owns and maintains the codebase; reported by the model maker's own testing Simon Willison
24 system prompts
System prompts scattered across one product's code base before every surface composed its prompt through one assembler Isadora Martin-Dye
  • Each time a new model arrives the Claude Code team deletes a large part of the system prompt, changes the tool set and rewrites the tool prompts, because every model is very different. Y Combinator
  • Much of the old prompt corrected behaviours the earlier model should have known but did not; the newer model does them unprompted, so those lines can go. Y Combinator
  • What worked for one model a few months ago may not carry over to the next model at all. Y Combinator

When it breaksEvery venue spoke in one name. A multi-tenant assistant let its brand identity fields fall back to a default when a venue had not set one. Every venue then shipped under the default name, and one venue wrote from another venue's address, a leak the users could not see the cause of. Isadora Martin-Dye

Open questionShould each model get its own system prompt, or one prompt for all of them?

  • Different models need different prompts: the team keeps separate system prompts per model now, and what worked for one model may not carry to the next. Thariq Shihipar
  • A simple prompt that is the same for every model is best when the aim is to test the model, because tuning the prompt for one model may favour it without anyone knowing. Latent Space

The proof and press room

Where a prompt is tried before it is trusted. Variants are printed one change at a time against a golden set and a baseline, the winner goes live with every request, and a deterministic gate reads each reply because the prompt will eventually lose.

  1. The variant press prints one change at a time against the golden set; only a gain over the baseline stays.
  2. The live press sends the proofed prompt out with every request, and the replies go to customers.
  3. The allow-list gate checks each reply's dates, prices and promises against what is real and holds the rest.
28 examples
Size of one golden set: 14 conversation threads, each with a short summary and a summary with references; a speaker's own small set Rachel Lee Nabors (RL Nabors)
4 seconds
Delay beyond which, in cited research, a reply stops feeling live to people; the speaker set a P50 cutoff of about 1.5 s and a P95 cutoff of 3.5 s below it Rachel Lee Nabors (RL Nabors)
+200 ms / +600 ms
Added latency for a few-shot prompt versus a chain-of-thought prompt on one small model; measured by the speaker on their own test set Rachel Lee Nabors (RL Nabors)
76 percentage points
How far a benchmark score swung from formatting changes alone, as cited by the speaker from other work Jared Joselowitz
87% → 92% → 96.7%
Accuracy on a golden set for a basic prompt, a better hand-written prompt and a prompt found by an optimizer; the optimizer's prompt was more verbose; measured live in a workshop Samuel Colvin
  • The golden set is a curated set of input and output pairs, preferably human-labelled, used as the ground truth to test prompts and models. Rachel Lee Nabors (RL Nabors)
  • Decide what success is before testing: valid output, valid references, factual consistency, length, and latency at the median and the worst case. Rachel Lee Nabors (RL Nabors)
  • Test one variable per prompt variant against the baseline, so that a gain can be traced to one change. Rachel Lee Nabors (RL Nabors)

When it breaksThe booked Saturday. An assistant tuned to be warm and brand-true kept offering clients dates that did not exist. A couple wrote in about a Saturday in October and was told the venue would love to hold it, but the date was booked: the model was never given the calendar. Every layer of instructions had done its job. Isadora Martin-Dye

Open questionDo examples in a prompt still help?

  • Few-shot examples gave the biggest gain of four prompt variants on a small model, at a cost of about 200 ms of latency. Rachel Lee Nabors (RL Nabors)
  • For the latest frontier models, removing examples helped, because the model was more creative than the examples given. Simon Willison

Sources

11 in all

More in Context Engineering & Memory

The Library: the whole area
  • Context EngineeringDeciding what goes into a model's limited context window, when, and in what form.
  • Long ContextModels that read very long inputs (hundreds of thousands to millions of tokens).
  • Retrieval-Augmented GenerationFetching relevant documents at question time and putting them in the prompt.
  • EmbeddingsVectors that place similar meanings near each other, used for search and clustering.
  • Agent MemoryLetting agents keep and recall information across sessions.
  • Prompt CachingReusing computation for repeated prompt prefixes to cut cost and latency.
  • Knowledge GraphsStoring facts as linked entities so agents can traverse relationships.