Objective: "mission" or "goal." What you want the model to achieve. Be specific and include any overarching objectives.
Instructions: "task," "steps," or "directions." Step-by-step instructions on how to perform the task at hand.
System instructions: Technical or environmental directives that may involve controlling or altering the model's behavior across a set of tasks. (SYSTEM-PROMPTS)
Persona: "role" or "vision." Who or what the model is acting as.
Constraints: "guardrails," "boundaries," or "controls."
Tone: "style," "voice," or "mood."
Context: "background," "documents," or "input data."
Few-shot examples: "exemplars" or "samples."
Reasoning steps: "thinking steps."
Response format: "structure," "presentation," or "layout."
Recap:
Safeguards: "safety rules."
Example:
<OBJECTIVE_AND_PERSONA>
You are a [insert a persona, such as a "math teacher" or "automotive expert"]. Your task is to...
</OBJECTIVE_AND_PERSONA>
<INSTRUCTIONS>
To complete the task, you need to follow these steps:
1.
2.
...
</INSTRUCTIONS>
The Directive
Examples
Role (Persona)
Output Formatting
Additional Information
section: context
| objective
| instructions
| examples
| constraints
| category
| metadata
1. Context and Role
Set the scene by defining Claude's role or the context for the task. For example: "You are a marketing expert" or "I'm working on a research paper about climate change."
2. Clear Task Description
State exactly what you want Claude to do. Be specific rather than vague - instead of "help me write," say "write a 500-word product description for a wireless headphone."
3. Input Information
Provide all relevant details, data, or background information Claude needs to complete the task effectively.
4. Output Requirements
Specify the desired format, length, tone, and style. For example: "Write in a professional tone, use bullet points, keep it under 300 words."
5. Examples (when helpful)
Include positive examples of what you want or negative examples of what to avoid. This helps clarify expectations.
6. Constraints and Guidelines
Mention any specific requirements, limitations, or things to avoid.
7. Step-by-Step Instructions
For complex tasks, break down the process into clear steps or ask Claude to think through the problem systematically.
1. Role or Persona (Optional but Powerful)
Tell ChatGPT who it should act as.
Example:
“You are a professional resume writer.”
“Act as a cybersecurity expert.”
2. Task or Objective
Clearly define what you want ChatGPT to do.
Example:
“Summarize this article in 3 bullet points.”
“Write a cover letter for a marketing role.”
3. Context or Background (If Needed)
Provide relevant details so the response is specific and accurate.
Example:
“The article is about renewable energy adoption in Europe.”
“My experience includes 3 years in social media and a BA in Communications.”
4. Format or Constraints (If Applicable)
Specify output structure, tone, or limitations.
Example:
“Respond in bullet points.”
“Keep it under 150 words.”
“Use a formal tone.”
The Core Components of an Effective Gemini Prompt:
1. The Task or Instruction: Your Core Request
This is the most crucial part of your prompt. It's where you explicitly state what you want Gemini to do. Be direct, clear, and use action verbs. Avoid ambiguity.
Vague: "Tell me about cars."
Specific: "Write a 500-word blog post comparing the key features of the 2025 Toyota Camry and the 2025 Honda Accord, focusing on fuel efficiency, safety ratings, and in-car technology."
2. Context: The "Why" and "What" Behind Your Request
Providing context helps Gemini understand the bigger picture and tailor its response to your specific needs. This can include background information, the purpose of your request, or any relevant constraints.
Without Context: "Create a marketing slogan."
With Context: "I am launching a new brand of organic, fair-trade coffee targeted at environmentally conscious millennials. Create three catchy marketing slogans that emphasize sustainability and a premium coffee experience."
3. Persona or Role: Defining the Voice
You can instruct Gemini to adopt a specific persona or role. This will influence the tone, style, and even the knowledge base it draws upon.
No Persona: "Explain the theory of relativity."
With Persona: "You are Albert Einstein. Explain your theory of relativity in simple terms that a high school student can understand."
4. Format: Structuring the Output
Clearly specify how you want the output to be presented. This ensures the information is organized in a way that is most useful to you.
No Format: "List the pros and cons of remote work."
With Format: "Create a table that outlines the pros and cons of remote work for both employees and employers. The table should have two columns: 'Advantages' and 'Disadvantages'."
5. Examples (Few-Shot Prompting): Showing, Not Just Telling
Providing one or more examples of the desired output can significantly improve the quality and consistency of Gemini's response. This is particularly useful for complex tasks or when you have a very specific style in mind.
Without Example: "Translate the following English idioms into French."
With Example: "Translate the following English idioms into French, maintaining a similar level of informal expression. For example, 'break a leg' could be translated as 'merde'. Now, translate 'spill the beans'."
Example:
section: context | objective | instructions | examples | constraints | category | metadatahttps://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/use-xml-tags
Claude: https://claude.ai/share/93b8b804-0a50-4fcd-b76e-bcca4bfff157