Semantic search#

Searches relevant chunks by semantic similarity and, if needed, reranks candidates with the BGE reranker.

If neither FileGuids nor FolderGuids is set, the search covers account folders excluding chat folders. To search chat files, specify their file or folder GUIDs explicitly. An administrator can restore the previous all-folder behavior by setting FILE_SEARCH_INCLUDE_CHAT_FOLDERS=1 in the Sherpa AI Server .env file and recreating the container.

TextForSearch*[Text] Required search query.
NTop[Number] Number of results from 1 to 100. Default value is 5.
FileGuids[Array] Optional restriction to specific files.
FolderGuids[Array] Optional restriction to specific folders.
EnableSubfoldersInclude subfolders of the selected folders.
UseRerankApply the built-in BGE reranker to the found candidates.
Timeout[Number] HTTP request timeout in seconds. Default value is 60.
ListChunks[Array] Found chunks with file data, search metrics, and rerank result.
Processing level

Choose the error processing level.

Possible values:

  • "Default" - default;
  • "Ignore" - errors are ignored;
  • "Handle" - errors are handled.

If "Default" is selected, the value from the "Start" block of this diagram is used.

Message level

Choose the level of messages output by blocks while they run.

Possible values:

  • "Default" - default;
  • "Release" - output disabled;
  • "Debug" - main information output;
  • "Detailed" - detailed information output.

If "Default" is selected, the value from the "Start" block of this diagram is used.

Error text[Text] Returns detailed error information if the block execution fails.