Topic 4 of 4 · 3 min read
Turning a good chat into a reusable prompt
Goal: Distil a successful multi-turn chat into a single reusable prompt and verify it reproduces the result in a fresh chat.
When a long chat finally gives you the result you wanted, ask the model to turn that chat into one prompt, then test the prompt in a fresh chat to see if it works on its own.
Check yourself · 1 of 3
After a long chat produces an email you like, what is the best next step to reuse the approach?
Why it matters
Good results often come after many turns. You corrected the tone, added a fact, rejected a first try. The final answer is good, but the path is lost in a long thread. Next week you would have to repeat all of it. A single prompt keeps what you learned and lets you, or a teammate, start in one step.
How to do it
- Finish the chat first. Get the result you want. Do not distil a chat that has not worked yet.
- Ask for the distilled prompt. "Look at this whole conversation. Write one prompt that would have produced this final result in a single turn. Include the context, the rules I corrected you on, and the format I chose. Use [brackets] for the parts that change each time, such as the input text."
- Ask what it left out. "List any instruction from our chat that you did not put in the prompt, and say why."
- Read it as an editor. Check for rules that were only true for that one case, and for the corrections you made along the way. Make sure they are in the prompt.
- Test in a fresh chat. Open a new chat, paste the prompt, fill the brackets with the same input. Compare the result with the one you liked.
- Fix and repeat. If the result is different, find what is missing and add it. Then test again.
Before and after
Weak distillation: Write a friendly email about a late order.
This loses everything you taught the model: the customer name rule, the length, the apology you cut, the discount wording.
Good distillation: Write a reply to the customer email below for Harbour Coffee. Keep it under 120 words and friendly. Apologise once, never promise a delivery day we have not confirmed, and offer the 10% voucher. End with the support phone number. Email: [paste email]
What goes wrong
- The fresh chat gives something different. The distilled prompt dropped a correction, or the long chat had facts you typed early and forgot. Compare both results line by line to find the gap.
- Case-specific facts are baked in. A name or date from one case stays in the prompt. Replace such details with brackets.
- No test. A prompt that looks right but was never run in a clean chat may fail the next time.
- Secrets copied along. Check for names, keys or private data in the chat before you save the prompt or share it.
Examples
Distil and test
After twelve turns you have a good weekly report. You ask: "Write one prompt that would produce this report in one turn. Use [brackets] for the weekly data." Then you open a new chat, paste the prompt and the same data. The report matches, except it lost your rule to put risks first. You add that rule and test again.
Spotting a baked-in fact
The distilled prompt says: "Thank Priya for her feedback on Tuesday's meeting." That was true for one chat only. Replace it with "Thank [name] for their feedback on [meeting]."
Key points
- Distil only a chat that already gave the result you wanted.
- Ask the model for one prompt with placeholders for what changes each time.
- Ask what the model left out, since corrections made mid-chat are easy to lose.
- Test the prompt in a fresh chat with the same input and compare the results.
- Remove private details and one-off facts before you save or share the prompt.
Common mistakes
- Distilling a chat before it has produced a good result.
- Skipping the test in a fresh chat.
- Leaving one-off names and dates inside the reusable prompt.
- Forgetting the corrections you made in the middle of the chat.
Check yourself · 2 of 3
Why test a distilled prompt in a fresh chat?
Check yourself · 3 of 3
A distilled prompt contains the line 'Thank Priya for the Tuesday meeting.' What should you do before you reuse it?
Practice items, not counted towards your mastery.
Start here
- Prompting best practices (Claude docs) (opens in a new tab)DocsFree
Anthropic's guide to being clear and specific, and to asking the model for help with a prompt you are stuck on.
- Prompt optimizer (OpenAI API docs) (opens in a new tab)DocsFree
Shows a real tool that rewrites a prompt for you, and what it changes, so you know what to check.
- Large Language Models Are Human-Level Prompt Engineers (Zhou et al.) (opens in a new tab)PaperFree
Research on models proposing and scoring prompts; the idea that generated prompts must still be tested.
More for this topic
- Prompt engineering guide (OpenAI) (opens in a new tab)DocsFree
OpenAI's guide to writing clear instructions and testing prompts against examples.
- Prompt design strategies (Gemini API) (opens in a new tab)DocsFree
Google's guide with worked examples of instructions, context and output format.