A practical guide to crafting system-prompts for LLM collaboration.

Overview

This tutorial develops fluency in writing system-prompts—the hidden preambles that shape LLM behavior before conversation begins. We move from foundational concepts through practical craft to advanced techniques.

The approach is grounded in a statistical-physics perspective: system-prompts as potential landscapes that bias token generation toward desired behaviors. But you don’t need physics to benefit. The principles translate into concrete practices that work.

The Tutorial

ChapterTitleFocus
01Why System-Prompts MatterMotivation: from generic assistant to shaped collaborator
02The Mechanics: Messages and RolesFoundation: how prompts enter the conversation via JSON API
03An Interpretive Lens: Prompts as Potential LandscapesTheory: a statistical-physics framework for understanding prompt effects
04Crafting Your System-PromptPractice: principles and worked examples for simple prompts
05When Prompts Fail: A Diagnostic GuideDiagnosis: six failure modes and their remedies
06The Practice: Iterative RefinementProcess: the experimental loop of test, observe, revise
07Scaling Up: Complex System-PromptsAdvanced: architecture and tradeoffs for sophisticated prompts
08Skills: Portable Knowledge for AgentsComparative: how gptel-agent and Claude Code implement on-demand skills
09The Workspace: Where System-Prompts Come AliveTooling: Emacs as a shared workspace for LLM collaboration

Reading Paths

The Quick Path

If you want to start writing prompts immediately:

  1. 01-why — understand the stakes
  2. 04-craft — learn the principles
  3. 05-failures — know the pitfalls

The Complete Path

For a thorough understanding, read sequentially from 01-why through 09-emacs-llm. Each chapter builds on the previous.

The Practitioner’s Path

If you’re ready to build a complex prompt for a real collaboration:

  1. Skim 07-scaling to understand the architecture
  2. Study the System-Prompt Engineering framework
  3. Test and refine using 06-iterate as your guide

The Tooling Path

If you want to set up the workspace where system-prompt craft happens:

  1. 08-skills — understand how prompts become deployable skills
  2. 09-emacs-llm — build the Emacs workspace where it all converges