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

# Knowledge base

This tool performs a RAG search on selected items that have been uploaded to the knowledge base.

Parameters:

* `Query`: the knowledge base search query.
* `Uploaded materials`: The materials the query is searched against. Click the paperclip icon to upload docs from your local machine. Or click the `Uploaded materials` button to select existing materials. If you want ALL existing uploaded materials to be searched, leave this parameter blank.

Advanced parameters:

* `Max tokens`: Upper bound on how many tokens from retrieved knowledge are allowed into the model context.
* `Max section count`: Maximum number of distinct KB chunks/sections retrieved and injected.

Returns:

* `content`: the content returned by the knowledge base.
* `contentLength`: the length of the content returned by the knowledge base.
* `contentPresent`: returns stringified boolean if content was returned by search query.
