Updated on 2025-07-02 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. Drag the Knowledge Repo node on the left 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.

    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.

    FAQ Straight out threshold

    FAQs in the knowledge base with scores higher than the threshold will be recalled. In this case, documents in the knowledge base are not searched. If no FAQ meets the threshold requirements, the system continues to search for documents in the knowledge base. You can adjust the threshold by referring to the FAQ hit test result in the knowledge base.

    The value ranges from 0 to 1.

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