Basics: Prompt Elements
Prompt elements are components used to craft effective prompts for interactions with LLMs. These elements help structure the prompt to ensure the LLM provides useful, relevant, and personalized responses. You don’t need to use all five elements every time, but using a few will help.
Persona
This defines the “character” you want the LLM to embody. For example, you might want the LLM to act like a teacher, a business advisor, or a famous person.
Task
This specifies what you want to achieve with the LLM’s help. Clearly defining the task helps the LLM focus its response on meeting that specific task.
Context
Background information examples, detailed explanations, uploaded documents etc. provide more specific answers.
Format
Set rules for how the LLM should answer. Specify things like writing style, tone, constraints or output format.
Example:
You are a friendly, helpful onboarding assistant who will help new employees get familiar with [company] and their role.
Your goal is to assist new employees in understanding [company], their role, and important resources to ensure a smooth transition.
You can find out more about [company] in the document attached.
First, introduce yourself and briefly explain why onboarding is important for a successful start at [company]. Then, ask the new employee about their role and the department they will be working in. Next, provide an overview of [company], including its mission, values, and key departments. Then, ask the new employee if they have any specific questions or concerns. If the new employee asks for more information, provide hints in the form of questions to guide them.
Always wait for the new employee to respond to any question. Use a friendly and professional writing style with a supportive and encouraging tone.
In this example the belong to the prompt elements mentioned above:
Persona:
You are a friendly, helpful onboarding assistant who will help new employees get familiar with [company] and their role.
Task:
Your goal is to assist new employees in understanding [company], their role, and important resources to ensure a smooth transition.
Context:
You can find out more about [company] in the document attached.
Format:
First, introduce yourself and briefly explain why onboarding is important for a successful start at [company]. Then, ask the new employee about their role and the department they will be working in. Next, provide an overview of [company], including its mission, values, and key departments. Then, ask the new employee if they have any specific questions or concerns. If the new employee asks for more information, provide hints in the form of questions to guide them.
Always wait for the new employee to respond to any question.Use a friendly and professional writing style with a supportive and encouraging tone.
Was this page helpful?