← Back to journey
23 May 20262 min read

How to correctly Prompt Claude

Some pointers on how to structure your prompt so that Claude can better assist you

claude-aiprompt-engineering

Prompting

For any prompt that helps you complete a task/goal. Make sure your success criteria is on point and build evaluations (evals) that can check the prompt output against to see if it passes your checks you would normally do. Using evals help refine LLM outputs + give it better direction.

Good Success Criteria are:

  1. Specific
  2. Measurable
  3. Achievable
  4. Relevant

When building Evals:

  1. Be task-specific - These should mirror your real-world task checks & distribution.
  2. Automate when possible - Format your questions to allow for automated grading.
  3. Prioritize volume over quality.

Additional reading: https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices

Ideal Prompt Structure:

  1. Task Context: Context about the role it should take on or what the goals and overarching tasks you want it to undertake.
  2. Tone Context: Writing tone
  3. Detailed task description and rules: Expand on the specific task you want claude to do, as well as the rules you want it to follow. This is where you give claude an out if it doesnt know the answer.
  4. Examples: Give examples of what you want. Use xml tags.
  5. Input data to process: Use xml tags for input data.
  6. Immediate task description or request: Remind claude or tell it exactly what its expected to immediately do to fulfill the prompts “Task”.
  7. Precognition (thinking step by step): For tasks that require many steps, its good to tell claude to approach this step by step before giving an answer. Sometimes providing a description on how it should approach it is good as well.
  8. Output formatting: How you want it outputted.
  9. Prefilling Claude’s response (if any):