General principles
Be clear and direct
The model responds best when the task, constraints, and desired output are explicit. Tell it what to build, what to prioritize, and what a good answer should look like. Golden rule: Show your prompt to a colleague who has no context on the task. If they would be confused, the model will be too.Add context to improve performance
When you explain why a constraint matters, the model can choose better tradeoffs. Context is especially valuable for formatting, safety, accessibility, and workflow constraints.Use examples effectively
A few well-crafted examples (few-shot or multishot prompting) usually beat abstract style instructions. When adding examples, make them:- Relevant: mirror your actual use case.
- Diverse: cover edge cases and at least one ambiguous input.
- Concrete: show the exact output style, not just the topic.
Use prompt templates
For repeated tasks, turn the prompt into a reusable template with named variables. This makes it easier to test across many inputs, compare versions, and keep behavior stable.Match the output language
When the input mixes languages or you need a specific output language, say so explicitly — for example, “Reply in Chinese even if the source is in English.” Without this, the model tends to follow the dominant input language.Output and formatting
Structure prompts with clear sections
When your prompt mixes instructions, source material, examples, constraints, and output requirements, label each section so the model can tell them apart. Bold headers or labels with a trailing colon work better than running text.Set role, format, and length
Role instructions work best when they define expertise, scope, and decision criteria. Output instructions work best when they specify sections, fields, and length limits that are easy to verify.Long context
Token Plan models support long context windows for both input and output. Long context works best when source material is clearly delimited, indexed, and followed by a specific task.Place the task after the source
For long inputs, write your question or task after the source documents, not before. The model is more likely to keep the task in focus when it is closest to its own response.Index and delimit source material
Tool use
Token Plan models support tool calling. Strong tool-use prompts define when tools should be used, when they should not be, and how tool results should be combined into the final answer.Tool definitions
Define each tool with a clear name, purpose, inputs, return shape, and failure behavior. The model should understand the tool contract before it decides to call the tool.Parallel tool calls
Tell the model to parallelize independent tool calls. Keep calls sequential only when one result determines the next query or action.Avoid overeagerness
In agentic workflows, set clear stopping rules. The model should use tools when they materially improve the answer, not just to appear busy.Thinking and reasoning
Control reasoning depth
Ask for deeper analysis when the task involves planning, debugging, tradeoffs, or long-horizon execution. Ask for a direct answer when the task is extraction, rewriting, or formatting.Reduce hallucinations
For tasks where the model might invent facts — citations, API references, version-specific behavior, customer data — give it explicit permission to refuse and provide reference material it can quote.- Permission to refuse — explicitly tell the model what to say when it does not know.
- Reference grounding — require the model to quote or cite the source it used.
- Boundaries before generation — state the allowed sources, time range, or product version before the task, not after.
Agentic and long-task workflows
For long-running tasks, give the model a small number of active goals at a time. This helps it maintain state, track decisions, and avoid juggling too many partially related tasks in parallel.Single-window state tracking
The model can maintain strong task state inside one long context window. Keep the working plan, current status, and open questions visible in the prompt or project notes.Multi-window workflow
When a task naturally breaks into phases, split it across windows.1
Phased processing
Use the first window to set up the framework, tests, and scripts. Use the next window to iterate through the remaining tasks.
2
Structured testing
Ask the model to create
tests.py or tests.json to track test cases during long iterations.3
Initialization scripts
Create
init.sh to start servers and run tests, avoiding repeated setup in new windows.4
Restart vs compression
Use compression for one continuous task. Start a fresh window for a new task or a major change in direction.
5
Maximize context usage
Ask the model to finish the current part thoroughly before moving on.