nerdexam
Salesforce

AI-201 · Question #182

Universal Containers wants to incorporate CRM data as well-formatted JSON in a prompt to a large language model (LLM). What is an important consideration for this requirement?

The correct answer is B. Apex code can be used to return a JSON formatted merge field.. Prompt Builder does not have a native 'CRM data to JSON' checkbox or a JSON format setting in its UI. The supported way to inject structured JSON into a prompt template is to write an Apex class that queries CRM data, formats it as a JSON string, and exposes it as a custom merge

AI Features for Service (e.g., Einstein Bots, Next Best Action)

Question

Universal Containers wants to incorporate CRM data as well-formatted JSON in a prompt to a large language model (LLM). What is an important consideration for this requirement?

Options

  • A"CRM data to JSON" checkbox must be selected when creating a prompt template.
  • BApex code can be used to return a JSON formatted merge field.
  • CJSON format should be enabled in Prompt Builder Settings.

How the community answered

(27 responses)
  • A
    11% (3)
  • B
    81% (22)
  • C
    7% (2)

Explanation

Prompt Builder does not have a native 'CRM data to JSON' checkbox or a JSON format setting in its UI. The supported way to inject structured JSON into a prompt template is to write an Apex class that queries CRM data, formats it as a JSON string, and exposes it as a custom merge field in the prompt template. When the prompt is rendered, Apex executes, returns the JSON string, and it is injected inline into the prompt text sent to the LLM. This approach gives full control over the JSON structure and allows complex, nested data representations that native merge fields cannot produce.

Topics

#LLM Prompts#CRM Data Integration#JSON Formatting#Apex Code

Community Discussion

No community discussion yet for this question.

Full AI-201 Practice