Best Practices for Crafting Prompts

A practical checklist of the most effective, day-to-day habits for writing better prompts.

Best Practices for Crafting Prompts

While there are many advanced techniques, a small set of best practices will dramatically improve over 90% of the prompts you write. Think of this as your essential checklist for every interaction with an LLM.

Consistently applying these principles will lead to more accurate, relevant, and creative results.

1. Be Specific and Direct

Ambiguity is the enemy of a good prompt. State your objective clearly and directly, leaving as little room for interpretation as possible.

Instead of: "Tell me about electric cars." Try: "Write a 500-word summary comparing the key features of the top three electric car models released in 2025."

2. Provide Full Context

Never assume the model knows the background of your request. Provide all the relevant details, definitions, and constraints it needs to do the job properly.

Instead of: "Summarize the meeting notes." Try: "You are a project manager. Summarize the following meeting notes for the engineering team. Focus specifically on action items and deadlines." [...paste meeting notes here...]

3. Assign a Persona

This is one of the most powerful and easy-to-use techniques. Instruct the model to adopt a specific role or persona. This frames its tone, style, and knowledge base.

Try: "You are a seasoned travel writer known for vivid descriptions. Describe the experience of walking through the Jemaa el-Fnaa square in Marrakesh at dusk."

4. Use Clear Delimiters

Use symbols to create clear boundaries between different parts of your prompt, such as instructions, context, and examples. This helps the model understand the structure of your request and is a key defense against prompt injection.

Try: Summarize the following customer review in a single sentence. --- Review: """The product arrived two weeks late, but the quality is higher than I expected and customer service was helpful.""" --- Summary:

5. Specify the Output Format

Explicitly tell the model exactly how you want the output to be structured. If you don't, you'll get a simple paragraph by default.

Instead of: "List the planets in the solar system." Try: "Provide a list of the planets in our solar system in a two-column Markdown table. The first column should be the planet's name, and the second should be its distance from the sun."

6. Provide Examples (Few-Shot)

For complex or nuanced tasks, showing is better than telling. Provide a few examples of the input-output pattern you want the model to follow.

Try: Extract the main emotion from the text. Text: "I'm so excited, I can't wait for the concert!" Emotion: Joy Text: "I've reviewed the documents and they are not acceptable." Emotion: Disappointment Text: "The quiet rain on the roof is so peaceful." Emotion:

7. Break Down Complex Tasks

If a task requires multiple steps, don't try to solve it in one giant prompt. Chain multiple, simpler prompts together. The output of one prompt can become the context for the next. This is more reliable and easier to debug.

8. Refine Iteratively

Your first prompt will rarely be your best. Treat prompting as an empirical process. Start with a simple prompt, see what the model produces, and refine it by adding more context, clarifying instructions, or adjusting the format until you get the desired result.

Last updated