-
-
Notifications
You must be signed in to change notification settings - Fork 24k
Description
Describe the bug
When a Chatflow that uses RAG is executed directly in Flowise, the response correctly includes the retrieved document sources (sourceDocuments). However, when the same Chatflow is called inside an AgentFlow V2 using the Execute Flow node, the sources are no longer returned.
The Chatflow itself works correctly:
- It uses Cohere Embeddings and Qdrant as the vector database.
- RAG retrieval works as expected.
- When tested directly, the response includes the associated sourceDocuments.
- But when the Chatflow is executed through AgentFlow V2 → Execute Flow:
- The Chatflow runs successfully.
- The text response is returned correctly.
- The sourceDocuments field is missing from the response.
As a result, the RAG sources are lost when the Chatflow is executed from AgentFlow V2, even though they are available when running the Chatflow directly.
To Reproduce
- Create a Chatflow in Flowise that uses:
-
Cohere Embeddings
-
Qdrant Vector Database
-
A RAG pipeline that retrieves documents.
-
Test the Chatflow directly in the Flowise chat interface.
-
Ask a question related to the indexed documents.
-
Observe that the response includes the retrieved sourceDocuments.
-
Create an AgentFlow V2.
-
Add an Execute Flow node and configure it to call the previously created Chatflow.
-
Run the AgentFlow and ask the same question.
-
Observe the response returned by the agent.
Result:
The response text is returned correctly, but the sourceDocuments field is missing.
Expected behavior
When a Chatflow that performs RAG retrieval is executed inside AgentFlow V2 using the Execute Flow node, the response should include the same sourceDocuments as when the Chatflow is executed directly.
The AgentFlow should propagate the full response from the Chatflow, including:
- The generated text response
- The retrieved sourceDocuments (RAG sources)
This would allow the agent to preserve and use document sources even when the Chatflow is called as part of an AgentFlow.
Screenshots
No response
Flow
No response
Use Method
None
Flowise Version
3.0.4
Operating System
None
Browser
None
Additional context
No response