> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Basics: Prompt Elements

> Prompt elements are the building blocks that make your LLM interactions more effective. Think of them as ingredients in a recipe, each one helps the AI understand exactly what you need and how to deliver it. You don't need all four every time, but combining a few will dramatically improve your results.

<CardGroup cols={2}>
  <Card title="Persona" icon="square-1">
    Give the LLM a specific role to play. This could be a **famous expert**, a **job title** relevant to your task, or simply **"the \[topic] agent."** The more specific, the better the AI can adapt its knowledge and tone.
  </Card>

  <Card title="Task" icon="square-2">
    This specifies what you want to achieve with the LLM's help. The more clearly defined the task is, the better the LLM can fulfil the specific task.
  </Card>

  <Card title="Context" icon="square-3">
    Provide the background the AI needs to give you relevant answers. Include **examples**, **detailed explanations**, or **upload documents** that contain the specific information for your use case.
  </Card>

  <Card title="Format" icon="square-4">
    Set rules for the output. Specify **writing style**, **tone**, **length constraints**, or **exact format** (like bullet points, tables, or step-by-step guides).
  </Card>
</CardGroup>

*Example:*

> You are a friendly, helpful onboarding agent 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, these are the prompt elements mentioned above:

**Persona:**
\
`You are a friendly, helpful onboarding agent 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.`
