Prompt Patterns|

A Pattern Language for Knowledge Engineering with Large Language Models

Prompt Patterns book cover

Prompt Patterns

Get the book on Leanpub

Specification Extraction

Extracts the implicit specification from a finished artifact, working backward from output to the rules that produced it.

Specification Extraction pattern diagram

Problem

Effective writing follows conventions that are subtle and implicit. Extracting these conventions manually is time-consuming and unreliable. When asked to describe what makes their work effective, authors tend to offer high-level generalities that miss the structural and tonal conventions that actually drive quality.

Solution

Provide the model with an exemplar of excellent work and ask it to extract the specification. The model extracts multiple convention dimensions from a single exemplar. The specification can then be reviewed, refined, embedded in a system prompt, or shared as a style guide.