Updated on 2025-11-04 GMT+08:00

Knowledge Repo Node

The Knowledge Repo node retrieves matched information from the specified knowledge base based on user input and returns the matching result in a list. You can select a knowledge base created by yourself. For details, see Creating a Knowledge Base and Uploading Documents.

To configure the Knowledge Repo node, perform the following steps:

  1. Click Add Node at the bottom of the canvas, drag the Knowledge Repo node from the node drawer to the canvas, and click the node to open the node configuration page.
  2. Connect the Knowledge Repo node to other nodes.
  3. Configure the LLM node by referring to Table 1.
    Table 1 Knowledge Repo node configuration

    Configuration Type

    Parameter Name

    Description

    Parameter configuration

    Input params

    • Param name: There is only one input parameter. The parameter name is query and cannot be changed. The parameter value is a string, which represents the question to be searched for.
    • Type and Value: Type can be set to ref and literal.
      • ref: You can select the output variable value of a previous node that has been included in the workflow. The value must be of the String type. This option applies to the scenario where knowledge search questions need to be obtained from the output of a previous node.
      • literal: allows users to customize questions, which is applicable to scenarios where knowledge search questions are fixed.

    Output params

    The output of the Knowledge Repo node is an object array. The parameter name is output_list, indicating all knowledge slices that meet the search requirements. The objects in the array have three attributes:

    • document_name: name of the knowledge document where the knowledge slice is located.
    • content: content of a knowledge slice.
    • score: matching score of a knowledge slice. Elements in output_list are sorted in descending order of scores.

    Subsequent nodes can reference the output parameter output_list. In this case, the full search results are obtained, including the document name, slice content, and score. You can also directly reference slice attributes, for example, content. In this case, the slice content of the first record in output_list is obtained.

    Knowledge base

    Knowledge

    You can select a knowledge base created by users.

    Retrieval policy

    Retrieval policy used to retrieve knowledge in the knowledge base. Currently, the following retrieval policies are supported:

    Semantic retrieval: The vector retrieval technology is used to retrieve knowledge in documents and structured data and recall slice content that is highly related to user intents. It is recommended that this technology be used in scenarios where context correlation and understanding of user intents are required.

    Keyword retrieval: The inverted retrieval technology is used to retrieve knowledge in documents and structured data and recall slice content that matches the query keywords. It is recommended that this technology be used in scenarios where the keyword matching degree of user questions is high.

    Hybrid retrieval: The vector retrieval and keyword retrieval policies are used to retrieve knowledge bases. It is recommended that this technology be used in scenarios where user intent understanding and keyword matching degree need to be considered.

    Relevance Threshold

    Search results whose scores are lower than the relevance threshold are filtered out. You can adjust the threshold based on the relevance score of the knowledge base hit test.

    The value ranges from 0 to 1.

    Top K Recalls

    Maximum number of segments recalled from the knowledge base. If the value is 5, segments whose scores are not in the top 5 will be filtered out.

    The value ranges from 1 to 50.

    Figure 1 Knowledge Repo node configuration example
  4. After completing the configuration, click OK.