Actions37
- 对话 Actions
- 知识库 Actions
- 集合 Actions
- 数据 Actions
- 应用 Actions
知识库 → 知识库检索
AI-generatedSummary
Runs a test search against a chosen FastGPT knowledge base (POST /core/dataset/searchTest) and returns the recall results for the query text. Supports semantic, full-text, or hybrid search with optional ReRank and query rewriting.
Inputs
- 选择知识库 (knowledgeDatasetId) — Dropdown of knowledge bases loaded from the root folder (/core/dataset/list, type 'dataset' only). Sent as datasetId. Nothing in the properties marks it required, but the search targets this dataset.
- 检索文本 (knowledgeSearchText) — Query text to search for; sent as text.
- 最大Tokens数量 (knowledgeSearchLimit) — Maximum tokens of results to return; default 5000; sent as limit.
- 最低相关度 (knowledgeSearchSimilarity) — Minimum similarity threshold between 0 and 1; default 0; sent as similarity.
- 类型 (knowledgeDatasetSearchMode) (required) — Search mode: embedding (semantic, default), fullTextRecall (full-text keyword search), or mixedRecall (vector plus full-text, merged with RRF ranking). Sent as searchMode.
- 使用ReRank (knowledgeSearchReRank) — Boolean, default false. Re-ranks results; sent as usingReRank.
- 使用问题优化 (knowledgeSearchExtensionQuery) — Boolean, default false. Rewrites the query to improve recall; sent as datasetSearchUsingExtensionQuery.
- 问题优化模型 (knowledgeSearchExtensionModel) — Model name for query rewriting, e.g. gpt-5. Only meaningful when query optimization is enabled.
- 问题优化背景 (knowledgeSearchExtensionBg) — Background description to help the model understand context during query rewriting.
- Request Options — Optional batching (items per batch, interval), ignore SSL issues, proxy, and request timeout (default 10000 ms).
Output shape
The FastGPT API JSON response from the search test, as the node's output item(s). It is not reshaped by the node, so it contains the recall results returned by FastGPT.
Errors are raised as NodeApiError if the HTTP status is 4xx/5xx or the response body's code is not 200. The exact fields of the result depend on the FastGPT server. Requires the fastGPTApi credential, which supplies the base URL.
Examples
Example 1: Retrieve relevant chunks for a user question to feed into an LLM step
Select the knowledge base, set 检索文本 to an expression such as {{$json.question}}, mode 混合检索, 最低相关度 0.3, 最大Tokens数量 3000.
Example 2: Keyword lookup of exact terms
Mode 全文检索 with 检索文本 set to the keywords; leave ReRank off.
Example 3: Improve recall for vague queries
Enable 使用问题优化, set 问题优化模型 to a model name and add 问题优化背景; enable 使用ReRank.