Templates for prompt structure
Having analysed individual prompting methods, our attention now shifts to prompting frameworks.
These are predefined templates, simple frameworks that assist users in writing clear and effective prompts for LLM models.
Instead of posing vague questions, these templates guide users to include context, objectives, format, and constraints, thereby allowing models to produce more accurate and useful responses.
They are widely utilised in prompt engineering, content creation, research, and business processes.
1. Role prompting (Persona prompting)
Let us begin our overview with role prompting.
Basic idea
Role prompting is a framework wherein the user instructs an LLM to assume a specific role, perspective, or identity whilst generating the response.
It can be considered a foundational approach upon which more structured frameworks are built, and it is widely used in many prompting techniques discussed later in this article.
By assigning it a role such as “developer”, “teacher”, “lawyer”, or “scientist”, the model is enabled to produce outputs that are more structured, relevant, and tailored to a specific context or domain of expertise.
LLMs are trained on vast amounts of text that include communication patterns associated with different professions and personas.
When a role is specified, the model conditions its response to reflect these patterns, producing a more appropriate tone, terminology, and level of explanation.
The common structure of role prompting follows the form:
- You are a [ROLE].
- Your task is to [TASK].
- Explain the answer in [STYLE/FORMAT].
Example
Starting with the role, we indicate to the model the specific expertise it must assume: “You are a cybersecurity expert”.
The task, namely the specific assignment the model must perform, will in this case be: “Explain a Distributed Denial-of-Service (DDoS) attack”.
Finally comes the style/format of the response, meaning the stylistic requirements of the output: “Use understandable language without technical jargon, because the target audience for the article is not composed of technical experts”.
Sample output
“A Distributed Denial-of-Service (DDoS) attack is a type of cyberattack in which multiple computers overwhelm a specific website or online service by simultaneously sending an enormous number of requests. This causes system slowdowns or even crashes.
The key idea is overload.
Imagine a shop where thousands of people all try to enter at the exact same time. The entrance becomes blocked and customers are unable to get in or be served. A DDoS attack works in a similar manner: the system is so busy handling artificial traffic that it can no longer serve legitimate users.”
Use cases
- Adapting content to the audience and context: using roles (e.g., “teacher”, “expert”, “consultant”) to adjust tone, depth, and clarity.
- Generating domain-specific outputs: producing more relevant and structured content, consistent with professional expertise.
- Enhancing problem-solving and decision-making: simulating “expert” perspectives for analysis, recommendations, and debugging.
- Improving communication and creativity: shaping the style for writing, customer interactions, storytelling, and content rewriting.
Key points
When using the role prompting (persona prompting) structure, it is important to avoid vague roles (e.g., “expert”), as they can lead to generic outputs.
More specific roles (e.g., “cybersecurity analyst”, “university lecturer”) tend to produce more precise and useful responses.
However, the output must always be examined carefully, as the model may sometimes overemphasise the persona, for instance by adding unnecessary jargon or stylistic peculiarities.
When this occurs, the next step consists of refining the prompt by introducing clearer constraints.
2. RACE framework
Let us now look at a framework based on four elements: Role, Action, Context, and Expectation.
Basic idea
The RACE framework is a simple and widely used prompt engineering structure designed to help users communicate more clearly with LLMs.
The acronym stands for Role, Action, Context, and Expectation, and it provides a structured approach to writing prompts, guiding LLMs towards more relevant and accurate responses for the specific context.
By explicitly defining these four components, users can reduce the ambiguity of requests and thus ensure that the model understands both the task and the desired output format.
Structured prompting methods such as RACE are increasingly recommended in prompt engineering guides, as they improve the clarity, coherence, and utility of AI-generated responses.
This framework bears significant similarities to the previously seen role prompting (persona prompting), but it introduces additional elements, such as context, and offers greater clarity regarding expectations.
The four components of the RACE framework perform distinct functions:
- Role specifies the perspective or expertise the AI must assume, for example “teacher”, “researcher”, or “marketing expert”.
- Who should the LLM impersonate?
- Action describes the task the AI must perform, such as “write”, “analyse”, or “summarise”.
- What specific task must the model execute?
- Context provides contextual background information that helps the model tailor its response, such as the target audience, the topic, or the purpose.
- What background information is required?
- Expectation defines the desired format or outcome of the output, for instance a brief summary, bullet points, or a structured report.
- What should the output look like?
Together, these elements ensure that the LLM receives clear instructions regarding both the task and how the output should be presented.
Example
Role: You are an expert Italian chef and culinary instructor, specialising in traditional Roman cuisine.
Action: Explain how to prepare an authentic pasta alla carbonara to a group of young apprentice chefs.
Context: Your audience is a group of novice culinary students who are learning classic Italian recipes.
Focus on the authentic Roman method using ingredients such as pecorino romano and guanciale.
Highlight common mistakes, such as the use of cream and pancetta.
The objective is to teach the technique and respect for the traditional recipe and ingredients.
Expectation: Here you also define the style, format, length, and quality of the output.
For example, 200–300 words, start with a strong statement on what makes a true carbonara authentic.
Clearly explain the key ingredients and their importance.
Describe the process step by step.
Mention at least two common mistakes.
Conclude with a brief encouraging message.
The tone should be passionate, instructive, and slightly narrative.
Use cases
Overall, the RACE framework is valued for its simplicity and versatility.
By focusing on four fundamental elements of communication—who is speaking, what task must be performed, what contextual information is relevant, and what form the final output must take—it can be applied to a wide range of activities, including writing, data analysis, training, and corporate communication.
With prompt engineering becoming an increasingly important skill for interacting with LLMs, frameworks such as RACE provide practical guidelines for creating more precise and effective prompts [Park, 2026].
Key points
The effectiveness of this framework lies in the correct definition of its fundamental components;
it is therefore essential to clearly define Role, Action, Context, and Expectation.
Missing or vague components can lead to incomplete or generic outputs, reducing the effectiveness of the framework.
Furthermore, although context is a key element, providing too much information can confuse the model.
It is thus important to include only relevant information that adds value to the specific task.
Finally, the components of the framework must be mutually consistent.
Misalignments can reduce both the framework’s effectiveness and the output’s quality.
3. CRISPE framework
CRISPE is sometimes presented with slight variations in its name, such as CRISP or CRISPY, but it is the same framework.
The acronym indicates the basic components of the structure: Capacity/Role, Request (or Statement), Insight, Style/Persona, and Example.
Basic idea
CRISPE is a structured prompt engineering framework designed to improve the clarity and reliability of interactions with LLM models, particularly in technical and developmental contexts.
The various components, the initials of which form the name, assist users in explicitly defining both the task to be performed and important parameters to guide the model in generating outputs that better meet their needs.
By breaking prompts down into these components, CRISPE reduces ambiguity and helps to produce more deterministic and context-aware outputs, a fundamental aspect when integrating LLMs into software systems or operational workflows.
The framework is composed of the following key elements:
- Capacity / Role: defines the role or capacity in which the LLM must operate.
- For example, teacher, chef, trainer, and so forth.
- It corresponds to the Role component of the RACE framework.
- Insight: provides the necessary contextual information, allowing the model to generate more accurate and relevant responses.
- It is analogous to Context in RACE.
- Request (or statement): represents the main task or instruction provided to the model and corresponds to Action in RACE.
- Style / Persona (Personality): specifies the tone, style, or communicative approach (e.g., formal, conversational).
- It contributes to the Expectation dimension in RACE.
- Example (or Experiment): encourages the inclusion of examples and/or different output variants, allowing users to iteratively evaluate and refine the results.
The CRISPE framework improves the utilisation of LLMs by increasing efficiency, precision, and communication quality.
By effectively structuring prompts, it enables the attainment of relevant results more rapidly, reduces the need for repeated iterations, and supports a better decision-making process.
Example
Capacity/Role indicates which role the LLM must impersonate and what expertise or perspective is required.
In our example, the prompt would be: “You are an experienced university economics professor specialising in macroeconomics”.
The Request/Statement indicates what the LLM must do, what the specific task is.
Thus, “Explain the concept of inflation” will be added to the prompt.
Insight represents the context, namely what the LLM needs to know, which information or constraints are relevant.
In the prompt this could be: “The target audience is composed of first-year university students, with little or no knowledge of economics. The explanation must therefore include the definition of inflation, the reasons why it occurs, its impacts on the economy and people’s real lives”.
Personality defines the manner in which the LLM must communicate, the tone and style to utilise.
The prompt will be further expanded by writing: “Use a clear, engaging, and accessible didactic style”.
Experiment, finally, specifies which variants or alternatives must be explored.
The prompt will therefore be completed thus: “Provide two complementary explanations: one with a real-life example, such as the increase in consumer product prices, and another with a simple numerical illustration”.
Use cases
The CRISPE framework is highly flexible, which renders it useful for a wide range of activities.
Elements such as tone customisation and the generation of multiple outputs foster clearer communication and more creative problem-solving.
In particular, it is suited to the following use cases:
- Technical and educational activities: generating clear and structured explanations for well-defined audiences.
- Software development and problem-solving: supporting coding, debugging, and complex analysis with precise context.
- Content creation with controlled style: ensuring consistency of tone and structure in communication.
- Iterative exploration: producing multiple variants to compare, refine, and improve results.
- Decision and business support: creating structured insights, reports, and recommendations for stakeholders.
Key points
As with other frameworks, it is important to define the role with a correct level of granularity.
Overly generic roles end up producing generic outputs, whereas overly specific roles can unnecessarily limit the response.
The prompt must be relevant, sufficient, and concise.
The context must be informative yet focused: scarce information reduces accuracy, but too many indications can confuse the model.
Furthermore, style and tone must be explicit and clearly defined.
Specifying the communicative style improves consistency, especially in professional or customer-facing contexts.Examples must be used strategically.
Although they can provide decisive support, an excessive number of variants can reduce focus and ultimately introduce noise.
Finally, as in all prompting approaches, it is fundamental to maintain consistency among the components.
Misalignments—for example, a technical role paired with overly simple expectations—can lead to suboptimal results.
Common sense practices for more reliable outputs
Let us now look at a series of practical and common sense indications to reduce “hallucinations” and obtain more reliable outputs from LLMs.
- Request sources: ask for references or evidence to support the assertions provided by the model. A useful approach consists of explicitly including a phrase in the prompt such as: “Cite at least three sources”. This simple measure can significantly reduce the probability of the model inventing facts or citations. As discussed in the previous article, models can still generate fabricated sources; however, it is less likely that they will invent more than one and that these fictitious sources will be consistent with the others.
- Fact-check: always check important information using authoritative and reliable sources before accepting it. Cross-referencing with official websites, academic publications, or recognised news outlets is essential, particularly for critical decisions. This is a basic skill, theoretically learned from the early years of school, which remains absolutely valid even when using LLMs.
- Be specific in prompts: clear, detailed yet concise prompts, with adequate context, reduce the likelihood of the model “guessing” or generating erroneous information. This aspect will be explored further in the following paragraphs. For instance: “One of the most famous football matches is Italy vs Germany, played in 1970. It was an epic match. Can you provide a brief summary and cite three sources?”. Providing context and precise instructions helps the model generate more accurate and relevant responses.
- Compare answers: compare the model’s outputs with other reliable sources or tools to identify any inconsistencies. For example, if the model states that Brazil won the 2006 FIFA World Cup, a verification on the official FIFA website or reliable sources will confirm that the winner was Italy.
- Be aware of limitations: remember that LLMs can generate plausible but incorrect or outdated information. These models are not infallible; understanding their limits helps maintain realistic expectations.
- Apply critical thinking: when use cases allow, it can be a good practice to consider the model’s output as a draft or a suggestion, not as an absolute truth. It is important to question and verify relevant or unexpected assertions.
- Consult multiple models or benchmarks: for high-impact topics, it can be useful to run the same prompt across multiple models — for example ChatGPT, Gemini, DeepSeek — and compare the results. Any differences can highlight aspects that require further verification.
By systematically applying these strategies, users can reduce the risk of hallucinations and utilise the outputs of language models more reliably.
Behaviours to avoid in prompt engineering
Regardless of the framework utilised, there are several common mistakes that users can make when interacting with LLMs.
Among the most frequent:
- Being too vague or generic. Posing broad questions such as “Write about the economy” frequently leads to generic responses. Clear and specific prompts allow LLMs to produce results more in line with expectations.
- Not defining a role for the LLM. Without specifying a role (e.g., university teacher, process analyst, expert cook, etc.), the model may generate poorly focused responses. The assignment of a role improves relevance and tone.
- Lack of context. Failing to provide essential background information, such as audience, objective, or constraints, reduces accuracy and utility [OpenAI Prompting Guide, 2024].
- Unclear instructions. Ambiguous requests (e.g., “Write about the economy”) make it difficult to obtain precise outputs. These prompts are frequently characterised by generic verbs such as “talk about”, “tell me about”, “give information on”. More effective alternatives include: “identify”, “list 5 key factors”, “break down”, “evaluate based on given criteria”, “generate two examples”, “rank”.
- Not specifying the desired format. If a format is not indicated (e.g., bullet points, paragraphs, summary), the output might not meet the requirements.
- Ignoring tone and style. The same content can be expressed in a formal, informal, or technical manner. Failing to specify these aspects can lead to inadequate communication.
- Overloading the prompt with too much information. Long or poorly focused prompts can confuse the model and reduce output quality. It is important to include only necessary information, avoiding useless redundancies.
- Not iterating or refining prompts. Obtaining results aligned with expectations generally requires an iterative process. Users frequently stop at the first response instead of improving the prompt.
- Not requesting examples. Examples improve clarity and utility, especially in educational or technical contexts.
- Not requesting sources. Requesting reliable sources increases trust in the output and reduces the risk of hallucinations.
- Not using structured frameworks (e.g., RACE, CRISPE). Unstructured prompts frequently lead to inconsistent results, whereas frameworks improve the clarity, control, and overall quality of the output.
Is natural language the future of programming?
From a historical perspective, programming has progressively evolved towards increasingly higher levels of abstraction: from low-level languages, such as assembly, to higher-level paradigms like structured programming (e.g., Pascal, C) and object-oriented programming (e.g., Smalltalk, C++, Java).
Today, LLM models represent a further step in this evolution, wherein natural language, if expressed through well-structured prompts, can function as a genuine programming interface.
Instead of writing code, users specify intents, constraints, and context in natural language, and the model then takes charge of generating executable codes.
This idea is attracting increasing attention in both academic and industrial spheres, particularly in studies on “natural language programming” and AI-assisted coding (e.g., OpenAI Codex) [Chen et al., 2021], [Karpathy, 2023].
Although traditional programming languages continue to play a fundamental role, prompt engineering can be considered a complementary paradigm.
Currently, it is increasingly common for developers, even experts, to utilise LLM models to generate code, typically producing an initial version that they then take charge of refining and improving.
Looking to the future, it is probable that a new level of abstraction will soon emerge in the evolution of programming, wherein compilers will operate directly upon structured natural language.
Conclusions
Maximising the potential of LLM models is not solely a matter of their capabilities, training data, and so forth, but it also heavily depends on how effectively users manage to interact with them.
Superficial or inadequately designed prompts can lead to inefficiencies, lower quality outputs, and even financial or decision-making risks.
Well-structured prompts, conversely, significantly improve accuracy, relevance, and productivity.
Prompt engineering thus positions itself as a key competence in the modern use of AI.
Fundamental techniques, such as zero-shot, few-shot, and chain-of-thought prompting, seen in the previous article, and structured frameworks like RACE and CRISPE, seen in this article, improve clarity, control, and consistency.
Taken together, these approaches transform vague instructions into precise and reliable outputs, enabling more effective collaboration between humans and AI.
Ultimately, prompt design is a fundamental skill for maximising the value that can be obtained from LLM models.
Having said that, the idea that prompt engineering could evolve into an autonomous profession might be largely overestimated.
As LLMs become increasingly capable of interpreting intent, refining inputs, and even autonomously optimising prompts, the necessity for specialised human intervention in basic prompting activities is destined to decrease.
Although, currently, expertise in prompt design remains valuable, especially in complex, critical, or highly specialised contexts, it is evolving into a complementary skill rather than a distinct role.
In this sense, the future of prompt engineering might lie less in manual optimisation and more in the ability to guide, supervise, and collaborate with increasingly advanced AI systems.
Finally, it is increasingly common for developers to use LLMs to generate code, typically producing an initial version that is subsequently refined and improved.
Looking to the future, it is probable that a new level of abstraction will emerge in the evolution of programming, wherein compilers will operate directly upon structured natural language.
References
[Google, 2026] Google, Prompt engineering: overview and guide, 14 January 2026
https://cloud.google.com/discover/what-is-prompt-engineering
[Becker et al., 2025] Joel Becker, Nate Rush, Beth Barnes, David Rein, Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity, 25 July 2025
https://arxiv.org/pdf/2507.09089
[Gutheil et al., 2026] Niklas Gutheil, Valentin Mayer, Leopold Müller, Jörg Rommelt, Niklas Kühl, PromptPilot: Improving Human-AI Collaboration Through LLM-Enhanced Prompt Engineering, 1 Oct 2025 06
https://arxiv.org/pdf/2510.00555
[Laurent, 2025] Adrien Laurent, AI Hallucinations in Business: Causes and Prevention, 2025
https://intuitionlabs.ai/articles/ai-hallucinations-business-causes-prevention?utm_source=chatgpt.com
[Hassanein et al., 2025] Fatma EA Hassanein, Yousra Ahmed, Shaymaa Maher, Ahmed El Barbary, Asmaa Abou-Bakr, Prompt-dependent performance of multimodal AI model in oral diagnosis: a comprehensive analysis of accuracy, narrative quality, calibration, and latency versus human expert, 30 October 2025
https://pmc.ncbi.nlm.nih.gov/articles/PMC12575769/?utm_source=chatgpt.com
[Horton et al., 2025] Richard Horton Jan Michalski Stacey Winters Douglas Gunn Jennifer Holland , AI ROI: The paradox of rising investment and elusive returns, 22 Oct 2025
https://www.deloitte.com/uk/en/issues/generative-ai/ai-roi-the-paradox-of-rising-investment-and-elusive-returns.html?utm_source=chatgpt.com
[Groome, 2025] Imogen Groome, What is Zero-Shot Prompting?, 7 Aug 2025
https://www.ai21.com/glossary/foundational-llm/zero-shot-prompting/
[Brown et al. 2020] Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, Dario Amodei, Language Models are Few-Shot Learners, last revised 22 Jul 2020
https://arxiv.org/abs/2005.14165
[Kaplan et al., 2020] Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, Dario Amodei, Scaling Laws for Neural Language Models, 23 Jan 2020
https://arxiv.org/abs/2001.08361
[Touvron et al, 2023] Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, Guillaume Lample, LLaMA: Open and Efficient Foundation Language Models, 27 Feb 2023
https://arxiv.org/pdf/2302.13971
[Chen et al., 2025] Banghao Chen, Zhaofeng Zhang, Nicolas Langrené, Shengxin Zhu, Unleashing the potential of prompt engineering for large language models, Volume 6, Issue 6, 13 June 2025, 101260
https://www.sciencedirect.com/science/article/pii/S2666389925001084?utm_source=chatgpt.com
[Wei et al., 2023] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou, Chain-of-Thought Prompting Elicits Reasoning in Large Language Models, 10 Jan 2023
https://arxiv.org/abs/2201.11903
[Yao et al., 2023] Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao, ReAct: Synergizing Reasoning and Acting in Language Models, 10 Mar 2023
https://arxiv.org/abs/2210.03629
[Park, 2026] David Park, The RACE Framework: Master Prompt Engineering in 15 Minutes, January 2026
https://automatemyjob.co.uk/blog/race-framework-prompt-engineering?utm_source=chatgpt.com
[Sheldon et al., 2024] Robert Sheldon, Kinza Yasar, What is an AI prompt?, November 2024
https://www.techtarget.com/searchenterpriseai/definition/AI-prompt?utm_source=chatgpt.com
[Wang et al., 2022] Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, Denny Zhou , Self-Consistency Improves Chain-of-Thought Reasoning in Language Models, March 2023
https://arxiv.org/abs/2203.11171
