Back to posts
Prompt Engineering Frameworks

Prompt Engineering Frameworks

Niket Girdhar / February 7, 2025

Prompt Engineering: 5 Frameworks for Better Results

Ever received a vague or unhelpful response from AI? The secret isn’t in the model—it’s in how you ask. A well-structured prompt improves accuracy, relevance, and depth, ensuring high-quality AI-generated responses.

Here are five powerful frameworks to craft precise and effective prompts for any task.


1. R-T-F (Role - Task - Format)

  • Role: Define the AI’s expertise (e.g., Marketing Expert)
  • Task: Specify what needs to be done (e.g., Create a Facebook ad campaign)
  • Format: Set the response structure (e.g., Bullet points, Formal report)

Example:

Act as an AI researcher. Write a detailed essay on Large Language Models, covering their evolution, architecture, real-world applications, and ethical concerns. Present it in a structured format with an introduction, main body, and conclusion.

Why it works: Clearly defining the role ensures expertise, stating the task provides direction, and specifying the format guarantees structure.


2. T-A-G (Task - Action - Goal)

  • Task: Define what needs to be done (e.g., Evaluate team performance)
  • Action: Specify how to approach the task (e.g., Assess strengths and weaknesses)
  • Goal: Clarify the desired outcome (e.g., Improve satisfaction score)

Example:

Write an essay on Large Language Models. Summarize their key features and compare different architectures (GPT, PaLM, LLaMA). The goal is to help beginners understand how they work and their real-world impact.

Why it works: The AI understands not just the task but also the action (summarizing, comparing) and the goal (making it beginner-friendly).


3. B-A-B (Before - After - Bridge)

  • Before: Explain the current state or problem
  • After: Describe the desired outcome
  • Bridge: Outline how to transition from before to after

Example:

Before today, I had only a basic understanding of AI. After reading your response, I want to confidently explain how Large Language Models work. Bridge the gap by providing an easy-to-follow essay that explains LLMs in simple terms, using real-world examples.

Why it works: This approach helps AI focus on transformation—turning limited knowledge into deeper understanding.


4. C-A-R-E (Context - Action - Result - Example)

  • Context: Provide background information (e.g., Sustainable product launch)
  • Action: Define the required task (e.g., Create an ad campaign)
  • Result: Clarify the expected outcome (e.g., Increase brand awareness)
  • Example: Offer a real-world reference

Example:

Many students struggle to understand Large Language Models because of complex technical jargon. Write an engaging, easy-to-read essay that breaks down LLMs step by step. The goal is to make AI accessible to non-technical readers. A good example of this would be explaining transformers using a real-world analogy like a librarian organizing books.

Why it works: AI understands the background, what to do, what the output should achieve, and how to illustrate key points.


5. R-I-S-E (Role - Input - Steps - Expectation)

  • Role: Assign an expertise to the AI (e.g., Content strategist)
  • Input: Provide necessary data (e.g., Audience insights, trending topics)
  • Steps: Define the process (e.g., Develop a content strategy)
  • Expectation: Specify the outcome (e.g., Increase blog traffic by 40%)

Example:

You are an AI professor. Given the latest research on Large Language Models (GPT-4, Gemini, Claude), write an in-depth essay on their future, including their limitations and upcoming innovations. Structure the response with key sections: Introduction, Current State, Challenges, Future Prospects, and Conclusion. The essay should be insightful enough for AI researchers.

Why it works: This approach ensures responses are accurate, well-structured, and aligned with the intended audience.


By applying these structured frameworks, you can guide AI to generate more precise, relevant, and high-quality responses.