tencent cloud

Knowledge Retrieval Node
Last updated:2025-08-27 15:03:37
Knowledge Retrieval Node
Last updated: 2025-08-27 15:03:37

Node Function

The Knowledge Retrieval Node belongs to Information Processing Node. It supports users to input questions and configure the search scope to retrieve knowledge, finally outputting the retrieved knowledge fragments.




Directions

Input variables

Input variables take effect only within the same node and cannot be used cross-node. Support up to 50 input variables to meet scene requirements. Click "Add" to configure input variables as follows.
Configuration
Description
Variable Name
The variable name can only contain letters, digits, or underscores, must start with a letter or underscore, and is mandatory.
Description
Description of this variable. Optional.
Data source
The data source of this variable supports two options: "refer" and "input". "Refer" allows selecting output variables from all preceding nodes, while "input" supports manually filling in a fixed value.
Type
The data type of this variable cannot be selected and defaults to the variable type of "refer" or the string type of "input".

Knowledge Retrieval

User Question

Represents the question in knowledge Q&A, allowing users to input questions they want the LLM to retrieve answers for. Here supports direct import of variables, manual input of content, or a mix of variables and text content. Typical use cases include:
Scenario 1. Perform knowledge retrieval with direct reference to "user dialogue of this round"
Assume the input variable (such as Query) is configured, and refer to the system variable SYS.UserQuery.
At this point "user question" can configure as: Query, indicate usage of current user dialogue of this round for QA.
Scenario 2. Combine "output variable of the preceding node" to concatenate content
Assume the input variable (such as TypeId) is configured, referring to the preceding node's variable "device model".
At this time ask the device model warranty period, then "user question" can configure as: What is the warranty period for TypeId?

Knowledge

Configure the search scope for knowledge, including "All Knowledge" and "By Knowledge Base".
For "By Knowledge Base" search, you can select the corresponding knowledge base or add a new knowledge base. Within each knowledge base, the search scope can be set to "All knowledge", "By Specific Knowledge", or "According to the label".
Configuration
Description
All Knowledge
Indicate to retrieve all knowledge in the knowledge base.
By Specific Knowledge
For documents, Allows manual selection of documents for knowledge retrieval. For QAs, support enabling or disabling QAs. If enabled, it will recall all QAs.
According to the label
Indicates retrieving the knowledge scope by document tag, supporting input of fixed tag values or referencing variables as tag values.
Referencing variables as tag values allows more flexible control of the knowledge search scope. Typical scenario: targeting employees from different departments, distinguishing knowledge scopes. At this point, the employee department can be imported into the system via API parameters, while tagging knowledge with different department labels. During workflow invocation, dynamically adjust the search scope based on the employee department.
By Specific Knowledge configuration as follows:



Configure by tag as follows:




Advanced Settings

Retrieval strategy settings, document settings, and QA settings for knowledge Q&A, perform personalized search configuration.
Configuration
Configuration options
Description
Retrieval strategy settings
Hybrid Search
Execute keyword retrieval and vector retrieval simultaneously. Recommended for scenarios involving string and semantic association, delivering better comprehensive effect.
semantic retrieval
Scenarios with low vocabulary overlap between queries and text segments requiring semantic matching.
Excel Retrieval Enhancement
enabled
Once enabled, query and compute in Excel spreadsheets is supported based on natural language, but may affect reply duration.
Document settings
Number of documents recalled
Retrieve the top N document fragments with the highest matching degree, default is 5, max is 10.
Document retrieval accuracy
Based on settings, the found text segments will be returned to the LLM as a reply reference. A lower value means more segments are recalled, but it may affect accuracy. Content below the matching degree will not be recalled. Default is 0.2, max is 0.99.
QA settings
Number of Q&A recalled
Retrieve the top N QA fragments with the highest matching degree, default is 3, max is 5.
Q&A retrieval accuracy
Based on settings, the found text segments will be returned to the LLM as a reply reference. A lower value means more segments are recalled, but it may affect accuracy. Content below the matching degree will not be recalled. Default is 0.7, max is 0.99.

Output Variable

By default include retrieved knowledge fragments and runtime Error info (data type is object, this field is empty when running normally). Manual addition is not supported.




Application Example

Create a Tencent Cloud Agent Development Platform (Tencent Cloud ADP) workflow QA assistant to search in the knowledge base based on user questions and respond with a specific persona.



The Knowledge Retrieval Node configuration as follows:




FAQs

What is the difference between LLM knowledge Q&A and knowledge retrieval?
The LLM knowledge Q&A node will summarize the retrieved knowledge and generate a final reply, while the knowledge retrieval node only returns the retrieved knowledge fragments.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback