Prompt Patterns|

A Pattern Language for Knowledge Engineering with Large Language Models

Prompt Patterns book cover

Prompt Patterns

Get the book on Leanpub

Context Loading

Supplies external information, state, constraints, and references the model lacks but must rely on to complete the task correctly.

Context Loading pattern diagram

Problem

The model cannot access private state, current facts, or internal policy unless provided at runtime, so it defaults to generic advice or hallucinated specifics.

Solution

Load required facts, constraints, and authoritative excerpts into context before asking for output (manually or via retrieval). This replaces guesswork with grounded evidence the model can condition on directly.