Loading
Prepare for Email to Become the Default Login ExperienceRead More
Agentforce and Einstein Generative AI
Troubleshoot Prompt Builder

Troubleshoot Prompt Builder

Solve common prompt template issues.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, and Unlimited Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations

My preview or test fails with an error.

If you click Preview and an error appears, such as Internal Server Error, then check these items before you contact Salesforce Customer Support.

  • Confirm that Prompt Builder is included with your Salesforce edition and add-ons. Supported editions appear at the top of this page.
  • Confirm that Einstein is turned on. From Setup, in the Quick Find box, enter Einstein Setup, and then select Einstein Setup. Learn more about enabling Prompt Builder.
  • Confirm that you’re assigned the Prompt Template Manager or Prompt Template User permission set, and that the permission set includes Execute Prompt Templates. Learn more about enabling Prompt Builder.
  • If you verified Einstein, licenses, and permissions and the error continues, then wait a few minutes and try again. The issue is often a temporary service interruption. Check Salesforce Trust before you create a support case.

My prompt template works in Preview but fails when used in an agent.

A prompt template can generate a response in Prompt Builder and still fail when the same template is called from Agentforce Builder or runs in an agent conversation. The agent can pass different input values than the ones you selected in Preview.

My structured response has missing or blank fields when the Einstein Trust Layer is on.

When the Einstein Trust Layer is on and you use Structured Outputs to generate a JSON response, some fields can come back empty or null. The Einstein Trust Layer masks personal information, such as names or email addresses, before it sends the prompt to the AI model. If a field isn’t restored after the response returns, then it can appear blank.

In the Response section, open Masking Details and note which fields were masked and whether they contain personally identifiable information. Masked personal information is the most common cause. Learn more about Structured Outputs. To review masking settings, see Einstein Trust Layer Settings.

My prompt template doesn’t use the running user’s data access.

If a template returns data that a user shouldn’t see, or omits data that they should see, then add an Apex or flow action that filters records before that data is grounded in the prompt template. Learn more about adding an action.

My file is too large to use for grounding.

Files used for grounding are limited to 15 MB per request, and most models support at least one file type. If your file exceeds the limit, then split it into smaller files or summarize the content before you upload it as a grounding source. Unsupported files are excluded from the request and listed in the Resolution panel. Learn more about Prompt Builder limits. Learn more about grounding with file inputs.

The Object field is missing.

Whether you see the Object field depends on the prompt template type.

If you expected to see Object immediately and you don’t, then confirm which template type you’re creating.

I get inconsistent results from the same prompt template.

Prompt templates use a large language model (LLM). AI models don’t always return the same response for the same inputs, so results can vary across runs. Templates that use retrievers for classification-style tasks can also fail to parse a response as valid JSON.

I get an error while resolving data providers.

If you see an error such as Error occurred while resolving data providers; cannot describe data provider, then an action in the Resources tab is missing, misconfigured, or unavailable. In Prompt Builder, these resources are called actions. They include flow, Apex, and retriever actions.

  • Open the Resources tab and review each action. Confirm that the referenced flow, Apex class, or retriever still exists and that you have access to it. Learn more about adding an action.
  • If you recently renamed, deleted, or deactivated a flow or class, then update or replace the action in the prompt template, and save and preview again.

I can’t delete an input.

You can’t delete an input that’s still referenced by an action. In the Resources tab, remove or update the flow, Apex, or retriever action that uses the input. Then delete the input. Learn more about adding an input.

My resources or flows are missing after I save and activate.

After you save and activate, confirm that you’re viewing the version that contains your resources. Activating a template version makes that version immutable, so it can’t be edited.

My prompt template fails to save.

Save-time validation fails when a merge field, action, or required input isn’t valid.

My response is masked, flagged for harmful content, or cut off.

The Einstein Trust Layer scans prompt template responses for toxic language. When toxic language is detected, the harmful content badge appears in the Response section with a warning count. Revise the prompt template and preview again until the warning count returns to 0. Learn more about harmful content notifications.

If the response is cut off, then the resolved prompt can exceed what the AI model accepts. When a prompt is too large, Prompt Builder can generate a summary in the Resolution panel. Use the summarized prompt or shorten the template. Learn more about working with large prompts.

Masked values in the response are expected when the Einstein Trust Layer replaces sensitive data with placeholders and then restores them. Open Masking Details in the Response section to inspect the mapping. Learn more about data trust and masking.

I need to document and debug my prompt templates.

Prompt Builder doesn’t support inline comments in the template body. Use versions to compare changes, and keep a short record of what you changed in each version.

 
Loading
Salesforce Help | Article