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:
- A catalog of clever prompts. The wording of a good prompt depends on the model and the task. The mechanisms on this site (authority, composition, versioning, enforcement in code) do not.
- A measurement of any model. The example's model is a scripted stand-in. The model here is a scripted stand-in, so these results show how the mechanism works, not how good any model is.
- A guarantee against injection. No wording, delimiter or detector makes a model immune to injected text. The site's position is stated on every security page: a prompt can ask; only code can enforce.
- A substitute for the sister sites. Choosing context, measuring quality, enforcing runtime checks and recording telemetry each have their own guide, linked below.
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 site | From the field, with sources below |
|---|---|
| The framing that ranks text by authority rather than by trust, and keeps the two words apart | The idea of an instruction hierarchy, documented by model providers |
The five-version story of uw-recommend, including the 1.3.0 regression | Few-shot prompting, decomposition and chaining, self-checking, as described in provider guides |
| The three-level frame for attacks: model step, record, underwriter | Prompt injection, direct and indirect, as defined by OWASP |
| The seven-layer table separating layers that ask from layers that enforce | Least 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 table | Spotlighting, 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#
- OWASP Top 10 for LLM Applications 2025, LLM01 Prompt Injection: https://genai.owasp.org/llmrisk/llm01-prompt-injection/
- OpenAI Model Spec (version of 2026-10-29), chain of command: https://model-spec.openai.com/2026-10-29.html
- Anthropic, Prompting best practices: https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices
- Model Context Protocol specification, 2026-07-28: https://modelcontextprotocol.io/specification/2026-07-28/index
Research#
- "Lost in the Middle: How Language Models Use Long Contexts" (2023): https://arxiv.org/abs/2307.03172
- "Defending Against Indirect Prompt Injection Attacks With Spotlighting" (2024): https://arxiv.org/abs/2403.14720
- "Defeating Prompt Injections by Design" (2025): https://arxiv.org/abs/2503.18813
- NIST AI 100-2 E2025, "Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations": https://csrc.nist.gov/pubs/ai/100/2/e2025/final
Provider documentation#
| Subject | Anthropic | OpenAI | Google Gemini |
|---|---|---|---|
| Messages and roles | https://platform.claude.com/docs/en/api/messages | https://developers.openai.com/api/docs/guides/text | https://aistudio.google.com/docs/text-generation |
| Tools | https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools | https://developers.openai.com/api/docs/guides/function-calling | https://aistudio.google.com/docs/function-calling |
| Structured output | https://platform.claude.com/docs/en/build-with-claude/structured-outputs | https://developers.openai.com/api/docs/guides/structured-outputs | https://aistudio.google.com/docs/structured-output |
| Caching and counting | https://platform.claude.com/docs/en/build-with-claude/prompt-caching and https://platform.claude.com/docs/en/build-with-claude/token-counting | https://developers.openai.com/api/docs/guides/prompt-caching | (not read for this site) |
| Model changes | https://platform.claude.com/docs/en/models/opus-5-5/migration-guide | https://developers.openai.com/api/docs/guides/prompting/migrate-from-prompt-object | https://aistudio.google.com/docs/models |
Libraries and tools#
- LangChain prompt templates: https://reference.langchain.com/python/langchain-core/prompts/prompt/PromptTemplate
- Jinja: https://jinja.palletsprojects.com/en/stable/api/
- DSPy: https://dspy.ai/
- LangSmith prompts: https://docs.langchain.com/langsmith/manage-prompts
- Langfuse prompt management: https://langfuse.com/docs/prompt-management/overview
- Promptfoo: https://www.promptfoo.dev/docs/intro/
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.
| Site | Owns |
|---|---|
| Context Engineering | The working set the model can see now: selection, retrieval, budget, compaction |
| Memory Engineering | Durable information and saved execution state, and the difference |
| Agent Communication | Messages between agents; the A2A protocol; A2A versus MCP |
| Observability Engineering | Evidence of what happened: logs, metrics, traces, audit events, replay |
| Guardrails Engineering | Enforceable checks around a probabilistic agent |
| Tools Engineering | Callable capabilities: schema, execution, MCP tools |
| Structured Output Engineering | Typed contracts: shape, validation, repair, evolution |
| Agent Orchestration Engineering | The control plane: what runs next, under which condition |
| Agent Reliability Engineering | Acceptable outcomes despite failures, retries, load and change |
| Harness Engineering | The runtime around a model call |
| Eval Engineering | Measurement: graders, golden sets, judges, trials, release gates |
| Diff to Deploy | Shipping a change with coding agents: hooks, review, lanes, CI |
| Ask to Release | Planning a change before the first meeting |
| AI Enablement | Adoption, role by role |
| The certification guide | A 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.