Prompt Patterns|

A Pattern Language for Knowledge Engineering with Large Language Models

Prompt Patterns book cover

Prompt Patterns

Get the book on Leanpub

Semantic Compression

Compresses context by preserving meaning and constraints while discarding surface wording to fit within token limits.

Semantic Compression pattern diagram

Problem

Human-readable summaries often drop constraints and edge details needed for downstream reasoning under token limits.

Solution

Compress for semantic preservation, not prose readability, retaining decisions, constraints, and dependencies in dense form. This carries functional meaning forward with lower token cost and less silent loss.