Skip to main content
The Flow Retriever lets you use headless Flow Designer flows as virtual data sources in the RAG pipeline. Instead of querying a search index, the system executes a retriever flow that can query databases, call APIs, run custom logic, or combine multiple sources — and the results are merged into the LangChain context alongside traditional search results.

How It Works

  1. The orchestrator identifies FLOW_RETRIEVER entries in the chat’s dataSources[]
  2. Each retriever source is executed in parallel via performFlowRetrieverRAG()
  3. The flow receives { query, connectionId, _retrieverInstructions } as inputs
  4. The flow’s final output is parsed as structured documents
  5. 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 output can be wrapped in markdown code fences (```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

  1. Open a chat’s Edit Form → Data Sources
  2. Check Flow Retriever
  3. Select a Retriever Flow from the dropdown (only flows with flowType: retriever appear)
  4. Choose a Connection Mode:
    • Fixed — pick a connection from the dropdown
    • User selects at runtime — users choose in the sidebar
  5. Optionally add Retriever Instructions — natural-language guidance injected as {{_retrieverInstructions}}
  6. Save the chat

Creating a Retriever Flow

Retriever flows are standard Flow Designer flows with a few constraints:
  1. Set flowType to retriever — 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.
  2. No user interaction nodes — Retriever flows must not contain FORM_PROMPT or HUMAN nodes. They execute headlessly with no user interaction at execution time.
  3. Accept the standard inputs — The Start node should expect query (the user’s search text) and optionally connectionId and _retrieverInstructions.
  4. 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:
Nodes: System prompt for node 2 (NL→SQL):
System prompt for node 4 (Format Results):

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: retriever are accepted
  • User identity injection_userId, _userUpn, _userEmail are 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.