chapter six

6 Prompt Types

 

This chapter covers

  • Understanding how chat models process structured conversations with distinct message types
  • Recognizing the three message types: system, user, and assistant
  • Designing system prompts that define what the AI does across interactions
  • Crafting user prompts that provide queries or context data for processing
  • Applying a decision framework to decompose prompts into system and user components
  • Determining when architectural separation provides value versus when to use simple prompts

You have built a prompt that works well. It contains instructions, role, output format, and communication style in one block, followed by the data to process. When the data changes, you copy the whole prompt and replace the final section.

This is a monolithic prompt. It mixes two concerns that should be separate: stable behavioral instructions and variable input data. Chat models let you split these into system prompts and user prompts. Instructions configure behavior; user messages carry changing input.

This chapter shows how to decompose monolithic prompts into maintainable, scalable components. Starting with this chapter, practical examples use the https://platform.openai.com/playground rather than ChatGPT because it exposes system, user, and assistant message fields directly. That visibility makes prompt-type architecture clear.

6.1 Chat Model Architecture

6.1.1 Three Message Types

6.1.2 What You Design: System and User Prompts

6.2 System Prompts

6.2.1 Purpose and Principles

6.2.2 Quick Reference: Mapping Chapter 2 Elements to Chat Prompts

6.2.3 Practical Example: Linear Issue Assistant

6.3 User Prompts

6.3.1 Types and Templates

6.3.2 Practical Example: Harvest Daily Report Assistant

6.4 Prompt Decomposition Framework

6.4.1 The Core Question

6.4.2 Worked Example: Decomposing Step-by-Step

6.4.3 Quick Decisions

6.4.4 When to Use Architectural Separation

6.4.5 Common Mistakes

6.4.6 Hands-On Practice

6.5 Summary