Skip to main content
The Knowledge Retrieval node is a core capability in the XpertAI agent workflow, providing highly relevant information support for user queries. It automatically retrieves content snippets semantically related to the query from a pre-built knowledge base, serving as contextual input for downstream agents to understand, analyze, and generate responses.

Main Capabilities

Usage

1. Input Parameters

The Knowledge Retrieval node accepts input from upstream nodes, typically a user’s natural language question or a standardized query processed by an agent.

2. Retrieval and filter configuration

Each Knowledge Retrieval node stores an independent configuration for every bound knowledge base:
  • Retrieval mode: intelligent filtering currently applies to Vector mode;
  • Fixed filter: configured by the workflow designer with constants or workflow variables and cannot be changed by the agent at runtime;
  • Allow agent automatic filtering: lets the agent add valid request-specific conditions inferred from the question;
  • Multiple knowledge bases: each binding retains its own fixed filter and agent-filter switch.
Fixed, caller, and agent-generated filters are always combined with AND. A missing or mistyped fixed variable stops retrieval. An invalid dynamic filter is discarded as a whole, and retrieval continues with the fixed filter. See Intelligent Retrieval Filtering for fields, operators, zero-hit behavior, and the support matrix.

3. Output Structure

The Knowledge Retrieval node returns a list of documents in the format of Langchain’s Document object. Each document contains two parts:
  • page_content: The actual retrieved text content
  • metadata: Metadata related to the content (e.g., source, document name, segment index, etc.)
** 📄 Output Example **:
This structure facilitates downstream language model nodes (e.g., Deepseek R1) to use the raw content and contextual information for high-quality question answering, summarization, or logical reasoning.

Typical Use Cases

  • Enterprise Internal Q&A Assistant: For policies, IT support, expense reimbursement processes, etc.
  • Customer Service Intelligent Assistant: Product feature explanations, troubleshooting guides
  • Project Knowledge Support: Helps team members quickly understand background information or past experiences
  • Legal/Compliance Consulting Bot: Extracts explanatory content from regulatory documents
The Knowledge Retrieval node is typically used with the following nodes to form a complete agent task chain:

Notes

  • Ensure the relevant knowledge base is populated and available
  • For multilingual content, pre-configure support for the corresponding language in the knowledge base
  • The amount of retrieved content can be customized in node settings (e.g., return top 3 or top 5 results)
  • When fixed or agent filtering is configured, use Vector mode with PGVector or Milvus

Conclusion

The Knowledge Retrieval node serves as a bridge between “user questions” and “intelligent answers.”
It not only provides factual evidence but also offers reliable semantic support for the agent’s understanding and expression. In the XpertAI workflow, Knowledge Retrieval enhances your agent’s contextual awareness and business expertise. For more details on building and maintaining a knowledge base, see Knowledge Base Overview.