Acadbyte

Few-Shot Prompting

A paragraph describing the style you want is the lossy version of the request. The precise version contains no adjectives at all.

Beginner12 min5 concepts · 2 questions · 2 cards

Why you need this

Here is the loop. You ask for something in a particular style. The output is close but wrong, so you add an adjective. "More professional." Still wrong, so you add another. "Punchy, but not salesy." Four rounds later you have a paragraph of instructions that reads like a design brief and output that is still not the thing in your head.

The thing in your head is not made of adjectives. It has a sentence length, a punctuation habit, a person, a rhythm. You have been trying to name all of that, and naming it is the slow, lossy way to communicate it.

Examples do not instruct. They demonstrate, and a language model is a pattern-completion engine before it is anything else.

This is not a style preference. Brown et al. showed GPT-3 picking up entirely new tasks from a handful of in-context examples with no weight updates at all, and the benchmark work since (Wei et al. in 2022 and a long line after it) keeps finding the same shape: examples beat instructions alone, and the gap is widest exactly where the format or the voice is hard to put into words.

What a description loses

Take an honest look at "concise and professional". How concise? Whose profession? Does professional mean full sentences or bullet fragments, first person or third, a greeting or straight in?

Two examples settle all six questions without answering any of them out loud. That is the trade you are making every time you reach for another adjective.

Three good ones beat ten

More examples is the obvious next move and it is usually the wrong one. Three high-quality examples that differ from each other in the ways you care about will beat ten near-identical ones every time, because ten similar examples demonstrate one narrow shape ten times over. You are not feeding a training run. You are showing a pattern, and a pattern needs range to be visible.

This one comes after Contextual Zero-Shot Prompting

The track builds on itself, so each topic assumes the one before it. That one is open to you right now, without an account — it’s the one topic a visitor gets, and a free account is what opens the ones after it. Reading here stays open either way.

Next in Prompt Engineering

COSTAR Framework

Six letters, and one of them is the reason your last proposal came back reading like a brochure. Most people fill that line in with the wrong word.

Read the preview