Prompt engineering is becoming a must-have skill for developers working with AI models like ChatGPT, Claude, Gemini, and others. But writing good prompts isn’t just about asking questions — it’s about structuring your intent so the model gives you exactly what you need.
Two frameworks that help with this are Prompt TAG and Prompt RISE. Let’s break them down, understand when to use each, and look at real examples.
🔖 What is Prompt TAG?
TAG stands for:
- T = Task: What you want the model to do.
- A = Audience: Who the response is for.
- G = Goal: What outcome you expect.
This framework is great for quick, focused prompts — especially when you want the model to adapt its tone or depth based on the audience.
✅ Example:
Prompt: “Explain the concept of closures in JavaScript to a junior developer using analogies and simple code.”
- Task: Explain closures.
- Audience: Junior developer.
- Goal: Clarity through analogies and code.
This helps the model avoid overly technical jargon and focus on teaching.
Result
Closures in JavaScript are like a backpack that a function carries, allowing it to access variables from its outer scope even after the outer function has finished executing. This enables the inner function to retain access to its needed variables, similar to how a student uses supplies from their backpack.
function outerFunction() {
let backpack = "pencil"; // This is the variable in the outer scope
function innerFunction() {
console.log(backpack); // The inner function can access the outer function's variable
}
return innerFunction;
}
const myClosure = outerFunction();
myClosure(); // Outputs: "pencil"
🚀 What is Prompt RISE?
RISE is a more structured framework, ideal for complex tasks or when you need a predictable format.
- R = Role: Assign a persona to the model (e.g., teacher, analyst).
- I = Input: Provide context or data.
- S = Steps: Define the process or logic to follow.
- E = Expectation: Specify the format or output you want.
✅ Example:
Prompt:
- Role: You are a senior frontend engineer.
- Input: Here’s a React component with performance issues.
- Steps: Analyze the code, identify bottlenecks, suggest improvements.
- Expectation: Return a list of issues and optimized code snippets.
This is perfect for code reviews, documentation generation, or technical analysis.
🧭 When to Use TAG vs RISE?
Use Case | TAG | RISE |
---|---|---|
Quick explanations | ✅ | ❌ |
Teaching or onboarding | ✅ | ✅ |
Code analysis or debugging | ❌ | ✅ |
Structured reports or planning | ❌ | ✅ |
Tone adaptation (e.g., for kids, juniors) | ✅ | ✅ |
💡 Why Use These Frameworks?
- Clarity: You get better, more relevant responses.
- Consistency: Especially useful in automation or batch tasks.
- Control: You guide the model’s behavior and tone.
🛠 Bonus Tip: Combine with Patterns
You can mix TAG or RISE with other prompt engineering patterns like:
- Few-shot prompting: Give examples.
- Chain-of-thought: Ask for step-by-step reasoning.
- Role prompting: Assign personas for tone and expertise.
👋 Final Thoughts
Prompt engineering is not just for AI researchers — it’s for every developer who wants to build smarter tools, automate tasks, or just get better answers from LLMs.
Try TAG for quick tasks and RISE when you need structure. And if you’re building AI-powered features, these frameworks can be the difference between “meh” and “wow.”
Top comments (0)