1:1 mentoring with Big Tech AI engineers
LLM & Agentic

Prompt Engineering Foundations

Where an instruction belongs — tool description, system prompt, or user turn — why emphasis that worked on older models now causes over-triggering, and the prompt patterns that have expired.

Last updated

Foundations8 min readFirst readInside a Tool Call

After this section you can

  • Place an instruction in the tool description, system prompt or user turn, and say what breaks when it is misplaced
  • Rewrite an emphatic, older-model prompt into plain context with reasons, structured with XML tags
  • Recognise the prompt patterns that expired and name the API feature that replaced each
06

Prompt Engineering Foundations

Most prompt problems are placement problems. Where an instruction lives decides whether it is followed, cached or quietly ignored, and current models follow instructions closely enough that prompts written to push older ones now overshoot.

Key idea

Put each instruction where its lifetime matches: tool descriptions for when to call a tool, the system prompt for standing rules, the user turn for this request. Then write it once, plainly, with the reason.

An instruction’s home is decided by how often it changes, not by how important it is
RENDER ORDER, EVERY REQUEST 1 · Tool descriptions when to call each tool, what it returns changes almost never 2 · System prompt role, audience, standing rules, output contract stable for the whole conversation 3 · Messages this turn’s task, data, retrieved context changes every request cache breakpoint CACHED PREFIX · READ AT A FRACTION OF THE PRICE PROCESSED FRESH Put a user’s name or today’s date in the system prompt and every user gets a private, uncached copy of it.

Related

More in LLM & Agentic

Get full access to all 74+ sections with code examples, diagrams, and interactive animations.

Unlock Premium