---
schema_version: "1"
id: f50439c341a909231937623caae17c80dc4ec9ba665f76763ab4b7420dc96535
title: Generate Tests from Knowledge Sources
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agent_testing_center_knowledge_sources.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agent_testing_center_knowledge_sources.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 4c891c2560367ba1f6f1256263f09ca825f5b3396674849d344ed82c09131da4
description: When your agent is connected to an Agentforce Data Library, you can generate test scenarios directly from the content linked to that library including articles and knowledge fields or uploaded files. Testing center generates up to 100 question-and-answer style test cases based on the knowledge content available to the agent.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Generate Tests from Knowledge Sources

When your agent is connected to an Agentforce Data Library, you can generate test scenarios directly from the content linked to that library including articles and knowledge fields or uploaded files. Testing center generates up to 100 question-and-answer style test cases based on the knowledge content available to the agent.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;"><a name="agent_testing_center_knowledge_sources__image_ewv_dvs_c3c"><!-- --></a>
              <div><img id="agent_testing_center_knowledge_sources__image_ewv_dvs_c3c" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/resources/images/checkmark.png" alt="green checkmark"></div>
              <p style="margin-bottom:0;"><strong>This article applies to:</strong></p>
            </td>

            <td class="slds-cell-wrap" style="vertical-align:top;">Legacy Agentforce Testing Center in Setup</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;"><a name="agent_testing_center_knowledge_sources__image_qxv_cvs_c3c"><!-- --></a>
              <div><img id="agent_testing_center_knowledge_sources__image_qxv_cvs_c3c" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/resources/images/crossmark.png" alt="red crossmark"></div>
              <p style="margin-bottom:0;"><strong>This article doesn’t apply to:</strong></p>
            </td>

            <td class="slds-cell-wrap" style="vertical-align:top;">New Testing Center in Agentforce Studio (Beta)</td>

          </tr>
        </tbody>
      </table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions. <a href="https://help.salesforce.com/s/articleView?id=ai.agent_setup_explore_types.htm&amp;release=264.0.0&amp;type=5" title="Learn about agent types and default templates for specific clouds and common use cases.">Required add-on licenses vary by agent type.</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d24505e123">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d24505e123 ">To create tests in the Testing Center:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d24505e123 ">Manage AI Agents AND <a href="https://help.salesforce.com/s/articleView?id=ai.agent_setup_explore_types.htm&amp;type=5&amp;language=en_US" target="_blank">the required permissions for your agent
                type</a></td>

          </tr>
        </tbody>
      </table>

1. To create test cases from your knowledge, select **Generate test cases based on knowledge available to this agent**.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_note.png)
    
    Note You can generate tests only for agents connected to data libraries based on knowledge articles and fields or file uploads. Agents connected to data libraries based on custom retrievers or web sources aren't supported.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_note.png)
    
    Note Test cases are drafted in the Agentforce Agent's default language. For supported languages, see [Considerations for Testing Center](https://help.salesforce.com/s/articleView?id=ai.agent_testing_center_considerations.htm&type=5&language=en_US).
2. Specify how many test cases you want to generate. You can generate up to 100 test cases at a time.
3. Enter a description to help guide the AI model about the purpose and scope of your testing. Click **Next**.
    
    **How does the test description influence my tests?**
    
    The test description is included in the prompt and helps guide how your test cases are generated by defining the focus or theme of the test. Keywords and phrases in the description help narrow the domain of information the tests are built around, which is especially useful when your agent uses multiple sources like articles or PDFs.
    
    While you can’t customize the format or complexity of the tests in the description, the more clearly you define the focus using relevant terms and phrases, the more targeted your test cases will be. Although perfect grammar isn’t required, writing it out in complete sentences can help both the AI and human reviewers better understand your intent and improve the relevance of the output.

#### See Also

- [Agentforce Data Library](https://help.salesforce.com/s/articleView?id=ai.data_library_parent.htm&release=264.0.0&type=5 "Improve accuracy, add personalization, and build trust in gen AI responses when you assign data libraries to your Agentforce features. Agentforce Data Library uses grounding to index your knowledge articles and fields, your file uploads, or web sources, so that AI agents know which information to base responses on. With this index, AI agents can ensure the accuracy of LLM responses against your organization’s information so that you get the best results.")