Salesforce Decode
Salesforcedecode
Back to questions
AgentforceAdvancedprompt-engineeringguardrailscompliancefsc

Explain prompt engineering guardrails for financial services compliance

Real World Scenario

A wealth management firm deploys Agentforce for client inquiries about portfolio performance and tax documents. Regulators require that agents never provide personalized investment advice without advisor review.

Expected Answer

• Define system instructions that explicitly prohibit investment recommendations and require disclaimer language • Use topic classification to block or redirect advice-seeking intents to human advisors • Configure data grounding to only retrieve approved FAQ and document summaries—not raw account data for inference • Implement output filters for prohibited phrases, ticker symbols with buy/sell language, and performance guarantees • Log every prompt, retrieved context chunk, and response for FINRA/SEC audit trails • Separate read-only informational actions from write actions requiring elevated approval flows • Run red-team test suites with adversarial prompts before each production release

Follow-Up Questions & Answers

Click to expand — each follow-up includes a direct, interview-ready answer

Handle it in layers. First: Define system instructions that explicitly prohibit investment recommendations and require disclaimer language. If that fails: Use topic classification to block or redirect advice-seeking intents to human advisors. For edge cases in "How would you handle a user jailbreak attempt aski…", Configure data grounding to only retrieve approved FAQ and document summaries—not raw account data for inference. Compliance guardrails must be defense-in-depth: instructions alone fail under adversarial pressure. Optimize for scale and operational observability.

Architect Perspective

Compliance guardrails must be defense-in-depth: instructions alone fail under adversarial pressure. Combine topic boundaries, retrieval constraints, output validation, and human escalation. Treat the agent as an untrusted presentation layer over governed data sources.