Add new chapter
Prompt Engineering
Turn “being good at asking questions” into a reusable methodology: fewer tokens, more stable quality, stronger verifiability.
Minimal reusable Prompt structure
Three elements of a task
- Goal (what you want)
- Context (what is there)
- Constraints (what it cannot do)
Structured output
- Specify the output format (JSON/table/list)
- Specify boundaries (length/fields/examples)
- Start with the outline, then expand
Verifiability
- Request a test plan
- List assumptions and risks
- Requires a minimal reproduction/rollback plan
Practical template (copy directly)
You can use the following as a "general work instruction" and just change the task content each time.
You need to complete an engineering task. Please output in order: 1) Restate the goal (1-2 sentences) 2) The minimum context list you need (files/interfaces/constraints) 3) Your implementation plan (step by step, actionable) 4) Risks and rollback plan 5) Test plan (at least 3 items) Constraints: - Do not invent files/interfaces that do not exist - Mark uncertain points with [needs confirmation]