Skip to the content.

What an LLM Is

Fundamentally

An LLM is a statistical pattern matcher trained on massive text corpora. It predicts the next token based on patterns it has seen during training.

The Core Metaphor: Autocomplete + Note-Taker

Really good autocomplete

A note-taker completing your sentence

Practically

A text completion engine

A lossy compression of training data

A pattern recognizer

Context-dependent

Eager to please (if anthropomorphized)

Why This Matters

Understanding it’s a pattern matcher explains:

Understanding it’s eager to please explains:

What This Enables

Emergent capabilities

Composability

Malleability

How to Work With This

Shape the context to make “pleasing” align with “truthful”

Since LLMs want to complete text in helpful-sounding ways, control what “helpful” looks like:

Limit the context strategically

Make honesty the pleasing path

Explicitly request counterarguments

Structure prompts to guide completion

Use format constraints

You Are the Director

The LLM is an actor, you’re the director

Decompose tasks to their atomic parts

Don’t conflate multiple asks into one vague request.

Bad: “Make this test”

Good: Break it down explicitly:

Why this matters:

The pattern: Break down what you actually want before asking. Be the director who knows exactly what scene they’re shooting.

Create Boundaries Between Tasks

Use clean context for each distinct task

The LLM completes based on ALL context in the window. Polluted context = polluted completions.

The problem with long conversations:

The solution: Boundaries

Use subagents for clean context:

Example boundary pattern:

Main conversation (you as director):

Without boundaries: One long conversation where test generation is influenced by architecture discussion, review is influenced by test generation tangents, everything is soup.

With boundaries: Each subagent has laser focus. Architecture agent only sees architecture. Test agent only sees test requirements. Review agent only sees output to review.

Specialized agents for metadata

Have one agent focus on metadata only:

Why this works:

Example:

Bad: “Analyze this project and then create tests”

Good:

  1. Subagent 1: “Map the project structure: inputs, outputs, dependencies” → pure metadata
  2. Subagent 2: Given metadata from #1, “Create tests with these specifications…” → pure implementation

The pattern: Task boundaries = context boundaries. Clean context = clean completions.

The Fresh Conversation Test

The litmus test for good prompts/scripts/commands:

Can you get the same result if you ask the prompt in a fresh conversation?

If YES: Your prompt is well-designed

If NO: Your prompt needs work

Examples:

Bad prompt (relies on history):

"Now create the tests"

Works in conversation because you discussed the project earlier. Fails in fresh context.

Good prompt (self-contained):

"Given this project structure: [explicit structure]
Using these input files: [explicit files]
Following this test pattern: [explicit pattern]
Create unit tests that..."

Works anywhere. No conversation history needed.

The pattern for complex workflows:

If your prompt needs history, break it into stages:

  1. Script 1: Extract metadata (structure, files, dependencies) → save output
  2. Script 2: Given metadata from Script 1, generate implementation

Each script is self-contained. Each can be run in fresh context. Each is reusable.

Why this matters:

The test: Before you save a prompt as a script/command, paste it into a fresh conversation. Does it work? If not, fix it.

The Core Insight

You’re not asking questions of a knowledgeable entity. You’re setting up a completion problem where the best completion is the answer you need.

Good prompting = engineering the context so the most plausible completion is also the most useful one.

You’re the director. The LLM is an eager actor. Give clear direction.