Skip to catalogue

32

few-shot

Show two or three worked examples in the prompt. The model copies the shape, not your adjectives.

What is few-shot?

Few-shot prompting is teaching by examples: input → output pairs in the prompt. Zero-shot is an instruction with no sample. One sloppy sample beats a paragraph of “write it cleanly.”

Why does few-shot matter when vibe coding?

“Write tests like we do” is empty. Paste two existing tests. The model matches the fixture, the name, the assertion style. Examples are a spec the model can imitate.

How do you do few-shot?

When asking for a new function or test, paste two nearby examples from the repo. Say “match this shape.” Do not describe the house style in prose.

How do you ask a model for few-shot?

Match these two examples. Same naming, same assertion style, same file layout. Then do (the new case).

What goes wrong with few-shot?

Examples that disagree with each other. The model averages them into a third dialect.

adjacent