A Salesforce tutorial-style video explaining prompt engineering: what prompts are, why clarity and context matter, and how Salesforce PromptBuilder enables low-code creation of reusable, dynamic prompts by injecting CRM/business data. It covers practical guidance (voice/style, including/excluding details, examples of good outputs), the need for iterative testing, and choosing appropriate models — all framed around improving business outcomes like personalized promotions.
Chapters
What is Prompt Engineering? Prompt engineering is the art of skillfully crafting questions or instructions called prompts to guide AI, ensuring it produces the most accurate and useful response. There are countless examples of ways generative AI can improve business. For example, having AI generate a tailored promotion for a customer based on a product they've shown interest in. Behind this and every generative AI result is a prompt. We create these prompts in PromptBuilder, our low code tool that makes prompts engineering accessible to Salesforce admins and developers. We start by providing the instructions we're asking the LLM to get our desired response. Let's try and recreate what we just saw first. Whose voice or style should this prompt be written as and what is the purpose of this prompt? Clarity is important because LLMs have vast data at their disposal, but they need context, which we can provide through a well crafted prompt. Just like interacting with humans, the more clear and descriptive the instructions are, the better the response. It's also important to include any information it should take into consideration. Since we're writing a promotional newsletter, it would be a good idea to provide the details of the bike. The beauty of LLMs are is that they don't require our language formalities and appreciate a much more concise form of input. So let's list out some bike details we'd like the prompt to include. The problem is that adding these static descriptors limits this prompt to a single bike model. Salesforce enables prompts to be dynamic. This involves injecting the prompt with CRM and business data so it has the necessary context about me, my business, and my customer. This helps the prompts to be reusable based on the running user and the selected bike, which hydrates the prompt with the relevant data. Prompt engineering requires setting strong guidelines to produce a better result, such as providing clear instructions of what an ideal outcome is and even going as far as to provide examples of what good looks like. It can also be just as important to instruct the prompt on what not to include as it is to be descriptive of what to include in order to get optimal results. Keep in mind, prompt engineering involves a bit of experimentation. AI is unpredictable, so for any given prompt, the response is always going to vary to some degree. Salesforce makes refining the prompt simple by providing the resolution and responses to test the prompts to get better results. It's a dynamic process that requires creativity and an understanding of the model's capabilities. Finally, take into account that model selection matters too, because different models are trained on different data, which means that the same prompt will generate different results depending on the model being used. What's important is that Salesforce is flexible, so the right model can be chosen for the right prompt. At the end of the day, prompt engineering isn't just about getting responses, it's about optimizing for business outcomes. Strategically framing prompts ensures that they produce targeted and valuable insights, elevating the user experience and ultimately driving better business outcomes. After all, mastering prompt engineering is the key to unlocking the full potential of AI.