> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cassidyai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Knowledge Base

> Search your Cassidy Knowledge Base for relevant information and optionally generate an AI-powered answer.

Search your [Knowledge Base](/knowledge-base/overview) for information relevant to a query. Use this to retrieve company knowledge within a Workflow — either as raw search results or as an AI-generated answer with citations.

<Steps>
  <Step title="Add the action">
    In the Workflow builder, click **+** between blocks and select **Search Knowledge Base** from the action library.

    <Frame>
      <img src="https://mintcdn.com/cassidy/ETDpmcHPDhtRlAWy/images/reference/search-knowledge-base-img-0.png?fit=max&auto=format&n=ETDpmcHPDhtRlAWy&q=85&s=6c47b14550629cdcf8dd12534e3365a1" alt="Action library with Search Knowledge Base selected" width="868" height="432" data-path="images/reference/search-knowledge-base-img-0.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cassidy/ETDpmcHPDhtRlAWy/images/reference/search-knowledge-base-img-1.png?fit=max&auto=format&n=ETDpmcHPDhtRlAWy&q=85&s=b74fe853c4484c93c28af3781bb01ba6" alt="Search Knowledge Base action added to the Workflow" width="914" height="2412" data-path="images/reference/search-knowledge-base-img-1.png" />
    </Frame>
  </Step>

  <Step title="Enter the search query">
    In the **Search Query** field, enter a question or search term. [Reference variables](/guides/prompt-engineering#workflow-prompts) from previous steps or the trigger using **#** to make the query dynamic.

    <Frame>
      <img src="https://mintcdn.com/cassidy/ETDpmcHPDhtRlAWy/images/reference/search-knowledge-base-img-3.png?fit=max&auto=format&n=ETDpmcHPDhtRlAWy&q=85&s=5e72a6c8f577926904f86dabc50c76cb" alt="Search Query field with variable reference" width="886" height="232" data-path="images/reference/search-knowledge-base-img-3.png" />
    </Frame>
  </Step>

  <Step title="Configure advanced settings">
    Expand the advanced settings section to access additional options:

    * **Generate an AI answer** — When on, returns an AI-generated answer using Knowledge Base context. When off, returns a list of summarized search results instead.

    <Frame>
      <img src="https://mintcdn.com/cassidy/ETDpmcHPDhtRlAWy/images/reference/search-knowledge-base-img-4.png?fit=max&auto=format&n=ETDpmcHPDhtRlAWy&q=85&s=b174db8437cd55c9b30d8570041ba133" alt="Generate an AI Answer toggle" width="900" height="170" data-path="images/reference/search-knowledge-base-img-4.png" />
    </Frame>

    * **Show Knowledge Base References** — Controls whether source references appear in the output.

    <Frame>
      <img src="https://mintcdn.com/cassidy/ETDpmcHPDhtRlAWy/images/reference/search-knowledge-base-img-5.png?fit=max&auto=format&n=ETDpmcHPDhtRlAWy&q=85&s=1cea75bfd1fa0d6060c83e20299b0f84" alt="Show Knowledge Base References toggle" width="886" height="132" data-path="images/reference/search-knowledge-base-img-5.png" />
    </Frame>

    * **Result Count** — Select how many search results to retrieve (only applies when **Generate an AI answer** is off).

    <Frame>
      <img src="https://mintcdn.com/cassidy/ETDpmcHPDhtRlAWy/images/reference/search-knowledge-base-img-6.png?fit=max&auto=format&n=ETDpmcHPDhtRlAWy&q=85&s=30b5183ae42a277d8f86e8fec3787f8e" alt="Result Count selector" width="620" height="99" data-path="images/reference/search-knowledge-base-img-6.png" />
    </Frame>
  </Step>

  <Step title="Select the search scope">
    Choose which parts of your Knowledge Base to search. If no scope is selected, the search includes all available content.

    <Frame>
      <img src="https://mintcdn.com/cassidy/ETDpmcHPDhtRlAWy/images/reference/search-knowledge-base-img-7.png?fit=max&auto=format&n=ETDpmcHPDhtRlAWy&q=85&s=298b6f947ae5c55cadace565e41672e0" alt="Search scope selector showing Knowledge Base folders" width="636" height="653" data-path="images/reference/search-knowledge-base-img-7.png" />
    </Frame>
  </Step>
</Steps>

When **Generate an AI answer** is on, the output is a single AI-generated response with citations. When it's off, the output is a list of summarized search results:

<Frame caption="Output with Generate an AI answer on">
  <img src="https://mintcdn.com/cassidy/ETDpmcHPDhtRlAWy/images/reference/search-knowledge-base-img-8.png?fit=max&auto=format&n=ETDpmcHPDhtRlAWy&q=85&s=50c053089b4691013c53c7fac738a853" alt="AI-generated answer output with citations" width="906" height="928" data-path="images/reference/search-knowledge-base-img-8.png" />
</Frame>

<Frame caption="Output with Generate an AI answer off">
  <img src="https://mintcdn.com/cassidy/ETDpmcHPDhtRlAWy/images/reference/search-knowledge-base-img-9.png?fit=max&auto=format&n=ETDpmcHPDhtRlAWy&q=85&s=3b424a151e60a607f29bdf3b0ec84efe" alt="Summarized search results output" width="912" height="1138" data-path="images/reference/search-knowledge-base-img-9.png" />
</Frame>

## Related

* [Knowledge Base overview](/knowledge-base/overview)
* [Set up your Knowledge Base](/knowledge-base/setup)
* [Generate Text](/reference/actions/generate-text)
