BM25 lexical search#
Searches chunks by BM25 lexical match 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. |
| EnableSubfolders | Include subfolders of the selected folders. |
| UseRerank | Apply the built-in BGE reranker. |
| IncludeWithoutMatches | Include files without matches. |
| Timeout | [Number] HTTP request timeout in seconds. Default value is 60. |
| ListChunks | [Array] Found chunks with file data, BM25 metric, and rerank result. |
| Processing level | Choose the error processing level. Possible values:
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:
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. |