Prompt Patterns|

A Pattern Language for Knowledge Engineering with Large Language Models

Prompt Patterns book cover

Prompt Patterns

Get the book on Leanpub

Interpretation Grammar

Defines explicit rules for how terms, operators, and notation are interpreted, replacing the model's inference with declared definitions.

Interpretation Grammar pattern diagram

Problem

The model infers what terms mean, what commands do, and how notation is parsed - producing plausible but inconsistent interpretations that drift across turns.

Solution

Declare explicit definitions for terms, operators, and notation that bind the model's interpretation. Replace inference with definition: precision where there was ambiguity, stability where meaning would drift, compression where verbose prose can be replaced by defined operators.