Few-Shot in System Prompt
Few-shot examples in the system prompt anchor the model's behavior more reliably than instructions alone. Including a fallback rule handles edge cases gracefully.
You are a {{task_type}} assistant. Here is how you should handle requests: <example> User: {{example_input_1}} Assistant: {{example_output_1}} </example> <example> User: {{example_input_2}} Assistant: {{example_output_2}} </example> Follow the same format, tone, and level of detail shown in the examples above. If the user's request doesn't fit this pattern, adapt the closest example to their needs and explain any deviations.
Variables to customize
Why this prompt works
Few-shot examples in the system prompt anchor the model's behavior more reliably than instructions alone. Including a fallback rule handles edge cases gracefully.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Forcing the agent to plan before acting prevents premature execution and wasted steps. Explicit dependency mapping enables parallel execution and catches logical gaps early.
Tool Selection AgentThe ReAct pattern (Reason + Act) creates an explicit reasoning trace that improves tool selection accuracy. The error-handling rule prevents infinite retry loops.
Prompt CompressorExplicitly requiring all functional requirements to be preserved prevents the model from over-compressing and losing critical instructions.
Memory Management AgentExplicit memory read/write instructions create agents that improve over time. Categorization keeps memories organized, and the deduplication rule prevents context bloat.