FundamentalsImportant

Best Practices

Tips & tricks

Clarity and Precision

Write prompts that cannot be interpreted ambiguously. Avoid pronouns without clear references, ambiguous terms, and overly general formulations. If a prompt can be understood differently, the model will choose a random interpretation.

Efficiency

Balance between detail and brevity. Too long prompts waste tokens and may confuse the model. Too short ones don't provide enough information. Include only what's actually needed for the task.

Reliability

A good prompt gives consistent results on repeated queries. Use examples (few-shot), clear instructions, and constraints to minimize output variability. Test on different inputs.

Verifiability

Request explanations and sources. Ask the model to show reasoning (chain of thought), quote parts of the input, or explain why it chose this answer. This helps identify errors.

Interactive Comparison

Prompting Best Practices

Compare bad and good prompts

1 / 6
Clarity

Be Specific

Quick Reference

Be specific about the task
Provide relevant context
Specify desired format
Use delimiters
Give examples
Set constraints
Do
  • Start with a clear task statement
  • Provide relevant context and examples
  • Specify the desired output format
  • Set constraints (length, style, scope)
  • Use delimiters for content separation
  • Test with edge cases
  • Iterate and refine based on results
Don't
  • Don't assume the model knows context
  • Don't use vague terms like "good" or "better"
  • Don't give contradicting instructions
  • Don't skip format specification
  • Don't ignore errors — analyze them
  • Don't trust outputs blindly — verify
Pre-Send Checklist
✅ Is the task clearly defined?
✅ Is necessary context provided?
✅ Is the output format specified?
✅ Are constraints clear?
✅ Are delimiters used for content?
✅ Are examples provided (if complex)?
✅ Is the prompt tested on edge cases?
✅ Can the output be verified?
Pro Tips
  • 💡 Use XML tags (<context>, <task>, <format>) to structure complex prompts
  • 💡 For critical tasks use self-consistency: multiple queries + voting
  • 💡 Save working prompts in a library for reuse
  • 💡 Test prompts at temperature=0 to check consistency
  • 💡 Use roles ("You are an expert in...") to improve response quality

Try it yourself

Interactive demo of this technique

Technique Comparison
Demo Mode
Pre-recorded responses
TaskBeginnerWriting

Write a social media post about a new company product

Without technique
Without technique
Prompt
Write something about our new product for social media, make it good and attractive to customers, and not too long but not too short either.
Response

Introducing our new innovative product! It will change your life for the better. Try it now and see for yourself! Don't miss this unique opportunity. Click the link! #new #innovation

Tokens:30/40
Time:350ms
Quality:
With Best Practices
With technique
Prompt
Role: SMM manager for a fitness brand. Task: Instagram post about FitBand X fitness tracker launch. Product features: - 7-day battery life - Heart rate accuracy ±1 bpm - 50m water resistance Tone: friendly, motivating. No words: "innovative", "unique", "revolutionary". Structure: hook (1 sentence) → 3 bullet points with features → CTA. Length: 80-120 words. Include 3 relevant hashtags.
Response

Charged on Monday — forgot about charging until the next one.

FitBand X — a tracker that keeps up with your pace:

🏃 7 days on one charge — train all week 💓 Heart rate ±1 bpm accuracy — know your zones 🏊 50m water resistance — from the pool straight to your run

Sales start March 1. First 500 buyers get 3 months of premium analytics free.

Link in bio →

#FitBandX #runeveryday #fitnessgear

👁️Baseline violates 5 rules: no role, no specifics, no format, no length constraints, no cliche prohibitions
🧠Best practices: role (SMM) + specifics (FitBand X, features) + format (hook→bullets→CTA) + constraints (80-120 words) + prohibitions (cliches)
Each best practice solves a specific problem: role → tone, specifics → facts, format → structure
Tokens:95/110
Time:620ms
Quality:
Why this works

Best practices are a checklist: role, specifics, format, constraints, prohibitions. Skipping any item = quality gap. Baseline skips all 5 — result: generic spam.

1 / 2

Lesson Quiz

1 of 3

1.What makes a prompt reliable — giving consistent results on repeated queries?

Practice Challenges

Create a free account to solve challenges

3 AI-verified challenges for this lesson

Related lessons:Prompt ElementsFew Shot

This lesson is part of a structured LLM course.

My Learning Path