AI Expert

Guides/Prompt & policy design

Prompt & policy design for products

Users do not experience “the model” — they experience stacked instructions, injected context, and validated outputs. Product teams win when precedence is explicit and downstream parsers match what marketing demos imply.

Instruction precedence

Align with legal and safety partners on what belongs in immutable policy versus editable product copy — this diagram is a collaboration aide, not legal advice.

Layers from immutable policy through user message to validated outputPrompt stack (outer wins on conflict)Platform policy & safety classifiersNon-negotiables — injection resistance, blocked intentsDeveloper / product system instructionsTone, tools allowed, cite-when-unsure rulesRetrieved & injected context (RAG, memory snippets)Label sources — avoid blending with user-authored instructionsEnd-user message & attachmentsHighest manipulation risk — policy layers above must holdParser / schema validator
Ship explicit precedence: when UX adds “modes,” encode them as separate system branches — not buried edits users can mimic.

Output contracts

Output postureTypical fitProduct tradeoff
Free-form proseExploration, creative drafts, low structured downstream useCheap to prompt-test — expensive to parse reliably in apps
JSON / schema modeUI rendering, tools, billing codes, strict pipelinesRepair loops & validation UX — budget retries in latency
Few-shot exemplarsNiche formats legal/clinical teams insist on seeingToken bloat; staleness when examples drift from prod data
Hard refusal templatesRegulated domains; zero tolerance for invented factsSupport load — pair with escalation paths, not silent fails

Rigidity vs reliability

Constraint vs downstream reliability (schematic)

Tighter contracts reduce silent breakage in code paths — at the cost of prompt churn and user-visible repair.

Pick the weakest contract that still satisfies your parsers — over-constraining early burns teams before product-market fit.