Step 1: Define Your Objective. Clearly state the exact task Claude needs to perform and the desired outcome. Be explicit and concise.
Step 2: Assign a Role or Persona. Instruct Claude to 'Act as a [specific professional role]' to guide its perspective, tone, and knowledge base for the task.
Step 3: Provide Comprehensive Context. Furnish all necessary background information, relevant data, or previous interactions Claude needs to understand the request fully.
Step 4: Detail Specific Constraints. Outline any limitations, rules, or requirements for the output, such as word count, specific keywords to include/exclude, or safety guidelines.
Step 5: Define the Output Format. Specify how the response should be structured (e.g., 'Respond in JSON format,' 'Use bullet points,' 'Provide a table').
Step 6: Include Examples (Few-shot Prompting). For complex or nuanced tasks, provide 1-3 high-quality input-output examples to demonstrate the desired pattern.
Step 7: Utilize Clear Separators. Employ XML tags (e.g., , , ) to clearly delineate different sections of your prompt for Claude.
Step 8: Implement Step-by-Step Instructions. Break down complex tasks into a numbered list of actions Claude should follow sequentially to process the request.
Step 9: Review and Iteratively Refine. Evaluate Claude's initial output for accuracy, relevance, and adherence to instructions. Adjust your prompt based on the response to improve future outputs.