Keyboard Shortcuts N Next post
P Previous post
S Save / unsave
R Read aloud
T Toggle theme
/ Focus search
Esc Close panels
🔥
Ready to read...
beginner Checkpoint GitHub Copilot IMCSEIAN Prompting Tutorial

Prompt Foundations Checkpoint: Rewrite a Bad Prompt

Reviewed & accurate
AI Summary
IMCSEIAN · GitHub Copilot Master Course

Prompt Foundations Checkpoint: Rewrite a Bad Prompt

Take a failing prompt from your history and rebuild it using specificity, role, format, example.

Phase 1 — Beginner Lesson BE-22 Difficulty: Beginner 7 min read
Course: GitHub Copilot Phase 1 — Beginner 7 min read Last verified: 2026-08-30

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/after templateimcseian
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

ProblemHow to Fix
Can't find a bad promptTry 'fix this' or 'add tests' from a week ago — those are usually vague.
Improved prompt still badThe 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

Stretch Goal

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?
Yes — they become a personal prompt library. See IN-06.
What if my prompt was actually OK?
Pick another. The exercise is the practice, not the specific prompt.

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

Test Your Knowledge
How did you find this?

Comments

Join the discussion! Sign in with your Google or Blogger account, or comment as Anonymous - no account needed. For quick questions, also reach me on Telegram @cytestch.

Comments