Prompt Engineering Templates That Work: 7 Copy-Paste Recipes for LLMs

0
4



Image by Author

 

Introduction

 
If you’ve used LLMs for different tasks, you’ve probably noticed that the response often depends on how you write the prompt. This is what we call prompt engineering. The way you give instructions can be the difference between a vague reply and a precise, actionable answer. I know prompt engineering can feel a little tricky at times. It’s not just pure science; it’s a mix of science and art, which means you have to experiment to see what works best for each situation. Don’t worry — I’ve got you covered in this article.

We’ll go through 7 tried-and-tested recipes that you can bookmark and use for your own tasks. I won’t cover every single domain here, but I’ll focus on 7 different areas. If any of them align closely with what you’re working on, give them a try and let me know in the comments how it goes. Here we go.

 

1. Job Applications & Career → Persona + Personalization Prompt

 
Generic cover letters are pretty easy to spot. Although I personally feel that a letter written by you will read more naturally and attract a better response from an employer, I understand this is one of the most common use cases. In that scenario, include a personal touch and keep a natural tone. If you just paste your résumé, it often highlights everything—even things that aren’t really important. You can also add a few key points in the structure section if you like. Don’t just ask: “Write a cover letter for the ML engineer position at XYZ company.” You don’t want to give the impression that your letter is identical to every other candidate’s.

 

Template:
You are my career assistant. Draft a tailored cover letter for the position of [Job Title] at [Company].

Details about me: [paste key skills, most relevant achievements, and work experience].

Guidelines:
– Keep the tone: professional, confident, yet natural — not overly enthusiastic.
– Summarize experience in a way that highlights transferable value and impact, not a task-by-task list.
– Structure:
1) Brief introduction with genuine interest in the role/company.
2) Concise paragraph connecting my background to the role requirements.
3) Closing paragraph with a confident but respectful call to action.
– Keep the letter under one page.

 

2. Mathematics & Logical Reasoning → Chain-of-Thought + Role + Few-Shot Prompting

 
Most people in the community might already know what chain-of-thought and few-shot prompting are, but since many students and non-technical users use LLMs for this purpose, I wanted to mention it explicitly. LLMs often struggle with math if you ask them directly. For example, try asking an LLM to count the number of “r”s in “strawberry” and you may see it struggle. Instead, asking it explicitly to “reason step by step” improves accuracy. Adding few-shot examples—worked-out problems—further reduces errors by providing a clear understanding of the reasoning process.

 

Template:
You are a math tutor. Solve the following problem step by step before giving the final answer.

Example:
Q: If a train travels at 60 km/h for 2 hours, how far does it go?
A: Step 1: Speed × Time = 60 × 2 = 120 km.
Final Answer: 120 km

Now solve this problem:
[Insert your math problem here]

 

3. Code Generation → Instruction Decomposition + Constraints Prompt

 
Coding is one of the major use cases of LLMs, and it’s also why you might have heard the term “vibe coding” trending. Even experienced developers have shifted to generating boilerplate code with LLMs and then building on top as they go. If you’ve coded before, you know that a single problem can be solved in many ways, and LLMs sometimes make things more complicated than they need to be. A bit of guidance in the form of constraints—and breaking down the tasks with clear inputs, outputs, and requirements—keeps outputs practical.

 

Template:
You are a senior software engineer. Write Python code to accomplish the following task using {constraint}.

Task: {describe what the code should do}

Requirements:

Input format: {specify}
Output format: {specify}
Edge cases to handle: {list them}

Provide clean, commented code only.

 

4. Learning & Tutoring → Socratic Method + Guided Teaching

 
A lot of people use LLMs as a learning tool because of the flexibility they provide and the way they can easily adapt to your preferred structure. Different teaching methods work differently for people, but one approach I’ve found both useful and widely adopted in education is when learning is not just one-way. Instead, the teacher asks you questions to check understanding, then clarifies or explains further. This keeps the process interactive and prevents passive reading.

 

Template:
You are a patient tutor. Instead of directly stating the answer, guide me step by step using questions I can answer. Then, based on my answers, explain the solution clearly.

Topic: {Insert topic}

Start teaching:

 

5. Creative Writing & Storytelling → Controlled Creativity with Persona + Style

 
One of the major use cases that appeared with LLMs was the growth in children’s content because of their ability to generate engaging stories. You might have also noticed AI-based videos on YouTube following the same trend. Story generation is pretty cool, but if you just let the model go on its own, things can easily get lost. To keep it engaging and structured, it helps to set constraints like perspective, theme, character, or even the ending. In practice, this works much better for creative tasks.

 

Template:
You are a skilled storyteller. Write a short story (around 400 words) in the style of magical realism.

Perspective: first person
Theme: discovery of a hidden world in the ordinary
Audience/Complexity Level: children (simple)
Ending: End with a surprising twist.

 

6. Brainstorming & Idea Generation → Divergent + Convergent Thinking

 
When it comes to creativity, one of the most effective ways to use LLMs is for brainstorming. But if you just ask for “ideas,” the model might throw out a random list that is either too broad or not practical. A better way is to follow the same process used in real brainstorming sessions: first go wide and generate as many raw ideas as possible (divergent thinking), then narrow down and refine the best ones into workable solutions (convergent thinking). This way, you get both creativity and structure in the output.

 

Template:

Step 1: Generate 10 raw, unfiltered ideas for [topic].
Step 2: Select the top 3 most practical ideas and expand each into a detailed plan.

 

 

7. Business & Strategy → Consultant-Style Structured Prompt

 
A lot of people also use LLMs for business-related tasks, whether that’s market research, planning, or strategy building. The issue is that if you just ask a vague question like “How do I improve my business?” you will usually get a generic answer that doesn’t really help. The way to get more practical, clear output is to frame the prompt in a structured format, similar to how consulting firms present their analysis. This keeps the answer focused, avoids unnecessary fluff, and makes it actionable.

 

Template:
You are a strategy consultant. Provide a structured 3-part analysis for [business challenge].

Current Situation: Key facts, market context, or data available
Key Challenges: The main problems or obstacles to address
Recommended Strategy: 3 actionable steps that can be implemented directly

 
 

Kanwal Mehreen is a machine learning engineer and a technical writer with a profound passion for data science and the intersection of AI with medicine. She co-authored the ebook “Maximizing Productivity with ChatGPT”. As a Google Generation Scholar 2022 for APAC, she champions diversity and academic excellence. She’s also recognized as a Teradata Diversity in Tech Scholar, Mitacs Globalink Research Scholar, and Harvard WeCode Scholar. Kanwal is an ardent advocate for change, having founded FEMCodes to empower women in STEM fields.