::
Better Prompting Through Analogy
1 / 8
How to better prompt LLMs

Make the next token
easier to choose

A good prompt
reduces ambiguity
reduces conversion work
and makes the desired operation match the model's learned patterns.

Accurate Clear inputs and success criteria
produce fewer wrong branches.
Fast Less hidden reasoning
means the model reaches the answer sooner.
Fewer Tokens Compact structure
avoids repeated clarification
and repair.
Lower Cost Shorter inference
and fewer retries
cut usage spend.
The practical model

Every unnecessary transform
is a chance to be
slower, longer, or wrong

The following fruit game will make it obvious.
You will sort the same fruits three ways
and compare the cognitive overhead.

1
See the input The model receives tokens
images
code
logs
instructions.
2
Map it It converts the request
into a familiar learned pattern.
3
Choose action It follows constraints
selects tools
or generates an answer.
4
Emit output The requested answer shape
determines how much cleanup is needed.
Attempt 1

Image in
string labels out

The fruit moves toward you.
The boxes show text labels.
Press an arrow key
or click the matching box
before the fruit reaches the boxes.

  • Task: match a fruit image to a word
    then choose the matching side.
  • Hidden cost: image-to-label conversion
    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
or use the keyboard arrows
to sort each fruit.

Attempt 2

Image in
image labels out

The rule is unchanged
but the boxes now show the fruit image
instead of a string label.

  • Task: compare image with image
    then choose the matching side.
  • Expected result: fewer conversions
    faster reactions
    fewer errors.
  • Prompt lesson: align the prompt format
    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
is the box label format.
Click a box
or use the keyboard arrows.

Attempt 3

String labels
with warm-up

This attempt restores word labels.
Before the game starts
you get 30 seconds of examples:
fruit on top
text label below.

  • Task: use examples
    to reduce the cost of unavoidable conversion.
  • Prompt lesson: few-shot examples
    preload the mapping.
  • Compare this run with attempt 1
    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
starts before sorting.

What the game demonstrates

Prompting is like Coding

You are not only writing instructions.
You are designing the path
from input to answer.

Attempt 1

More transforms

The user sees a fruit image
converts it to a word
compares words
then acts.
More mental steps mean slower
and noisier execution.

to
apple
Attempt 2

Direct match

The label format
matches the input format.
The mapping is easier
so the same task consumes less attention.

to
Attempt 3

Few-shot warm-up

When conversion cannot be avoided
examples train the mapping
immediately before the task.

means
lemon
Techniques learned

Three prompting moves
that reduce
errors, latency, tokens, and cost

1

Minimize transforms

Ask in the representation closest to the input and output.
If the model has code, ask for code-shaped changes.
If it has a table, ask for a table-shaped answer.

2

Warm up with examples

When a transform is unavoidable
add a few compact examples.
Examples reduce ambiguity
better than long abstract rules.

3

Use analogies

Analogies describe the operation
instead of only describing the answer.
They let the model reuse
a familiar relation or pattern.

Remember ratio-proportion?

Boy
:
Girl
::
King
:
Queen
Why analogies work

Analogies give LLMs a direction.

In embedding space,
meaning is encoded as position.
A good analogy gives the model
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 + king = queen
Apply it

Build prompts
that make the model do less
of the avoidable work

Toggle the techniques and watch the prompt change.
A longer prompt isn't the goal; The desired output is.


              
Ambiguity and retry risk Low