Learning outcomes

  • Structure task instructions
  • Use examples deliberately
  • Remove ambiguous constraints

Mental model

A prompt is an executable specification for a probabilistic component: goal, context, constraints, examples, and an observable output contract.

Goal
Relevant context
Constraints
Examples
Output contract
Evaluation

Theory

Strong prompts make the task and success conditions concrete, separate instructions from data, provide only useful examples, state how uncertainty should be handled, and request an output the application can validate. Prompt quality is evaluated on a case set; wording changes are code changes with possible regressions.

Alternatives and trade-offs

Prompting is best for instruction and presentation changes. Retrieval supplies external knowledge, tools provide actions or deterministic computation, and fine-tuning targets stable learned behavior.

Failure modes and misconceptions

Longer is not automatically clearer, role-play does not grant capability, hidden reasoning is not a reliable audit trail, and an example set can bias unexpected cases.

Knowledge check

Reflect before revealing the guide

Which parts of a prompt make its success measurable?

Decision scenario

Rewrite a vague summarization request as an audience, evidence, length, uncertainty, and citation contract, then test it against representative documents.

Relationships

Primary sources