INSPIRED & Informed

RBCLabs.org

01
JUN
2025

Prompt Frameworks for AI

TL;DR

Prompt frameworks are beneficial when using AI. Structured prompt frameworks enhance the quality and relevance of AI outputs, as well as provide structure and clarity to instructions. In turn, this leads to better responses. 

There are currently several prompt frameworks. This article focuses on:

  • RTF (Role, Task, Format): Defines the AI's persona, the action it should take, and the output format.
  • CLEAR (Concise, Logical, Explicit, Action-oriented, Refined): Emphasizes clarity and precision in prompts.
  • PGTC (Persona, Goal, Task, Context): A four-sentence framework that outlines the AI's role, objective, action, and background.

Briefly covered are PARCARERACE, and TAG. General tips for effective prompting are also provided. 

Disclaimer: This article was assisted by artificial intelligence language models. While AI was used as a tool for generating content, it does not imply endorsement or sponsorship by the AI model's creators or any other entity referenced herein. Prompt responses have been modified. At the time of writing, June 1, 2025, this article is for a non-commercial blog. See fair use provisions in copyright law (17 U.S.C. § 107).

What is an AI Prompt Framework and why should I use it?

A prompt framework provides structure and clarity to instructions when interacting with AI models. This leads to more focused and relevant responses. A good prompt framework provides structure and clarity to your instructions when interacting with AI models, leading to more focused and relevant responses. The following are some popular and effective prompt frameworks.

Role, Task, Format (RTF)

This prompt framework consists of three parts that serve to define the AI's persona, state the desired action, and specify the output structure.

  1. Role: Define the persona you want the AI to adopt. This will assist in setting the tone and expertise level of the response.
  2. Task: Clearly state what you want the AI to do. Be specific about the desired action. 
  3. Format: Specify how you want the output to be structured. This could be a paragraph, a list, a table, a specific writing style, etc.

 

Sample Prompt: "You are a legal expert on websites, copyright law, and AI use. Your task is to explain how one can use prompt responses from LLMs like Gemini or ChatGPT that assisted in writing a blog post for a website, which is not currently commercial, but rather my own blog for an online project. Present your explanation in short paragraphs."

Concise, Logical, Explicit, Action-oriented, Refined (CLEAR)

The CLEAR framework for AI prompting emphasizes creating clear and effective instructions. The following provides an explanation of each part, along with both good and poor examples.

Concise (also Clear): Use only necessary words and focus on the key concepts.

  • Poor: "I'm trying to understand this whole thing about giving everyone money without them working, can you tell me what people think is good and bad about it?"
  • Good: "Summarize the main arguments for and against universal basic income."

Logical: Present concepts in a natural and understandable order. Ensure the relationships between ideas are clear.

  • Poor: "What happens with carbon dioxide and oxygen in plants and how does light fit into this whole energy thing?"
  • Good: "Explain the process of photosynthesis in plants, starting with the absorption of sunlight."

Explicit: Clearly state what you want the AI to produce. Provide clear output directions.

  • Poor: "Tell me something interesting."
  • Good: "Write a short story about a robot who learns to feel emotions."

Action-oriented: Use verbs that clearly define the desired action from the AI.

  • Poor: "Tell me about Lincoln and King."
  • Good: "Compare and contrast the leadership styles and social contributions of Abraham Lincoln and Martin Luther King Jr."

Refined: Review and iterate on your prompts to improve clarity and results as part of an ongoing process.

The 4-Sentence Framework: Persona, Goal, Task, Context (PGTC)

The PGTC prompt framework uses four key elements for effective AI instructions:

  1. Persona: Define the AI's role or expertise. 
  2. Goal: State the overall objective you want the AI to achieve. 
  3. Task: Specify the specific action the AI needs to perform. 
  4. Context: Provide any necessary background information, constraints, or specific requirements. 

Sample Prompt

"You are a veteran tour guide with detailed knowledge of Chile. Your goal is to help a user plan a three-day trip to Santiago. Your task is to provide an itinerary which should include popular landmarks, attractions, estimated cost for each (including a total budge), along with the travel time to each cite from downtown Santiago. Your traveler is interested in national landmarks and Chilean cuisine, has a budget of no more than $10,000 USD, and will be in Santiago for two weeks."

PAR (Problem, Action, Result)

Useful for problem-solving prompts. To leverage this prompt framework, simply define the:

  1. problem
  2. action to take
  3. desired result

Sample Prompt: "Problem: Visits to my social media page have decreased by 13% since last quarter. Action: Suggest four actions I can take to increase page visits. Result: Provide the potential benefits of each action you recommend."

CARE (Context, Action, Result, Example)

This prompt framework can be useful for contextual tasks, like where specific examples are important. This should allow the AI to understand nuances, learn from specific instances, and improve performance in context-dependent situations.

Sample Prompt: "Context: We are launching a new social media campaign targeting young adults (18-28 years of age. Action: Write a sample social media post announcing the campaign. Result: The post should be engaging and encourage interaction. Example: [insert a social media post you that you'd like the AI to emulate]."

RACE (Role, Action, Context, Expectation)

This prompt framework is similar to RTF, but adds explicit context and expectation of the output.

Sample Prompt

"Role: You are a helpful customer service chatbot for a major online vendor. Action: Respond to a customer inquiry about a delayed order. Context: Order number 0x24i335a7 missed the expected delivery date (yesterday). Expectation: Provide an apology email explaining the reason for the delay and a new estimated time of arrival."

TAG (Task, Action, Goal)

This prompt framework focuses on clearly defining the task, the specific actions involved, and the ultimate goal.

Example

"Task: Write a blog post for a website. Action: Explain the benefits of a healthy diet and lowering stress. Goal: Inform and encourage readers on how to create a customized diet to support a healthy lifestyle and lower their stress."

 

General Tips for Effective Prompting

  1. Be specific: Provide detailed instructions by clearly defining the task, desired outcome, relevant keywords, and providing examples. 
  2. Be succinct: Use succinct, clear, and concise language, avoiding ambiguity. 
  3. Specify format: Explain the output format, such as a bulleted list, essay, paragraph, table, paragraph, code, etc.
  4. Provide context: Provide relevant background for context, explain the purpose behind your request, reference external information as needed. 
  5. Define the audience: Describe their knowledge, interests, and the tone/style to match. 
  6. Set constraints: Specifying length and content limitations.
  7. Iterate and refine: You don't have to settle for the first output. Feel free to experiment using different frameworks or customize them to get the results you really want. 
  8. Ask for clarification: If the AI response is unclear, you can ask for specific clarification or further details. Treat the AI like a partner or consulting for better results. 

Summary

Mastering prompt crafting unlocks the full potential of AI language models. By using a structured prompt framework, you can significantly improve the quality and relevance of the AI's output and make your interactions more efficient. Remember to choose the framework that best suits the specific task you have in mind and be sure to iterate for the best results.

 

References

Google Assistant. (2025, May 31). Response to prompt: "Give a brief definition of a 'prompt framework', concerning using AI"

Google Gemini. (2025, May 31). Response to prompts to shorten, summarize.

Google Cloud. "Prompt Engineering for AI Guide | Google Cloud." cloud.google.com

The following are references provided by Google Assistant:

Emeritus. "The Best Prompt Frameworks to Level Up Your Prompting Game." emeritus.org

Butter CMS. "11 ChatGPT Prompt Frameworks Every Marketer Should Know - Butter CMS." buttercms.com

Power BI Training Australia. "Master Prompt Engineering with Persona Patterns - Power BI Training." powerbitraining.com.au

Harvard University Information Technology. "Getting started with prompts for text-based Generative AI tools | Harvard University Informat…" www.huit.harvard.edu

Georgetown University. "How to Craft Prompts - Artificial Intelligence (Generative) Resources - Research - Guides." guides.library.georgetown.edu

Miquido. "AI Prompt Frameworks: Unlock Efficiency & Creativity | Miquido." www.miquido.com

Massachusetts Institute of Technology. "Effective Prompts for AI: The Essentials - MIT Sloan Teaching & Learning Technologies." mitsloantech.mit.edu

Learn Prompting. "Understanding Prompt Structure: Key Parts of a Prompt." learnprompting.org

Learn Prompting. "How to Write Better Prompts: Basic Recommendations and Tips." learnprompting.org

Prompt Engineering Guide. "Elements of a Prompt - Prompt Engineering Guide." www.promptengineeringguide.ai

Atlassian. "The ultimate guide to writing effective AI prompts - Work Life by Atlassian." www.atlassian.com

Research Guides - University of Calgary. "Prompting 101 - Artificial Intelligence - Library at University of Calgary - Research Guides." libguides.ucalgary.ca

28
APR
2025

Building a Home AI Server

I wanted to learn all I could about AI. Specifically, I wanted to know how to leverage it both in-house and offline. To do that, I needed a powerful computer to act as my home AI server. So I built one

To build a home AI server, I first had to learn how to build a PC. I curated a few libraries of YouTube tutorials, learned some needed skills (like bash scripting and Linux) through sites like Codecademy,  ordered the components, and read through the technical documentation as they arrived. During this time, I prepared by establishing a scaled down version of the offline LLM setup on two different laptops (one Mac, one Windows). 

Once all the working components arrived, it was time to build the PC! I set up the case, installed the motherboard, then the CPU, the RAM, the 4TB SSD, the AIO, and the first GPU. I later added a second GPU and some additional fans for a nice airflow. I lowered the motherboard using the cases' adjustable settings, to make room for some much needed intake fans and that second GPU. 

Now that the build was complete, it was time for an OS! I decided a Linux distro would be the way to go. Realizing that as great as Linux is, some software just isn't built for it, I later decided to do something called "dual booting", where through various methods one can house different operating systems on the same PC. I decided that installing Windows on a separate SSD was the way to go. I partitioned half of the new 4TB SSD and got to work. Now I have a fully functioning PC with options to boot into either Linux. No more relying on Windows Subsystem for Linux! Over time I came to prefer the Linix disto called PopOS! though I may move to another soon. A quick adjustment to the boot order and now by default it boots into Linux, with the option to boot into Windows at start up instead. 

Almost immediately I dove head-first into learning how to generate AI images and videos. Learning and leveraging open-source tools like Open WebUI, Stable Diffusion, ComfyUI, and more has been a game-changer.

Stay tuned for more!

©Copyright. All rights reserved.

We need your consent to load the translations

We use a third-party service to translate the website content that may collect data about your activity. Please review the details in the privacy policy and accept the service to view the translations.