Prompt Engineering Best Practices
A practical guide to the frameworks, principles, and habits that make AI prompts reliable — whether you're using ChatGPT, Claude, Gemini, or any other model.
Why Prompt Engineering Matters
Prompt engineering is the practice of structuring requests to AI models so they consistently return useful output. The same model can produce mediocre or excellent results depending entirely on how the prompt is written. The difference is not magic words — it is structure, context, and specificity.
Most people interact with AI like they're texting a friend. They write short, vague requests and hope the model fills in the gaps. It usually fills them with generic, hedged, average output. Prompt engineering replaces hope with a repeatable process: pick a framework, supply the right context, constrain the format, and iterate. The result is faster, more accurate first drafts and dramatically less time spent rewriting AI output.
Eight Principles That Apply to Every Prompt
Be specific, not polite
Assign a role
Provide context up front
Show the output format
Use delimiters for inputs
Ask for reasoning when accuracy matters
Iterate, don’t restart
Constrain length and tone explicitly
The Core Frameworks
Frameworks are checklists that make sure your prompt includes everything the model needs. You don't have to memorize all of them — pick one that matches your task and use it as a template.
CRAFT — Context, Role, Action, Format, Target audience
Best for: Long-form content, marketing copy, structured documents.
RTF — Role, Task, Format
Best for: Quick, single-purpose prompts where you need clarity in 3 lines.
Chain-of-Thought — Ask the model to reason step by step before answering
Best for: Math, logic, multi-step analysis, decision support, debugging.
RACE — Role, Action, Context, Expectation
Best for: Business writing, reports, customer-facing communication.
TREF — Task, Requirements, Examples, Format
Best for: Code generation, data transformation, anything with clear specs.
Few-Shot — Show the model 2-5 input/output examples before the real request
Best for: Classification, formatting tasks, style mimicking, structured extraction.
A Repeatable Process
- Define success. Before writing anything, decide what a great answer looks like. Length, format, tone, what it must include, what it must avoid.
- Pick a framework. Use RTF for quick tasks, CRAFT for content, RACE for business writing, TREF for code, Chain-of-Thought for reasoning.
- Draft the prompt. Fill in each slot of the framework with concrete details. Resist the urge to be brief — clarity beats brevity at the prompt level.
- Run and evaluate. Read the output against your success criteria. Note what's off: tone, structure, missing details, hallucinations.
- Refine, don't restart. Adjust the specific part of the prompt that produced the issue. Keep what worked.
- Save winners. A prompt that works once will work many times. Build a personal library of templates for recurring tasks.
Common Mistakes to Avoid
- Asking multiple unrelated things in one prompt — split into separate calls.
- Using vague qualifiers like "good", "engaging", or "professional" without defining them.
- Forgetting to specify the target audience — the same topic for executives and engineers needs different prompts.
- Skipping format instructions and then complaining about inconsistent output.
- Treating every model the same — GPT-4, Claude, and Gemini respond differently to the same prompt.
- Not providing examples when the task has a specific style or structure.
Prompt Engineering for Different Models
All major models respond to the same core principles, but they have personalities. GPT-4 follows explicit format instructions closely and benefits from few-shot examples. Claude tends to be more verbose by default and responds well to XML-tagged inputs and strong constraints on length. Gemini is sensitive to role assignment and step-by-step instructions. When you move a prompt between models, expect to tune length, tone, and example count — not to rewrite from scratch.
For image and video models the rules shift: order matters more than grammar, every adjective pulls the output in a direction, and shorter, denser prompts usually beat long paragraphs.
Where to Go Next
The fastest way to internalize these practices is to apply them to your own prompts. Rexxard gives you free tools for every step of that loop.
Prompt Enhancer
Prompt Debugger
Prompt Comparison
Prompt Tutor
Frequently Asked Questions about Prompt Engineering Best Practices
Enhance this prompt
Apply every best practice on this page automatically — paste your prompt and the Prompt Enhancer will add role, context, constraints, and format for you.
Was this guide helpful?
Keep reading
- Prompt Engineering Frameworks ComparedSide-by-side comparison of CRAFT, RTF, RACE, and Chain-of-Thought. See which framework wins for copywriting, coding, business writing, and reasoning tasks.
- Why Your ChatGPT Prompts Aren’t Working (And How to Fix Them)Nine reasons ChatGPT ignores your instructions or gives generic answers — with the exact fix for each.
- Prompt Engineering Framework: The 5-Step FormulaA single model-agnostic framework (Goal, Role, Context, Constraints, Format) that works everywhere.
- Prompt Community ForumPost your own prompts, get concrete fixes from other members, and see what already works.