← Back to list

Your LLM Is Doing Magic. Here Is How The Tricks Work.

Trick 1: The End of Your Message Is a Loudspeaker

Dr Swarneendu AI in Level Up Coding · 2026-06-05 14:06 · 185 claps · 3.7 min read paywalled
#llm #chatgpt #claude #ai #tricks
Open on Medium ↗
Wiki topics: LLM · Large Language Models AI · AI · General

Your LLM Is Doing Magic. Here Is How The Tricks Work.

Trick 1: The End of Your Message Is a Loudspeaker

The model reads your entire message. Then it starts writing. One token at a time. Never looking back.

Here is what that means.

“Keep it under 300 words. Write me a blog post about coffee.”

vs.

“Write me a blog post about coffee. Keep it under 300 words.”

Same words. Different results. The second one works better.

Why? The model starts generating immediately after it finishes reading. The last thing in your message is the freshest thing in its working memory when the first word of its response appears.

Put your real constraint at the bottom. The model is not reading a memo. It is falling forward into your text.

Trick 2: “Think Step By Step” Is Not A Magic Spell. It Is Something Weirder.

Everyone says “add chain of thought.” Nobody explains why it works.

Here is why.

The model predicts one token at a time. Each token it generates becomes input for the next prediction. When you ask it to reason out loud, it is not performing for you. It is building itself a scaffold to stand on.

The intermediate tokens are its working memory.

Ask it to add 17 + 28 + 43 + 56 + 71 and it will probably get it right. Ask it to add those five numbers and show its work and it will definitely get it right — because it has to generate the partial sums before it generates the total.

The proof: take any maths problem your model gets wrong. Ask for the same answer, but request working. Watch it get it right.

You are not asking it to slow down. You are giving it more context to predict from.

Trick 3: Confident Wrong and Hedged Right Are Equally Possible

The model has no external checker. No lookup. No alarm bell when it fabricates.

What it has is a statistical sense for when answers tend to be uncertain. If the training data showed lots of hedging around a topic, it hedges. If the training data was full of confident claims about a topic, it sounds confident.

The confidence is a stylistic decision, not an epistemic one.

Here is the test. Take any answer the model gives confidently. Ask it: “Now argue the opposite.” If it immediately produces a compelling counterargument, the original confidence was a costume.

This is not a flaw. It is exactly what a next-token predictor should do. A confident-sounding completion was statistically correct. It just was not true.

Trick 4: The Middle of a Long Document Is a Blind Spot

This one has a name in the research literature: the lost-in-the-middle problem.

Attention is not uniform. The model pays more attention to the beginning and end of its context than the middle.

The proof is embarrassingly simple. Take a long document. Hide the answer to your question in the first paragraph, then ask. Hide it in the last paragraph, then ask. Hide it deep in the middle, then ask.

The middle answer will be worse. Reliably. Measurably.

So if you are pasting a 50-page report and asking about one section — put that section at the top, right before your question. Or paste it at the very end. The middle is where information goes to be misread.

Trick 5: You Are Not Asking A Question. You Are Setting A Scene.

This is the whole thing. Everything else follows from this.

A language model was trained to complete text. Not answer questions. Complete text.

When you type, you are starting a document. The model is finishing it. The shape of the document you start determines the shape of the document it finishes.

“Why is X bad?” starts a document that sounds like a critique.

“What are the arguments for and against X?” starts a document that sounds like analysis.

“You are the world’s leading expert on X. A curious student asks you to explain it from first principles. You say:” starts something else entirely.

Same topic. Completely different outputs. Because the scene is different.

The model is not reading your intent. It is reading your text. The text is the only lever you have. It is also a very powerful one.

Trick 6: Showing It A Bad Example Teaches It The Bad Example

Want the model to avoid something? Do not show it what to avoid.

“Here is a bad example, please do not write like this: [bad example]”

The bad example is now in context. The model has just read it. It is now a template the model is completing away from — but completing near.

The cleaner move: describe only what you want. Positive examples only. The model reaches toward what it has seen. Make sure what it has seen is what you want.

This is not intuitive. It feels like teaching by contrast. But the model does not experience contrast the way you do. It experiences proximity.

Trick 7: Write To It The Way You Want It To Write Back

The model mirrors your register. Not out of politeness. Out of mathematics.

Your message is the opening of the document. The model is completing it. The style of what it generates is conditioned on the style of what came before.

Terse message → terse reply. Warm, rambling message → warm, rambling reply. Sloppy spelling and grammar → sloppier output.

The proof: write the same question twice. Once casually, once carefully. Compare the responses. Not the content — the texture, the precision, the sentence length.

You are the first author. It is the co-author. Co-authors match the house style.

A language model is a machine for completing text. It does this so well that it looks like understanding, reasoning, and knowledge. Sometimes it is all three. The magic is real. The trick is knowing which kind of magic you are watching.


메타데이터
post_id
9f7db60e4d62
slug
your-llm-is-doing-magic-here-is-how-the-tricks-work-9f7db60e4d62
url
https://levelup.gitconnected.com/your-llm-is-doing-magic-here-is-how-the-tricks-work-9f7db60e4d62
canonical_url
https://levelup.gitconnected.com/your-llm-is-doing-magic-here-is-how-the-tricks-work-9f7db60e4d62
author_url
https://medium.com/@swarnenduiitb2020i
status
ok
fetched_at
2026-07-15 02:09:20