Prompt Patterns
/
Afterword
Afterword
https://leanpub.com/prompt-patterns
Previous
Summary
Up next
Patterns List
In this part
Patterns List
Recommended Resources
Books
Courses
Videos
Papers
Websites
Articles
Repositories
Services and Tools
Communities
About the Author
Markua Snippets Collection
Headings and Paragraphs
Chapter One
Chapter Two
Text Formatting
Lists
Definition Lists
Scene Break
Blockquotes
Asides
Blurbs
Images
Inline SVG Image
Code Spans
Code Blocks
External Code Resource
Console Code
Math Inline
Math Block
Tables
Links
Custom Span
Footnotes
Endnotes
IDs
Chapter One
Quizzes
Exercises
Choose Answers
Question Alternates
Directives
Page Break
Attributes
Conditional Inclusion
Chapter One
Buy the Book
Advanced Markua Examples: Code and Images
Inline Code Variations
Basic Code Blocks
Indented Code Block
Tilde Code Block
Console Output
Code With Caption
External Code File Reference
Basic Images
Image With Alt Text
Image With Caption
Image With Caption and Alt
Image Size and Class
Multiple Images
Inline SVG Image
SVG Without Caption
Figure With Code and Image Together
Callout With Code
Warning With Code
Collapsed Example Using Blurb
Math Inside Code
Escaping Backticks
Mixed Content Example
Page Break For Code Section
Conditional Code Example
Formatting Prompt and Response Examples for a ChatGPT Book
Pattern 1: Simple Prompt and Response (Recommended Default)
Prompt
Response
Pattern 2: Prompt and Response Using Asides
Pattern 3: Prompt and Response Using Code Blocks (LLM-Style)
Prompt
Response
Pattern 4: Chat Transcript Style
Pattern 5: Callout Prompt With Plain Response
Response
Pattern 6: Warning Prompt With Critical Response
Response
Pattern 7: Side-by-Side Prompt and Response Using Headings
Prompt
Response
Pattern 8: Multi-Turn Conversation Example
Prompt
Response
Follow-up Prompt
Follow-up Response
Pattern 9: Prompt With Constraints
Prompt
Response
Pattern 10: Minimalist Book-Style Format
Pattern 11: Prompt, Response, and Commentary
Prompt
Response
Commentary
Page Break
Pattern 12: Conditional Rendering for Samples
Prompt
Response
Prompt
Response
Final Notes
Prompt and Response Formatting Patterns (Alignment-Safe)
Example 1: Same Block Type Using Asides Only
Example 2: Same Block Type Using Blurbs Only
Example 3: Explicit Aside Blocks Using {aside}
Example 3A: Explicit Aside Blocks Using {aside}
Example 3B: Explicit Aside Blocks Using {aside}
Example 4: Headings + Blurbs (Recommended for Books)
An Example
Prompt
Discuss
More Information
Response
Notes
ChatGPT Prompt and Response Layout Experiments
Example 1: Faux Chat Alignment Using Labels (Recommended)
Example 2: Same Aside, Visual Separation
Example 3: Same Blurb, Compact Chat Style
Example 4: Simulated Chat Bubbles Using Headings
User
ChatGPT
Example 5: Code-Block Chat Transcript (LLM-Native Look)
Example 6: Single Blockquote Conversation
What You Cannot Do in Markua
Recommendation for a ChatGPT Book
What you can realistically do in Leanpub
What works reliably
What does NOT work
The best pattern for highlighting prompt structure
Full Markdown file with concrete patterns
Highlighting Prompt Structure in a Prompting Patterns Book
Pattern 1: Structured Prompt Inside a Single Aside (Recommended)
Pattern 2: Inline Emphasis Using Labels and Inline Code
Pattern 3: Hybrid, Explained Prompt
Pattern 4: Full Prompt as Code, With Semantic Breakdown Above
Pattern 5: Before and After Prompt Refinement
Pattern 6: Multi-Part Prompt With Visual Separation
Guidance for This Book
Rule You Can Follow Blindly