Prompting Principles
# Prompting Principles
## 1. Be Specific
- State the task directly.
- Include the desired output format.
- Put the instruction first when it helps.
- Add separators such as `###` or clear labels when the prompt has multiple parts.
## 2. Give Useful Context
- Provide the minimum context needed for the task.
- Include source text, schema, or examples when they improve reliability.
- Keep irrelevant details out.
## 3. Use Examples
- Few-shot prompting helps the model learn task format and label style.
- Examples are especially useful for classification, extraction, and structured outputs.
- Balanced example sets reduce bias.
## 4. Break Problems Down
- Ask for step-by-step reasoning on harder tasks.
- Chain-of-thought style prompting helps with arithmetic, symbolic, and commonsense reasoning.
- Zero-shot CoT can work with simple phrases like “Let’s think step by step.”
## 5. Control Output
- Ask for concise answers when accuracy matters.
- Ask for a specific format when you need machine-readable output.
- Encourage `I don't know` or `Unsure about answer` when the model should abstain.
## 6. Improve Reliability
- Ground the model with context or truth data when factual accuracy matters.
- Use balanced exemplars and randomize their order.
- Reduce sampling randomness when the task is factual or deterministic.
## 7. Treat Security as a Prompting Problem
- Prompt injection can override instructions if inputs are not isolated.
- Separate instructions from user content.
- Quote or parameterize untrusted input when possible.
- Consider adversarial prompt detection for risky workflows.
## 8. Use Reasoning Patterns
- ReAct combines reasoning with actions and tool use.
- PAL uses programs as intermediate reasoning steps.
- Generated-knowledge prompting asks the model to produce supporting facts before answering.
## 9. Iterate
- Prompt design is experimental.
- Start simple, then add structure only where it improves results.
- Version prompts and compare outputs.
## 10. Prompt Checklist
- What is the task?
- What should the output look like?
- What context is required?
- Are examples needed?
- Is step-by-step reasoning helpful?
- Should the model abstain when uncertain?when to use it
Community prompt sourced from the open-source GitHub repo e-candeloro/open_teacher (no explicit license). A "Prompting Principles" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
e-candeloro/open_teacher · no explicit license
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar