Open to software engineering roles

Search ⌘K Résumé

AI Learning / Foundations / Days 8-13

Prompt Engineering

Learn prompt design as software design: message roles, few-shot examples, persona boundaries, templating, output parsers, and prompt injection defense.

Foundation 8 subtopics 6 daily blocks

Outcome

Design prompts that are versioned, parseable, defensive, and easy to test.

What to learn

  • System vs user vs assistant message design
  • Few-shot examples, role prompting, and persona design
  • Chain-of-thought, ReAct, and reflection patterns
  • XML and Markdown structuring for reliable parsing
  • Prompt templating and variable injection
  • Prompt versioning: treating prompts like code
  • Output parsers and graceful failure handling
  • Prompt injection defense at the prompt layer

Daily study plan

  1. Day 8: Rewrite one messy prompt into system, developer, and user responsibilities.
  2. Day 9: Add few-shot examples and compare output reliability.
  3. Day 10: Structure outputs with XML or Markdown boundaries and parse them.
  4. Day 11: Build a prompt template with typed variables and escaping rules.
  5. Day 12: Add prompt versions and record sample outputs as regression fixtures.
  6. Day 13: Try prompt injection examples and harden the instruction hierarchy.

Practice builds

Prompt version registryPrompt injection test benchJSON parser with repair path

Resources

↑↓ move↵ openesc close