Prompt Engineering20% of the exam
Writing effective prompt template instructions
The documented best practices for prompt template text: a role with a goal, an Instructions: section in triple quotes, explicit format and length, one consistent plain-language style, an instruction to generate only the content, staying inside the grounded data, and iterating with real records and user feedback.
Explain how to implement best practices for writing effective prompts.
~8 min read · 8 practice questions ·
What the exam expects
- Apply the documented best practices when writing a prompt template: role and goal, a clear task, delimited instructions, output format and length, and one consistent style.
- Diagnose a bad response (generic text, process narration, echoed instructions, inconsistent tone, invented facts) and pick the prompt change that fixes it.
- Reduce hallucination with instructions that keep the model inside the grounded data and handle missing values.
- Explain why plain, concise wording beats copied jargon, and why you start from example templates and iterate with real records and user feedback.
- Key terms: prompt instructions (the natural-language task description in the template); grounding (adding relevant Salesforce data so the response isn't generic); delimiter (the
Instructions:line plus triple quotes that separates directions from context); hallucination (a response with false information not in any source); meta-commentary (text about how the model wrote the content instead of the content itself).
Key facts
Role play
- Detail
- Ask the LLM to play a character, then define that character's goal
Instructions delimiter
- Detail
Instructions:on a separate line, directions surrounded by triple quotes
Stopping process narration
- Detail
- Instruct the LLM to generate only the expected type of content
Wording
- Detail
- Concise, natural language; avoid industry jargon and technical terms
Style
- Detail
- Choose one style and stick to it for consistent responses
Starting point
- Detail
- A template from the Example Prompt Template Library, customized
Refinement loop
- Detail
- Try variations of the template and get end-user feedback
Variability
- Detail
- Every run is a new LLM call, so the same prompt can return different responses
Repeated merge fields
- Detail
- Can lead to inconsistent results
Template description
- Detail
- Shown in the Setup template list, not part of the prompt
- Why wrap directions in triple quotes under an `Instructions:` line?
- When is assigning a role with a goal a documented fix?
- Why can the same prompt return different text on two runs?
- Which two practices does Salesforce recommend for a team writing its first templates?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the Agentforce Specialist pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 26 lessons of the Agentforce Specialist guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Inline practice questions and one-click topic practice (8 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Unlimited timed practice exams