How It Works
- The orchestrator identifies
FLOW_RETRIEVERentries in the chat’sdataSources[] - Each retriever source is executed in parallel via
performFlowRetrieverRAG() - The flow receives
{ query, connectionId, _retrieverInstructions }as inputs - The flow’s final output is parsed as structured documents
- Documents are merged into the RAG context for the LLM to cite
Execution Contract
Retriever flows receive these inputs automatically:
The flow’s final LLM node should produce one of these output formats:
- JSON array —
[{ "title": "...", "content": "...", "url": "..." }] - JSON object with documents key —
{ "documents": [...] }or{ "results": [...] } - Plain text — Wrapped as a single document automatically
```json ... ```).
Connection Modes
All connections are ACL-checked before execution — the user must have access to the connection in the Data Platform Connections registry.
Configuring a Chat with Flow Retriever
- Open a chat’s Edit Form → Data Sources
- Check Flow Retriever
- Select a Retriever Flow from the dropdown (only flows with
flowType: retrieverappear) - Choose a Connection Mode:
- Fixed — pick a connection from the dropdown
- User selects at runtime — users choose in the sidebar
- Optionally add Retriever Instructions — natural-language guidance injected as
{{_retrieverInstructions}} - Save the chat
Creating a Retriever Flow
Retriever flows are standard Flow Designer flows with a few constraints:-
Set
flowTypetoretriever— In the flow editor, set the flow type to “Retriever”. This marks the flow as headless and makes it available in the Flow Retriever dropdown. -
No user interaction nodes — Retriever flows must not contain
FORM_PROMPTorHUMANnodes. They execute headlessly with no user interaction at execution time. -
Accept the standard inputs — The Start node should expect
query(the user’s search text) and optionallyconnectionIdand_retrieverInstructions. -
Return structured documents — The final LLM/output node should produce a JSON array of documents:
Example: Database Retriever Flow
A typical SQL retriever flow has this node graph:
System prompt for node 2 (NL→SQL):
Bootstrapped Retriever Flows
Two example retriever flows are included and can be seeded via Admin → Bootstrap Assets ([#/admin/bootstrap]) → Bootstrap Flows:
These flows are production-ready starting points. Clone and customize them for your specific database schemas and query patterns.
Security
- Connection ACL — Every connection is checked against the user’s entitlements before execution
- Flow validation — Only flows with
flowType: retrieverare accepted - User identity injection —
_userId,_userUpn,_userEmailare injected server-side for row-level filtering - Timeout — Each flow execution has a 30-second timeout boundary
- Parallel execution — Multiple retriever sources execute in parallel; failures are isolated per-source
IDataSourceConfig Fields (Flow Retriever)
See Datasource Catalog → IDataSourceConfig Fields for the full field reference. Flow Retriever–specific fields are summarized below.