Prompt Foundations Checkpoint: Rewrite a Bad Prompt
Take a failing prompt from your history and rebuild it using specificity, role, format, example.
What You Will Learn
- Identify a failing prompt from your own history.
- Apply specificity, role, format, and example to rebuild it.
- Document before/after with results.
- Build a personal prompt-quality checklist.
- Reflect on which technique helped most.
Why This Matters
Reading about prompting is passive. Rewriting a prompt you actually struggled with is active practice that cements the techniques. This checkpoint turns theory into habit.
Concept Explained
Take a real prompt from your history that produced bad output. Decompose why it failed (vague? wrong role? no example? wrong format?). Rebuild it using the techniques from BE-15 through BE-21. Document before/after.
How It Works
Find the bad prompt in your Chat history. Identify the failure mode. Apply fixes: add specificity (BE-16), add role (BE-17), add format (BE-18), add example (BE-19), check context (BE-20). Run both prompts and compare outputs.
Step-by-Step Tutorial
1. Find a bad prompt
Open your Chat history. Find a prompt that produced disappointing output.2. Diagnose
Why did it fail? Vague, wrong role, no example, wrong format, wrong context?3. Rebuild
Apply the relevant fix: specificity, role, format, example, or context.4. Compare
Run both prompts. Compare output quality.5. Document
Write a 3-sentence summary: original prompt, fix applied, result improvement.Real-World Example
A developer had a prompt 'fix this bug' that produced generic suggestions. They rewrote: 'Act as a senior engineer (role). The function below throws TypeError when input is null (specificity). Fix it by adding a null check that throws a more descriptive error (constraint). Output the fix as a unified diff (format).' Output went from generic to a clean, applicable diff.
Example Prompts / Commands / Code
BEFORE:
"fix this bug"
→ Generic suggestions, no actionable diff.
AFTER:
"Act as a senior TypeScript engineer. The function below throws
TypeError when input is null. Fix it by adding a null check that
throws a descriptive error. Output the fix as a unified diff.
Example fix pattern:
Before: function f(x) { return x.y; }
After: function f(x) { if (!x) throw new Error('x required'); return x.y; }"
→ Clean, applicable diff with the exact pattern requested.
Common Mistakes
- Picking a prompt that was actually fine — defeats the exercise.
- Applying all techniques at once — confuses which one helped.
- Not running both prompts to compare — speculative improvement isn't data.
Best Practices
- Pick a real prompt you struggled with.
- Apply one technique at a time to isolate impact.
- Run both prompts and compare.
- Document the before/after for future reference.
- Build a personal 'what helped most' ranking.
Troubleshooting
| Problem | How to Fix |
|---|---|
| Can't find a bad prompt | Try 'fix this' or 'add tests' from a week ago — those are usually vague. |
| Improved prompt still bad | The task may need a different model or a different surface (CLI, @workspace). |
Practical Exercise
Your Turn
This IS the exercise. Find, diagnose, rebuild, document. Save the before/after as your first prompt-engineering case study.
Professional Challenge
Build a 5-item personal prompt checklist ('does my prompt have a role? a format? an example? specific types? an example?'). Use it on your next 5 prompts.
Key Takeaways
- Rewriting a real bad prompt cements techniques.
- Diagnose before rebuilding — match the fix to the failure.
- Apply one technique at a time to isolate impact.
- Run both prompts and compare outputs.
- Build a personal prompt checklist from the lessons learned.
Frequently Asked Questions
Should I save these before/afters?
What if my prompt was actually OK?
Further Reading
Official References
Related lessons: BE-15, BE-16, BE-19
SEO Metadata
SEO title: Prompt Foundations Checkpoint: Rewrite a Bad Prompt
Meta description: Take a failing prompt from your history and rebuild it using specificity, role, format, example.
Primary keyword: prompt foundations checkpoint
Secondary keywords: prompt foundations checkpoint: rewrite a bad prompt
Search intent: Informational
URL slug: /prompt-foundations-checkpoint-rewrite-bad-prompt
Categories: AI Tools, GitHub Copilot
Tags: GitHub Copilot, Beginner, Checkpoint, Prompting, IMCSEIAN, Tutorial, IMCSEIAN
Featured image concept: IMCSEIAN lesson card for Prompt Foundations Checkpoint: Rewrite a Bad Prompt
Comments
Comments
Post a Comment