Prompt Templates should not be excessively long

Impact Area

Manageability

 

Severity

Medium

 

Affected Element

Prompt Templates:

GenAiPromptTemplate

Rule ID #

AVOID-TOO-SHORT-PROMPT

Description #

Prompt Templates in Salesforce should not be excessively long to maintain efficiency and clarity.

Impact #

Overly long Prompt Templates can lead to performance issues, increased processing time, and higher API costs. They may also introduce unnecessary complexity, making them harder to manage, debug, and optimize. Additionally, long prompts may reduce the effectiveness of LLM responses due to diluted intent and focus.

Remediation #

Keep Prompt Templates concise. Focus on clear, direct instructions while avoiding redundant or overly detailed text. If additional context is required, consider restructuring the prompt or breaking it into multiple steps.

Time to fix

30 min

Was it helpful ?

THE AI CODE GOVERNANCE BRIEF

Sign up for new updates!