All chapters
  1. Start hereEverything the model reads is text. Only some of it is an instruction
  2. Foundations · 1From a sentence to a prompt: the parts and what each one is for
  3. Foundations · 2Roles and authority: who is allowed to tell the model what to do
  4. Foundations · 3Prompt composition: how an application builds the prompt
  5. Foundations · 4Prompt patterns: five ways to ask, and when each one earns its cost
  6. Surfaces · 5Tool-aware prompting: the tool description is a prompt too
  7. Surfaces · 6MCP prompts and resources: a template you chose versus content that was fetched
  8. Security · 7Prompt injection: when data starts giving orders
  9. Security · 8Defense in depth: assume one layer fails
  10. Operations · 9Long context and prompt placement: where an instruction sits changes what it does
  11. Operations · 10Versioning and provenance: which prompt produced this answer
  12. Operations · 11Testing prompts: golden cases, injection probes and comparisons
  13. Operations · 12Portability: the same prompt on another model is another prompt
  14. Operations · 13Production operations: rolling a prompt out, and rolling it back
  15. Reference · 14Frameworks and tooling: what each one does with your prompt
  16. Reference · 15Advanced topics: other languages, images, hand-offs and attackers who adapt
  17. Reference · 16The insurance lab: one poisoned roof note, end to end
  18. ReferenceGlossary
  19. AboutAbout this site and its sources
About

About this site and its sources

What this site is, what it is not, where its ideas come from, how the facts were checked, and the sister sites.

This site teaches one subject: the instructions an application sends to a language model, and how they are written, composed, ranked, versioned and defended. It is one guide in a series on AI-native engineering, written by Sam Muthu.

What it is and is not#

It is a progressive guide. It starts from one sentence sent to a model and climbs, one problem per chapter, to roles, templates, tools, MCP, injection, defense in depth, placement, versioning, testing, portability, rollout and the frameworks that help with each. Every chapter uses the same insurance example, and every claim about the example comes from code you can run.

It is not:

The example, honestly described#

The insurance example is an illustrative reconstruction for teaching. It follows the shape of a real project by the author, but the cases, the rules, the fields, the provider, the prompts and every number are invented. Nothing here reports the quality of a real system or model. The roof thresholds are synthetic, not insurance practice. No real insurer, broker, applicant, address or price appears; email addresses use the .example domain. The model recommends; a person decides.

The code in examples/uw-prompts/ is standard-library Python 3. It calls no model, needs no key and opens no network connection. Token counts come from an estimate written for teaching (tokens.py), not a tokenizer. The prompt registry's dates and roles are synthetic. Where a page shows the shape of a provider's API or a library's call without running it, it says "documented shape; not run here".

What is original here and what is not#

Original to this siteFrom the field, with sources below
The framing that ranks text by authority rather than by trust, and keeps the two words apartThe idea of an instruction hierarchy, documented by model providers
The five-version story of uw-recommend, including the 1.3.0 regressionFew-shot prompting, decomposition and chaining, self-checking, as described in provider guides
The three-level frame for attacks: model step, record, underwriterPrompt injection, direct and indirect, as defined by OWASP
The seven-layer table separating layers that ask from layers that enforceLeast privilege, human approval and output validation, listed among OWASP's mitigations
The cases UW-101 to UW-110 and the scripted stand-in's rule tableSpotlighting, the dual-model idea, and separating control flow from data, from research papers
The provider adapter on the portability page (a design, not a library)Lost in the middle, from research on long contexts

The site does not copy prose, examples or figures from any source. Ideas are attributed where they are used and listed below.

How the facts were checked#

Every statement about a named product, protocol, standard or paper comes from its own documentation or abstract, read on 2026-11-17, and is logged with its URL and date in docs/facts/<page>.md in the repository. Where a page did not say something, the site says "the documentation read here does not say" instead of filling the gap from memory. No prices, no rankings, no "best".

Facts that looked surprising (a deprecation, a renamed page, a parameter newly rejected by a model) were marked and fetched a second time by a different agent before publication. Among them: OpenAI's deprecation of reusable prompt objects with a shutdown date of 2026-11-30, the move of Google's Gemini documentation to a new domain, the current MCP specification version 2026-07-28, and several model-specific parameter rules. Vendor documentation changes fast; treat every dated fact on this site as true on the date it was read.

Sources and reading list#

Start here#

Research#

Provider documentation#

SubjectAnthropicOpenAIGoogle Gemini
Messages and roleshttps://platform.claude.com/docs/en/api/messageshttps://developers.openai.com/api/docs/guides/texthttps://aistudio.google.com/docs/text-generation
Toolshttps://platform.claude.com/docs/en/agents-and-tools/tool-use/define-toolshttps://developers.openai.com/api/docs/guides/function-callinghttps://aistudio.google.com/docs/function-calling
Structured outputhttps://platform.claude.com/docs/en/build-with-claude/structured-outputshttps://developers.openai.com/api/docs/guides/structured-outputshttps://aistudio.google.com/docs/structured-output
Caching and countinghttps://platform.claude.com/docs/en/build-with-claude/prompt-caching and https://platform.claude.com/docs/en/build-with-claude/token-countinghttps://developers.openai.com/api/docs/guides/prompt-caching(not read for this site)
Model changeshttps://platform.claude.com/docs/en/models/opus-5-5/migration-guidehttps://developers.openai.com/api/docs/guides/prompting/migrate-from-prompt-objecthttps://aistudio.google.com/docs/models

Libraries and tools#

The complete list, claim by claim, is in the fact logs of the repository.

Sister sites#

Each site in the series owns one subject and links to the others at the seam.

SiteOwns
Context EngineeringThe working set the model can see now: selection, retrieval, budget, compaction
Memory EngineeringDurable information and saved execution state, and the difference
Agent CommunicationMessages between agents; the A2A protocol; A2A versus MCP
Observability EngineeringEvidence of what happened: logs, metrics, traces, audit events, replay
Guardrails EngineeringEnforceable checks around a probabilistic agent
Tools EngineeringCallable capabilities: schema, execution, MCP tools
Structured Output EngineeringTyped contracts: shape, validation, repair, evolution
Agent Orchestration EngineeringThe control plane: what runs next, under which condition
Agent Reliability EngineeringAcceptable outcomes despite failures, retries, load and change
Harness EngineeringThe runtime around a model call
Eval EngineeringMeasurement: graders, golden sets, judges, trials, release gates
Diff to DeployShipping a change with coding agents: hooks, review, lanes, CI
Ask to ReleasePlanning a change before the first meeting
AI EnablementAdoption, role by role
The certification guideA study guide for the Claude Certified Architect exams

Who wrote it#

Written by Sam Muthu. The site is a map to adapt, not a standard. If a fact here is out of date, the fact log names the page it came from and the date it was read; the page itself is the authority.