🧱 Prompt Structure & Formatting
Use specific delimiters:
Use Markdown headings, XML tags, or backticks to define structure.
Note: JSON performs poorly for document collections.
Format your prompt with clear sections:
1. Role and Objective
2. Instructions (with subcategories)
3. Reasoning Steps
4. Output Format
5. Examples
6. Final Instructions
🧩 Reasoning & Planning
Induce planning with prompting:
Use phrases like “think step by step” for complex tasks to improve
accuracy.
Remember it’s not a reasoning model:
GPT-4.1 does not automatically chain thoughts unless prompted. Ask it
to “show its work.”
Design agentic workflows with clear reminders:
o “Keep going until the problem is completely resolved.”
o “Use tools when uncertain instead of guessing.”
o “Plan extensively before each action.”
📚 Context Management
Leverage the 1M token context wisely:
Performance is strong up to the limit but may degrade when reasoning
across large contexts.
Guide information retrieval:
Ask the model to first identify relevant documents before
answering.
Balance internal vs. external knowledge:
o Use: “Only use provided context.”
o Or: “Use context with basic knowledge.”
⚠️Pitfalls to Avoid
Avoid rare prompt patterns:
Extremely repetitive outputs or complex parallel tool use can cause
issues.
Test edge cases carefully.
💻 Code-Specific Prompting
Use specific frameworks for coding tasks:
For generating code changes, use the V4A diff format with context
lines to boost accuracy.
The user can see all edited code in real time, do not take any easy routes to
temporarily resolve the user complaint(s).
Find the *actual* issues causing the specific root problem(s) and resolve
them correctly.