Better Prompting LLMs Through Analogy
How to better prompt LLMs
Make the next token<br>easier to choose
A good prompt<br>reduces ambiguity<br>reduces conversion work<br>and makes the desired operation match the model's learned patterns.
Accurate<br>Clear inputs and success criteria<br>produce fewer wrong branches.
Fast<br>Less hidden reasoning<br>means the model reaches the answer sooner.
Fewer Tokens<br>Compact structure<br>avoids repeated clarification<br>and repair.
Lower Cost<br>Shorter inference<br>and fewer retries<br>cut usage spend.
The practical model
Every unnecessary transform<br>is a chance to be<br>slower, longer, or wrong
The following fruit game will make it obvious.<br>You will sort the same fruits three ways<br>and compare the cognitive overhead.
See the input<br>The model receives tokens<br>images<br>code<br>logs<br>instructions.
Map it<br>It converts the request<br>into a familiar learned pattern.
Choose action<br>It follows constraints<br>selects tools<br>or generates an answer.
Emit output<br>The requested answer shape<br>determines how much cleanup is needed.
Attempt 1
Image in<br>string labels out
The fruit moves toward you.<br>The boxes show text labels.<br>Press an arrow key<br>or click the matching box<br>before the fruit reaches the boxes.
Task: match a fruit image to a word<br>then choose the matching side.
Hidden cost: image-to-label conversion<br>happens on every fruit.
Run length: 20 fruits.
Fruit0 / 20
Correct0
Avg All0.00s
Avg Correct0.00s
left
right
Sort 20 fruits
Click a box<br>or use the keyboard arrows<br>to sort each fruit.
Start attempt 1
Attempt complete
Run again<br>Next attempt
Attempt 2
Image in<br>image labels out
The rule is unchanged<br>but the boxes now show the fruit image<br>instead of a string label.
Task: compare image with image<br>then choose the matching side.
Expected result: fewer conversions<br>faster reactions<br>fewer errors.
Prompt lesson: align the prompt format<br>with the data the model already has.
Fruit0 / 20
Correct0
Avg All0.00s
Avg Correct0.00s
left
right
Sort with visual labels
The only change<br>is the box label format.<br>Click a box<br>or use the keyboard arrows.
Start attempt 2
Attempt complete
Run again<br>Next attempt
Attempt 3
String labels<br>with warm-up
This attempt restores word labels.<br>Before the game starts<br>you get 30 seconds of examples:<br>fruit on top<br>text label below.
Task: use examples<br>to reduce the cost of unavoidable conversion.
Prompt lesson: few-shot examples<br>preload the mapping.
Compare this run with attempt 1<br>to feel the warm-up effect.
Fruit0 / 20
Correct0
Avg All0.00s
Avg Correct0.00s
left
right
Warm up first
A 30-second label-to-image pre-training screen<br>starts before sorting.
Begin 30s warm-up
Pre-training 30.0s
Warm-up complete
Play starts<br>when you choose to begin.<br>Click a box<br>or use the keyboard arrows.
Start play<br>Repeat warm-up
Attempt complete
Warm up and rerun<br>See techniques
What the game demonstrates
Prompting is like Coding
You are not only writing instructions.<br>You are designing the path<br>from input to answer.
Attempt 1
More transforms
The user sees a fruit image<br>converts it to a word<br>compares words<br>then acts.<br>More mental steps mean slower<br>and noisier execution.
to<br>apple
Attempt 2
Direct match
The label format<br>matches the input format.<br>The mapping is easier<br>so the same task consumes less attention.
to
Attempt 3
Few-shot warm-up
When conversion cannot be avoided<br>examples train the mapping<br>immediately before the task.
means<br>lemon
Techniques learned
Three prompting moves<br>that reduce<br>errors, latency, tokens, and cost
Minimize transforms
Ask in the representation closest to the input and output.<br>If the model has code, ask for code-shaped changes.<br>If it has a table, ask for a table-shaped answer.
Warm up with examples
When a transform is unavoidable<br>add a few compact examples.<br>Examples reduce ambiguity<br>better than long abstract rules.
Use analogies
Analogies describe the operation<br>instead of only describing the answer.<br>They let the model reuse<br>a familiar relation or pattern.
Remember ratio-proportion?
Boy
Girl
::<br>King
Queen
Why analogies work
Analogies give LLMs a direction.
In embedding space,<br>meaning is encoded as position.<br>A good analogy gives the model<br>a transformation to reuse.
Relationship: read the direction from boy to girl .
Apply: shift that same direction onto king .
Result: the shifted direction lands at queen .
boy
girl
king
queen
vector: boy -> girl
position: king
same vector, moved
boy -> girl<br>+ king<br>= queen
Apply it
Build prompts<br>that make the model do less<br>of the avoidable work
Toggle the techniques and watch the prompt change.<br>A longer prompt isn't the goal; The desired output is.
Patch review<br>Boot log triage<br>Field repair note<br>Weekly risk brief<br>Custom prompt
Minimize transforms Preserve source shape, names, and units.
Constraints Set scope, assumptions, and stop rules.
Output format Specify sections, order, and brevity.
Warm-up examples Show one compact mapping for unusual work.
Analogy Frame the relation only when it...