Why prompt engineering matters
A prompt is any input or set of instructions you give a generative model to get an output. Good prompts raise quality, reduce rework, surface model limits, and protect against accidental misuse.
The 4 building blocks (prompt skeleton)
- Instruction: What you want (task + constraints).
- Context: Background, audience, tone, domain specifics.
- Input data: The source text, table, image, or example set.
- Output indicators: Desired format, length, structure, and acceptance criteria.
Template
Role/Style: …
Task: …
Context: …
Input:…
Output format: bullets / JSON / steps / code block
Quality bar: success criteria, edge cases, references
Core techniques (text → text)
- Task specification: State the exact deliverable and quality bar.
- Context guidance & domain expertise: Provide audience, tone, and domain hints.
- Bias mitigation & framing: Ask for balanced viewpoints and source-driven claims.
- Zero-shot / Few-shot: No examples when general is fine; add 2–4 targeted examples for precision.
- User feedback loop: “Assess and improve” cycles (self-critique against your criteria).
- Interview pattern: Treat it like a live Q&A: probe, narrow, confirm, then finalize.
Interview pattern mini-flow
- “List unknowns and assumptions.”
- “Ask up to 5 clarifying questions.”
- “Propose a draft outline.”
- “Deliver v1, then self-review against the acceptance criteria.”
Reasoning scaffolds
- Step-by-step thinking: Ask for structured steps and intermediate checks (e.g., “show the steps you’d take and the final answer”).
- Tree-of-thought exploration: Request multiple solution branches with brief pros/cons; then choose a path and refine.
Snippet
“Generate 3 approaches. For each: steps, risks, and when to use it. Then pick the best for my constraints and produce the final solution.”
Multimodal prompting
Blend text + images (and audio when available) to clarify ambiguity. Example: include a UI screenshot + “extract usability issues,” or a product photo + “bullet a spec sheet.”
Image-prompting boosters (text → image)
- Style modifiers: cinematic, isometric, editorial, watercolor…
- Quality boosters: high detail, global illumination, shallow depth of field…
- Repetition & structure: reinforce focal subjects and composition.
- Weighted terms: subject:1.3, background:0.8 to prioritize elements.
- Fix deformations: specify anatomy, symmetry, and camera lens (e.g., “35mm, natural hands, five fingers visible”).
Playoff method (A/B/C prompts)
Generate multiple prompt-response pairs, score them against clarity, precision, relevance, faithfulness, and choose the winner. Keep the winner as your canonical template.
Hands-on takeaways you can reuse
- Naive → Persona → Interview progression to quickly lift quality.
- Chain-of-thought-style steps for complex tasks; tree-of-thought when exploring options.
- Multimodal prompts to remove ambiguity.
- Image prompts with clear subjects, camera/lens, style, and weights.
Quick checklist (print-worthy)
Copy-paste prompt starters
General task
You are a {role}. Task: {what to
do}.
Context: {audience, domain}. Input
: ```{data}```
Output: {format + length}. Quality: meet {criteria}; cite
assumptions; highlight gaps.
Interview pattern
List unknowns, ask up to 5 clarifying questions, then propose an outline
.After I
confirm, deliver v1. Finally, self-critique v1 against my acceptance criteria and improve it.
Tree-of-thought
Produce 3 solution branches (A/B/C) with steps, risks, and
selection rationale.Pick the best branch for {constraints} and deliver the final
result.
Image prompt
Subject: {primary subject}; Environment: {setting}; Composition: {framing};
Style: {art/style}; Camera: {lens/focal length};Quality: high detail, realistic lighting; Weights: {term:1.2, term:0.8
};Avoid: {artifacts to
avoid}.