AGENTFORCE-SPECIALIST practice question 15 of 30

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?

Full set: 298 questions
Answer options
A: Define filters to narrow the search results based on specific conditions. Correct answer
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.
Correct Answer:
A. Define filters to narrow the search results based on specific conditions.
Explanation

The primary issue is that the custom retriever is returning too many irrelevant results, which negatively impacts the quality of the AI-generated responses. The most direct and effective way to address this is by refining the retrieval process. Defining filters allows Universal Containers to apply specific conditions and constraints to the search query. This ensures that the retriever only fetches data that meets the specified criteria (e.g., specific record types, statuses, or date ranges), thereby increasing the relevance of the data provided to the large language model (LLM) and improving the final response's accuracy.

Why Incorrect

B. Change the search index to a different data model object (DMO). This is an excessive step. It should only be considered if the entire data source is incorrect, whereas the problem is about irrelevant results within the current source.
C. Increase the maximum number of results returned to capture a broader dataset. This would worsen the problem. Increasing the volume of results without improving relevance would introduce more "noise," making it even harder for the AI to generate a useful response.

References

1. Salesforce Help, Prompt Builder, "Ground Prompts with Salesforce Data": The documentation on grounding prompts with Salesforce data explicitly details the use of filters to refine the data set. It states, "To narrow down the records that the prompt template can access, add filters... Filtering makes your prompt template more specific and returns more relevant results." This directly supports using filters to improve relevance.

2. Salesforce Developer Documentation, Apex Developer Guide, "SOQL and SOSL Queries," Section: "WHERE Clause Syntax": A custom retriever is often built using Apex and SOQL. The WHERE clause is the fundamental filtering mechanism in SOQL to "specify the conditions that the retrieved records must meet." Implementing or refining this clause in the custom retriever's query is the technical solution for this problem.

3. Salesforce Help, Data Cloud, "Data Cloud-Powered Search": When configuring search within Data Cloud, which is often the source for retrievers, filtering is a key feature. The documentation explains that applying filters to search criteria is essential for "narrowing the scope of the search to return only the most relevant records" to be used as context for AI.

Scroll to Top