Overview
Available starting with FlowX.AI 5.6.0
When to use Context Retrieval vs Custom Agent
| Scenario | Recommended node |
|---|---|
| You need the AI to reason about retrieved information and generate a response | Custom Agent with Knowledge Base enabled |
| You want raw chunks to process, filter, or route in your workflow | Context Retrieval |
| You need to combine chunks from multiple Knowledge Bases | Context Retrieval (one per KB) + downstream merge |
| You want a simple question-answer flow with RAG | Custom Agent with Knowledge Base enabled |
Configuration
Knowledge Base
Select one or more Knowledge Base resource references to query.
Source
The source type to query.Options:
KNOWLEDGE_BASE— Search the selected Knowledge Base (default)MEMORY— Search conversation memory
KNOWLEDGE_BASESearch type
The search algorithm used to find relevant chunks.Options:
HYBRID— Combines semantic and keyword search for balanced results (default)SEMANTIC— Uses vector similarity for meaning-based searchKEYWORD— Uses traditional keyword matching
HYBRIDQuery parameters
Maximum number of chunks to return.Default:
5Minimum relevance score threshold, expressed as a percentage (0–100). Only chunks with a relevance score above this threshold are returned. The value is divided by 100 internally.Default:
0When turned on, applies re-ranking to the retrieved chunks for improved result ordering.Default:
falseAdvanced filters
Toggle to turn on property-based filtering on Knowledge Base chunks.Default:
falseA JSON expression defining property-based filters to narrow search results. Only available when Advanced Filters is turned on.
Operation prompt
The operation prompt defines the query text sent to the Knowledge Base. It supports${} placeholder syntax for dynamic values from workflow input and configuration parameters.
Example:
Output format
The Context Retrieval node returns an array of chunk objects. Each chunk contains:| Field | Type | Description |
|---|---|---|
| chunkContent | string | The text content of the retrieved chunk |
| chunkMetadata | object | Metadata associated with the chunk (key-value pairs) |
| relevanceScore | number | Similarity score between the query and the chunk (0–1) |
| contentSource | string | The name of the content source the chunk belongs to |
Example output
Error handling
If the Context Retrieval node fails, the workflow produces aWORKFLOW_NODE_CONTEXT_RETRIEVAL_ERROR error. Common causes include:
Knowledge Base not found
Knowledge Base not found
The referenced Knowledge Base does not exist or is not accessible.Solution: Verify the Knowledge Base exists in your project or dependencies and that you have the required permissions.
Invalid query
Invalid query
The operation prompt resolved to an empty or invalid query.Solution: Check that the
${} placeholders in your operation prompt reference valid input or config variables.Timeout
Timeout
The RAG search exceeded the configured timeout.Solution: The default timeout is 300 seconds (
flowx.ai-service.nodeRunnerTimeoutSeconds). Consider simplifying your query or reducing the topK value.
