Prompting Notes
Prompting Notes
This page is a compact reminder for everyday prompting. It is meant for practical use: getting cleaner answers, improving code comments, and turning vague requests into structured tasks.
A Simple Prompt Structure
Use four basic parts when the model output is unstable:
- Role: tell the model who it should act as.
- Task: describe the concrete job to finish.
- Constraints: define output format, length, style, or scope.
- Examples: provide one or two examples when the format matters.
Typical Use Cases
- Ask the model to write comments for an existing code block.
- Ask for input, output, and behavior summaries before a function definition.
- Ask for a cleaner rewrite of notes, reports, or README text.
- Ask for a draft implementation first, then refine it in later rounds.
A Better Way To Iterate
- Start with a plain request.
- Add structure if the result is too vague.
- Add constraints if the result is too long or off-topic.
- Add examples if the format is still inconsistent.
- Keep only the useful context instead of pasting everything.
Good Habits
- Be explicit about the expected output.
- Split large tasks into smaller steps.
- Verify code and facts instead of trusting the first answer.
- Avoid sending sensitive keys, credentials, or private data.
Quick Template
| |