<< Home | Prompting craft
Model adopts specific output format via dialogue patterns
| Area | Prompting craft |
| AI used | Any |
| Source | Reddit thread |
| Posted | 2023-12-09 |
The move
Provide a few-shot example in dialogue form to establish a pattern.Steps
- Identify the desired output format.
- Create a mock dialogue sequence.
- Include an assistant message showing the correct format.
- Place this sequence before the actual task prompt.
Prompt for your AI
Provide a few-shot example in 'dialogue form' where an assistant message shows the correct output format.
What happened
Users struggled to get consistent output formats using only instructions. By prepending a 'preamble' of previous messages or a 'half-shot' assistant message, the model mimics the established dialogue pattern. Commenters confirmed this is more effective than relying on written instructions alone.Who confirmed it
LLMs love following patterns, so this is usually enough to make it use the same format as was used in the messages above.Watch out
None stated.Give it to your agent
Read https://howtheyuse.ai/p/model-adopts-specific-output-format-via-dialogue-patterns.md and help me do this.