SALESFORCE AGENTFORCE

salesforce agentforce Practice Questions & Answers (Set 1) | CodeWme

📝 Instructions: Read the hint to know if you need to select one or multiple options.

#1 Universal Containers (UC) users are complaining that agent answers are not satisfactory. The agent is using PDF files as a knowledge source. How should UC troubleshoot this issue? Select 1

A. Analyze the data mapping between source fields and Data Cloud object fields.
B. Check that the agent has the PDF file field permission access for the data library.
C. Verify the retriever's filter criteria and data source connection.

✅ Answer: Verify the retriever's filter criteria and data source connection.


Explanation:
Why is "Verify the retriever's filter criteria and data source connection" the correct answer? If agent answers are not satisfactory when using PDF files as a knowledge source, the issue is likely caused by: Retriever misconfiguration If filters are too broad or too restrictive, AI may fail to find relevant information. Checking filter logic and retrieval scope helps improve accuracy. Incorrect data source connection If the retriever is not properly linked to the PDF storage location, it may fail to retrieve relevant information. Ensuring a stable connection between Salesforce Data Cloud and the retriever prevents retrieval failures. Parsing Issues with PDF Files If PDFs are not properly indexed, AI may struggle to extract relevant content. Ensuring structured document formatting improves AI comprehension. Why Not the Other Options? # A. Analyze the data mapping between source fields and Data Cloud object fields. Incorrect because data mapping issues primarily affect structured CRM data, not PDF-based knowledge sources. The issue likely stems from retrieval settings, not field mapping. # B. Check that the agent has the PDF file field permission access for the data library. Incorrect because permission access issues would prevent AI from accessing PDFs entirely rather than causing poor response quality. AI can still generate responses, even if they are inaccurate, which means the issue lies in retriever settings, not permissions. Agentforce Specialist References Salesforce AI Specialist Material details how retriever filters and data sources impact AI-generated answers. Salesforce Certification Guide mentions the importance of verifying retriever configurations for accurate knowledge retrieval.

#2 An Agentforce is creating a custom action for Agentforce. Which setting should the Agentforce Specialist test and iterate on to ensure the action performs as expected? Select 1

A. Action Name
B. Action Input
C. Action Instructions

✅ Answer: Action Instructions


Explanation:
When creating a custom action for Einstein Bots in Salesforce (including Agentforce), Action Instructions are critical for defining how the bot processes and executes the action. These instructions guide the bot on the logic to follow, such as API calls, data transformations, or conditional steps. Testing and iterating on the instructions ensures the bot understands how to handle dynamic inputs, external integrations, and decision-making. Salesforce documentation emphasizes that Action Instructions directly impact the bot's ability to execute workflows accurately. For example, poorly defined instructions may lead to incorrect API payloads or failure to parse responses. The Einstein Bot Developer Guide highlights that refining instructions is essential for aligning the bot's behavior with business requirements. In contrast: Action Name (A) is a static identifier and does not affect functionality. Action Input (B) defines parameters passed to the action but does not dictate execution logic. Thus, iterating on Action Instructions (C) ensures the action performs as expected.

#3 An Agentforce needs to create a Sales Email with a custom prompt template. They need to ground on the following data. Opportunity Products Events near the customer Tone and voice examples How should the Agentforce Specialist obtain related items? Select 1

A. Call prompt initiated flow to fetch and ground the required data.
B. Create a flex template that takes the records in question as inputs.
C. Utilize a standard email template and manually insert the required data fields.

✅ Answer: Call prompt initiated flow to fetch and ground the required data.


Explanation:
To ground a sales email on Opportunity Products, Events near the customer, and Tone and voice examples, the Agentforce Specialist should use a prompt-initiated flow. This flow can dynamically fetch the necessary data from related records in Salesforce and ground the generative AI output with contextually accurate information. Option B (flex template) does not provide the ability to fetch dynamic data from Salesforce records automatically. Option C (manual insertion) would not allow for the dynamic and automated grounding of data required for custom prompts. Refer to Salesforce documentation on flows and grounding for more details on integrating data into custom prompt templates.

#4 What should Universal Containers consider when deploying an Agentforce Service Agent with multiple topics and Agent Actions to production? Select 1

A. Deploy agent components without a test run in staging, relying on production data for reliable results. Sandbox configuration alone ensures seamless production deployment.
B. Ensure all dependencies are included, Apex classes meet 75% test coverage, and configuration settings are aligned with production. Plan for version management and post-deployment activation.
C. Deploy flows or Apex after agents, topics, and Agent Actions to avoid deployment failures and potential production agent issues requiring complete redeployment.

✅ Answer: Ensure all dependencies are included, Apex classes meet 75% test coverage, and configuration settings are aligned with production. Plan for version management and post-deployment activation.


Explanation:
Comprehensive and Detailed In-Depth Explanation:UC is deploying an Agentforce Service Agent with multiple topics and actions to production. Let's assess deployment considerations. Option A: Deploy agent components without a test run in staging, relying on production data for reliable results. Sandbox configuration alone ensures seamless production deployment.Skipping staging tests is risky and against best practices. Sandbox configuration doesn't guarantee production success without validation, making this incorrect. Option B: Ensure all dependencies are included, Apex classes meet 75% test coverage, and configuration settings are aligned with production. Plan for version management and post-deployment activation.This is a comprehensive approach: dependencies (e.g., flows, Apex) must be deployed, Apex requires 75% coverage, and production settings (e.g., permissions, channels) must align. Version management tracks changes, and post-deployment activation ensures controlled rollout. This aligns with Salesforce deployment best practices for Agentforce, making it the correct answer. Option C: Deploy flows or Apex after agents, topics, and Agent Actions to avoid deployment failures and potential production agent issues requiring complete redeployment.Deploying components separately risks failures (e.g., actions needing flows failing). All components should deploy together for consistency, making this incorrect. Why Option B is Correct:Option B covers all critical deployment considerations for a robust Agentforce rollout, as per Salesforce guidelines. References: Salesforce Agentforce Documentation: Deploy Agents to Production – Lists dependencies and coverage. Trailhead: Deploy Agentforce Agents – Emphasizes testing and activation planning. Salesforce Help: Agentforce Deployment Best Practices – Confirms comprehensive approach.

#5 Universal Containers' Agent Action includes several Apex classes for the new Agentforce Agent. What is an important consideration when deploying Apex that is invoked by an Agent Action? Select 1

A. The Apex classes must have at least 75% code coverage from unit tests, and all dependencies must be in the deployment package.
B. Apex classes invoked by an Agent Action may be deployed with less than 75% test coverage as long as the agent is not activated in production.
C. The Apex classes may bypass the 75% code coverage requirement as long as they are only used by the agent.

✅ Answer: The Apex classes must have at least 75% code coverage from unit tests, and all dependencies must be in the deployment package.


Explanation:
Comprehensive and Detailed In-Depth Explanation:Universal Containers (UC) is using Apex classes within an Agent Action for their Agentforce Agent. Deploying Apex in Salesforce has specific requirements, especially when tied to Agentforce functionality. Let's evaluate the options. Option A: The Apex classes must have at least 75% code coverage from unit tests, and all dependencies must be in the deployment package.Salesforce enforces a strict requirement that all Apex classes must achieve at least 75% code coverage from unit tests for deployment to production, regardless of their use case (e.g., Agentforce, triggers, or web services). Additionally, when Apex is invoked by an Agent Action (e.g., via a Flow or direct invocation), all dependencies (e.g., referenced classes, objects) must be included in the deployment package to ensure functionality. This is a standard deployment consideration in Salesforce and applies to Agentforce, making this the correct answer. Option B: Apex classes invoked by an Agent Action may be deployed with less than 75% test coverage as long as the agent is not activated in production.Salesforce's 75% code coverage requirement is mandatory for production deployment, regardless of whether the agent is activated. There's no exemption based on activation status—coverage is enforced at the deployment stage. This option is incorrect and contradicts Salesforce's Apex deployment rules. Option C: The Apex classes may bypass the 75% code coverage requirement as long as they are only used by the agent.No such bypass exists in Salesforce. The 75% code coverage rule applies universally to all Apex in production, including classes used by Agentforce. Agent-specific usage doesn't waive this requirement, making this incorrect. Why Option A is Correct:The 75% code coverage requirement and inclusion of dependencies are fundamental Salesforce deployment rules, applicable to Apex in Agent Actions. This ensures reliability and functionality in production, as per official documentation. References: Salesforce Agentforce Documentation: Agent Builder > Custom Actions > Apex – Notes standard Apex deployment rules apply. Salesforce Developer Guide: Apex Testing – Confirms 75% coverage requirement. Trailhead: Deploy Apex Code – Emphasizes coverage and dependencies for production.

#6 After creating a foundation model in Einstein Studio, which hyperparameter should An Agentforce use to adjust the balance between consistency and randomness of a response? Select 1

A. Presence Penally
B. Variability
C. Temperature

✅ Answer: Temperature


Explanation:
The Temperature hyperparameter controls the randomness of model outputs: Low Temperature (e.g., 0.2): More deterministic, consistent responses. High Temperature (e.g., 1.0): More creative, varied responses. Presence Penalty (Option A): Discourages repetition of tokens, unrelated to randomness. Variability (Option B): Not a standard hyperparameter in Einstein Studio. References: Einstein Studio Documentation: Model Hyperparameters Explicitly states "Temperature adjusts the balance between predictable and random outputs."

#7 Universal Containers (UC) implements a custom retriever to improve the accuracy of AI-generated responses. UC notices that the retriever is returning too many irrelevant results, making the responses less useful. What should UC do to ensure only relevant data is retrieved? Select 1

A. Define filters to narrow the search results based on specific conditions.
B. Change the search index to a different data model object (DMO).
C. Increase the maximum number of results returned to capture a broader dataset.

✅ Answer: Define filters to narrow the search results based on specific conditions.


Explanation:
Comprehensive and Detailed In-Depth Explanation:In Salesforce Agentforce, a custom retriever is used to fetch relevant data (e.g., from Data Cloud's vector database or Salesforce records) to ground Al responses. UC's issue is that their retriever returns too many irrelevant results, reducing response accuracy. The best solution is to define filters (Option A) to refine the retriever's search criteria. Filters allow UC to specify conditions (e.g., "only retrieve documents from the ‘Policy' category” or “records created after a certain date”) that narrow the dataset, ensuring the retriever returns only relevant results. This directly improves the precision of Al-generated responses by excluding extraneous data, addressing UC's problem effectively. Option B: Changing the search index to a different data model object (DMO) might be relevant if the retriever is querying the wrong object entirely (e.g., Accounts instead of Policies). However, the question implies the retriever is functional but unrefined, so adjusting the existing setup with filters is more appropriate than switching DMOs. Option C: Increasing the maximum number of results would worsen the issue by returning even more data, including more irrelevant entries, contrary to UC's goal of improving relevance. Option A: Filters are a standard feature in custom retrievers, allowing precise control over retrieved data, making this is the correct action. Option A is the most effective step to ensure relevance in retrieved data. References: Salesforce Agentforce Documentation: "Create Custom Retrievers" (Salesforce Help: https://help.salesforce.com/s/articleView?id=sf.agentforce_custom_retrievers.htm&type=5) Salesforce Data Cloud Documentation: "Filter Data for AI Retrieval" (https://help.salesforce.com/s/articleView?id=sf.data_cloud_retrieval_filters.htm&type=5)

#8 Universal Containers (UC) plans to implement prompt templates that utilize the standard foundation models. What should UC consider when building prompt templates in Prompt Builder? Select 1

A. Include multiple-choice questions within the prompt to test the LLM's understanding of the context.
B. Ask it to role-play as a character in the prompt template to provide more context to the LLM.
C. Train LLM with data using different writing styles including word choice, intensifiers, emojis, and punctuation.

✅ Answer: Ask it to role-play as a character in the prompt template to provide more context to the LLM.


Explanation:
Comprehensive and Detailed In-Depth Explanation:UC is using Prompt Builder with standard foundation models (e.g., via Atlas Reasoning Engine). Let's assess best practices for prompt design. Option A: Include multiple-choice questions within the prompt to test the LLM's understanding of the context.Prompt templates are designed to generate responses, not to test the LLM with multiple-choice questions. This approach is impractical and not supported by Prompt Builder's purpose, making it incorrect. Option B: Ask it to role-play as a character in the prompt template to provide more context to the LLM.A key consideration in Prompt Builder is crafting clear, context-rich prompts. Instructing the LLM to adopt a role (e.g., “Act as a sales expert”) enhances context and tailors responses to UC's needs, especially with standard models. This is a documented best practice for improving output relevance, making it the correct answer. Option C: Train LLM with data using different writing styles including word choice, intensifiers, emojis, and punctuation.Standard foundation models in Agentforce are pretrained and not user-trainable. Prompt Builder users refine prompts, not the LLM itself, making this incorrect. Why Option B is Correct:Role-playing enhances context for standard models, a recommended technique in Prompt Builder for effective outputs, as per Salesforce guidelines. References: Salesforce Agentforce Documentation: Prompt Builder > Best Practices – Recommends role-based context. Trailhead: Build Prompt Templates in Agentforce – Highlights role-playing for clarity. Salesforce Help: Prompt Design Tips – Suggests contextual roles.

#9 Universal Containers' data science team is hosting a generative large language model (LLM) on Amazon Web Services (AWS). What should the team use to access externally-hosted models in the Salesforce Platform? Select 1

A. Model Builder

✅ Answer:


Explanation:
None

#10 How does Secure Data Retrieval ensure that only authorized users can access necessary Salesforce data for dynamic grounding? Select 1

A. Retrieves Salesforce data based on the 'Run As" users permissions.
B. Retrieves Salesforce data based on the user's permissions executing the prompt.
C. Retrieves Salesforces data based on the Prompt template's object permissions.

✅ Answer: Retrieves Salesforce data based on the user's permissions executing the prompt.


Explanation:
Secure Data Retrieval enforces Salesforce's security model by dynamically grounding data access in the permissions of the user executing the prompt. This ensures compliance with CRUD (Create, Read, Update, Delete) and FLS (Field-Level Security) settings, preventing unauthorized access to sensitive data. For example, if a user lacks access to a specific object or field, the AI model cannot retrieve it for dynamic grounding. "Run As" user permissions (A) would bypass user-specific security, posing a compliance risk.

#11 Universal Containers (UC) wants to use Flow to bring data from unified Data Cloud objects to prompt templates. Which type of flow should UC use? Select 1

A. Data Cloud-triggered flow
B. Template-triggered prompt flow
C. Unified-object linking flow

✅ Answer: Data Cloud-triggered flow


Explanation:
In this scenario, Universal Containers wants to bring data from unified Data Cloud objects into prompt templates, and the best way to do that is through a Data Cloud-triggered flow. This type of flow is specifically designed to trigger actions based on data changes within Salesforce Data Cloud objects. Data Cloud-triggered flows can listen for changes in the unified data model and automatically bring relevant data into the system, making it available for prompt templates. This ensures that the data is both real-time and up-to-date when used in generative Al contexts. For more detailed guidance, refer to Salesforce documentation on Data Cloud-triggered flows and Data Cloud integrations with generative AI solutions.

#12 Universal Containers (UC) is Implementing Service AI Grounding to enhance its customer service operations. UC wants to ensure that its AI- generated responses are grounded in the most relevant data sources. The team needs to configure the system to include all supported objects for grounding. Which objects should UC select to configure Service AI Grounding? Select 1

A. Case, Knowledge, and Case Notes
B. Case and Knowledge
C. Case, Case Emails, and Knowledge

✅ Answer: Case and Knowledge


Explanation:
Universal Containers (UC) is implementing Service AI Grounding to enhance its customer service operations. They aim to ensure that AI-generated responses are grounded in the most relevant data sources and need to configure the system to include all supported objects for grounding. Supported Objects for Service AI Grounding: Case Knowledge Case Object: Role in Grounding: Provides contextual data about customer inquiries, including case details, status, and history. Benefit: Grounding AI responses in case data ensures that the information provided is relevant to the specific customer issue being addressed. Knowledge Object: Role in Grounding: Contains articles and documentation that offer solutions and information related to common issues. Benefit: Utilizing Knowledge articles helps the AI provide accurate and helpful responses based on verified information. Exclusion of Other Objects: Case Notes and Case Emails: Not Supported for Grounding: While useful for internal reference, these objects are not included in the supported objects for Service AI Grounding. Reason: They may contain sensitive or unstructured data that is not suitable for AI grounding purposes. Why Options A and C are Incorrect: Option A (Case, Knowledge, and Case Notes): Case Notes Not Supported: Case Notes are not among the supported objects for grounding in Service AI. Option C (Case, Case Emails, and Knowledge): Case Emails Not Supported: Case Emails are also not included in the list of supported objects for grounding.

#13 Based on the user utterance, 'Show me all the customers in New York', which standard Agent action will the planner service use? Select 1

A. Query Records
B. Fetch Records
C. Select Records

✅ Answer: Query Records


Explanation:
Why is Query Records the Correct Answer? In Agentforce, the Planner Service is responsible for interpreting user requests and selecting the appropriate Copilot Action to fulfill them. When a user issues a command like: "Show me all the customers in New York", the system must retrieve a list of customers filtered by location. The Query Records action is designed precisely for this purpose. Key Features of Query Records in Agentforce: Retrieves Data Based on Specific Field Values This action fetches Salesforce records that match a set of criteria, such as customers located in New York. Uses standard or custom object fields (e.g., BillingState = 'New York'). Works with Large Language Models (LLMs) and Copilot Actions When a user asks for filtered data, Query Records is the default action assigned by the Planner Service. Optimized for Structured Data Retrieval

#14 An Agentforce needs to enable the use of Sales Email prompt templates for the sales team. The Agentforce Specialist has already created the templates in Prompt Builder. According to best practices, which steps should the Agentforce Specialist take to ensure the sales team can use these templates? Select 1

A. Assign the Prompt Template User permission set and enable Sales Emails in Setup.
B. Assign the Prompt Template Manager permission set and enable Sales Emails in setup.
C. Assign the Data Cloud Admin permission set and enable Sales Emails in Setup.

✅ Answer: Assign the Prompt Template User permission set and enable Sales Emails in Setup.


Explanation:
To enable Sales Email prompt templates: Permission Set: Assign the Prompt Template User permission set to the sales team to grant access to use pre-built templates. Feature Activation: Enable Sales Emails in Salesforce Setup to activate the integration between prompt templates and email workflows. Option B (Manager permission set): Required for creating/modifying templates, not for usage. Option C (Data Cloud Admin): Unrelated to prompt template access.

#15 An Agentforce is considering using a Field Generation prompt template type. What should the Agentforce Specialist check before creating the Field Generation prompt to ensure it is possible for the field to be enabled for generative AI? Select 1

A. That the field chosen must be a rich text field with 255 characters or more.
B. That the org is set to API version 59 or higher
C. That the Lightning page layout where the field will reside has been upgraded to Dynamic Forms

✅ Answer: That the org is set to API version 59 or higher


Explanation:
Before creating a Field Generation prompt template, the Agentforce Specialist must ensure that the Salesforce org is set to API version 59 or higher. This version of the API introduces support for advanced generative AI features, such as enabling fields for generative AI outputs. This is a critical technical requirement for the Field Generation prompt template to function correctly. Option A (rich text field requirement) is not necessary for generative AI functionality. Option C (Dynamic Forms) does not impact the ability of a field to be generative AI-enabled, although it might enhance the user interface. For more information, refer to Salesforce documentation on API versioning and Field Generation templates.

#16 Universal Containers (UC) is discussing its AI strategy in an agile Scrum meeting. Which business requirement would lead An Agentforce to recommend connecting to an external foundational model via Einstein Studio (Model Builder)? Select 1

A. UC wants to fine-tune model temperature.
B. UC wants a model fine-tuned using company data.
C. UC wants to change the frequency penalty of the model.

✅ Answer: UC wants a model fine-tuned using company data.


Explanation:
Einstein Studio (Model Builder) allows organizations to connect and utilize external foundational models while fine-tuning them with company-specific data. This capability is particularly suited to businesses like Universal Containers (UC) that require customization of foundational models to better align with their unique data and use cases. Option A: Adjusting model temperature is a parameter-level setting for controlling randomness in AI-generated responses but does not necessitate connecting to an external foundational model. Option B: This is the correct answer because Einstein Studio supports fine-tuning external models with proprietary company data, enabling a tailored and more accurate AI solution for UC. Option C: Changing frequency penalties is another parameter-level adjustment and does not require external foundational models or Einstein Studio.

#17 Universal Containers is rolling out a new generative AI initiative. Which Prompt Builder limitations should the Agentforce Specialist be aware of? Select 1

A. Rich text area fields are only supported in Flex template types.
B. Creations or updates to the prompt templates are not recorded in the Setup Audit Trail.
C. Custom objects are supported only for Flex template types.

✅ Answer: Custom objects are supported only for Flex template types.


Explanation:
The Prompt Builder in Salesforce has some specific limitations, one of which is that custom objects are supported only for Flex template types. This means that users must rely on Flex templates to integrate custom objects into their prompts. Option A: While rich text area fields have certain restrictions, this does not pertain to the core limitation of integrating custom objects. Option B: Updates and creations for prompt templates are indeed recorded in the Setup Audit Trail, so this statement is incorrect. Option C: This is the correct answer as it reflects a documented limitation of the Prompt Builder.

#18 Universal Containers (UC) wants to enable its sales team to use Al to suggest recommended products from its catalog. Which type of prompt template should UC use? Select 1

A. Record summary prompt template
B. Email generation prompt template
C. Flex prompt template

✅ Answer: Flex prompt template


Explanation:
Universal Containers (UC) wants to enable its sales team to leverage AI to recommend products from its catalog. The best option for this use case is a Flex prompt template. A Flex prompt template is designed to provide flexible, customizable AI-driven recommendations or responses based on specific data points, such as product information, customer needs, or sales history. This template type allows the AI to consider various inputs and parameters, making it ideal for generating product recommendations dynamically. In contrast: A Record summary prompt template (Option A) is used to summarize data related to a specific record, such as generating a quick summary of a sales opportunity or account, but not for recommending products. An Email generation prompt template (Option B) is tailored for crafting email content and is not suitable for suggesting products based on a catalog. Given the need for dynamic recommendations that pull from a product catalog and potentially other sales data, the Flex prompt template is the correct approach.

#19 Universal Containers (UC) wants to create a new Sales Email prompt template in Prompt Builder using the "Save As" function. However, UC notices that the new template produces different results compared to the standard Sales Email prompt due to missing hyperparameters. What should UC do to ensure the new prompt template produces results comparable to the standard Sales Email prompts? Select 1

A. Use Model Playground to create a model configuration with the specified parameters.
B. Manually add the hyperparameters to the new template.
C. Revert to using the standard template without modifications.

✅ Answer: Manually add the hyperparameters to the new template.


Explanation:
When Universal Containers creates a new Sales Email prompt template using the "Save As" function, missing hyperparameters can result in different outputs. To ensure the new prompt produces comparable results to the standard Sales Email prompt, the Agentforce Specialist should manually add the necessary hyperparameters to the new template. Hyperparameters like Temperature, Frequency Penalty, and Presence Penalty directly affect how the AI generates responses. Ensuring that these are consistent with the standard template will result in similar outputs. Option A (Model Playground) is not necessary here, as it focuses on fine-tuning models, not adjusting templates directly. Option C (Reverting to the standard template) does not solve the issue of customizing the prompt template. For more information, refer to Prompt Builder documentation on configuring hyperparameters in custom templates.