CertBrain
Sign in
← Back to decks
Sign in to save your progress.Sign in

Writing System and User Prompts

A model can only follow the instructions it is given, so the wording of your prompts decides how useful its replies are. This lesson covers writing system and user prompts, adding examples, and testing your wording before an app depends on it.

10 cards

Writing System and User Prompts

In this lesson · 6 sections
Step 3 of 6

Examples instead of rules

Some behavior is hard to describe and easy to show. Including sample input and output pairs in a prompt is called few-shot prompting (one-shot for a single pair, zero-shot for none). In a chat request, the pairs go into the message list as invented user and assistant turns placed after the system message. The model is not retrained by them: they steer only the request that carries them, so they must be sent every time. Choose examples that cover awkward cases, not just easy ones, and make each sample reply look exactly like the reply you want. To sort expense claims into your company's own category names, three sample claims with the names you would assign teach the scheme faster than a paragraph describing it.