Practical Prompt Engineering Strategies That Work
Four practical prompting techniques - system, role, contextual, and step-back - each with a worked example.


To get the most benefit from AI text generation models, you need to know how to communicate with them. There are specific techniques you can incorporate into your prompts that will help the models provide exactly what you need, saving you time by avoiding repeated requests. In this short article, I will explore some of these techniques.
1 - System Prompting
System prompting is the simplest type of prompt, where you define an overall instruction for what the model should do, such as translation or text correction. Furthermore, you indicate specific requirements the model should follow. For example, you could use a system prompt to return a certain structure. Here are two illustrative examples:
Example 1:
Prompt: "Classify email subjects as SPAM, IMPORTANT, or SOCIAL. Only return the label in uppercase.
Subject: 'Reminder: Your dentist appointment is scheduled for Tuesday at 2 PM.'"
Output: 'IMPORTANT'
Example 2:
Prompt: "Extract contact information from a short signature. Return valid JSON.
'Jane Doe is a Product Manager at Acme Corp (pronouns she/her). You can reach her at jane.doe@example.com or by phone at +1(555)123-4567. Sent from my iPhone. Please excuse brevity.'"
Output:
{
"name": "Jane Doe",
"position": "Product Manager",
"email": "jane.doe@example.com",
"phone": "+1 (555) 123-4567"
}
2 - Role Prompting
The concept here is to assign an identity to the AI model so it will generate relevant, accurate, and informative answers according to the specific role it has been assigned. Not assigning a role could result in very general and potentially biased answers.
Example:
Prompt: "I want you to act as a personal finance coach. Please give me three simple budgeting strategies I can start using today to improve my money management. Each strategy should be described in one sentence."
Output:
- Track every expense for one month to understand where your money goes.
- Set aside 20% of each paycheck into a savings account before you pay any bills.
- Use the envelope method by allocating cash for groceries, entertainment, and transportation separately.
Note: In the previous prompt, we assign a role to the model along with a brief instruction to make the prompt more systematic.
3 - Contextual Prompting
Sometimes we feel that the model doesn't understand us because it lacks the context that we have. We simply ask it to provide something without any context. For this type of prompt, you provide context to the model so it can understand what you really need. This way, the answer will exactly match your requirements.
Example:
Prompt: "You are writing a report for a 6-month project focused on improving fuel efficiency in thermal power plants at the Electricity Generation Corporation. Please help me revise and enhance the following report snippet for clarity, structure, and professionalism."
4 - Step-back Prompting
Step-back prompting aims to enhance the quality of the prompt by first asking the model to consider a general question related to the specific task, then adapt the answer to that general question for the subsequent prompt focused on the specific task. This allows the model to activate relevant background knowledge and reasoning processes before generating the response to solve the specific task. This approach also helps mitigate the model's biases on certain problems by encouraging it to consider the broader context.
Example:
Step 1:
Prompt: "What are the key principles of writing persuasive, eco-friendly product copy that builds trust and highlights environmental benefits?"
Output:
- Emphasize tangible environmental impact (e.g., "reduces plastic waste").
- Use clear, concise language - avoid jargon.
- Highlight certifications or third-party endorsements.
- Appeal to the user's values (health, sustainability).
- Include a concise call to action.
Step 2:
Prompt: "Using the principles above, write a 150-word product description for 'EcoClean Laundry Detergent', a new biodegradable formula that's 100% plant-based, phosphate-free, and certified by GreenSeal. Include a call to action."
Output: "EcoClean Laundry Detergent harnesses the power of 100% plant-based ingredients to deliver a deep, residue-free clean that's gentle on your clothes and the planet. Phosphate-free and GreenSeal certified, EcoClean breaks down naturally after use - reducing waterway pollution and plastic waste. Its concentrated formula means you use less detergent per load, lowering your carbon footprint without sacrificing performance. Free of synthetic dyes, fragrances, and harsh chemicals, it's safe for sensitive skin while still tackling tough stains. Join the growing community of eco-conscious households making a real difference. Make the switch to EcoClean today - clean with confidence, care for tomorrow."
I hope these techniques help you get more out of AI models. Questions or a strategy I missed? Reach me at naifsaleem20@gmail.com.
Source: https://services.google.com/fh/files/misc/gemini-for-google-workspace-prompting-guide-101.pdf
Share this post

