Prompt Engineering Techniques | 提示词工程技巧(练习操作步骤)

《Prompt Engineering Techniques | 提示词工程技巧》的分步练习操作指南。...

📅 2026/10/2 ✍️ ponybai 🏷️ agentforce, salesforce, ai

本文是《Prompt Engineering Techniques | 提示词工程技巧》的练习操作步骤。阅读原文请见:Prompt Engineering Techniques | 提示词工程技巧。

1. Sign Up for a Developer Edition Org

  1. Sign up for a free [Developer Edition org with Agentforce](https://trailhead.salesforce.com/promo/orgs/agentforce-for-trailhead).
  2. Fill out the form, click Sign me up, open the activation email, and click Verify Account.
  3. Connect the org to Trailhead: Connect Org, sign in, Allow, then Yes! Save it.

2. Set Up Agentforce

  1. Click the gear icon and select Setup.
  2. Search for and select Einstein Setup, and ensure the Turn on Einstein toggle is On; refresh.
  3. Search for and select Agentforce Agents, and ensure the Agentforce toggle is On.

3. Create a Zero-Shot Prompt Template

  1. Search for and select Prompt Builder, then New Prompt Template.
  2. Type Flex, Name Generate Sample Email, API Generate_Sample_Email, Description Creates a basic email template., then Next.
  3. Paste the provided zero-shot instruction into the Prompt text area.
  4. Click Preview Settings and, under Inputs, select Burlington Textiles Corp of America for Customer Account.
  5. Click Save & Preview and review the Resolved Prompt and Generated Response.

4. Edit the Prompt with Few-Shot Examples

  1. Click Prompt to return to your prompt.
  2. Replace the text with the provided few-shot prompt.
  3. Click Save & Preview and review the improved response.

5. Create a Chain-of-Thought Prompt Template

  1. Click the back arrow to return to Prompt Builder Setup, then New Prompt Template.
  2. Type Einstein AI-Generated Search Answers, Name Resort Package Names, API Resort_Package_Names, Description Generates package names for Coral Cloud resort offerings based on the provided details., then Next.
  3. Click Preview Settings and enter: Query Generate 5 Package names, plus private villas, beachside dining, family-friendly atmosphere.
  4. Paste the provided prompt text and click Save and Preview.
  5. Review the generated package names in the Response.

6. Add Chain-of-Thought Instructions

  1. Click Prompt to return to your prompt.
  2. Replace the prompt text with the provided chain-of-thought prompt (including "explain your thought process for each package step-by-step").
  3. Keep the query and chunks the same.
  4. Click Save & Preview and review the updated response with reasoning.