Prompt Engineering

Prompt engineering is the practice of writing clear, structured instructions so the model gives reliable output.

Prompt structure

  1. Role: Tell model who it should act like.
  2. Task: Define the exact job.
  3. Context: Add background or constraints.
  4. Output format: Specify bullets/table/JSON.
  5. Quality bar: Mention tone, length, and checks.

Example: weak vs strong prompt

Weak: "Explain databases."
Strong: "Explain SQL vs NoSQL for beginners in 6 bullets, include 1 example, and end with a decision table."

Useful techniques