Skip to content

Metadata lost when using Custom Retriever with Retriever Tool in Agent (Qdrant) #6242

@limbergarcia

Description

@limbergarcia

Describe the bug

When using a Custom Retriever with Qdrant that correctly formats metadata (e.g. {{metadata.docname}}, {{metadata.url}}, etc.), the metadata is not preserved when passing through the Retriever Tool into an Agent.

The Custom Retriever works correctly when used standalone (output = text or document), but when connected to a Retriever Tool and used inside an Agent, only the pageContent is returned and metadata is lost.

This breaks use cases where metadata is required (e.g. file names, URLs, blob type, citations).

To Reproduce

  1. Create a Qdrant vector store with documents that include metadata (docname, url, blobType, etc.)
  2. Add a Custom Retriever node with the following result format:
    {{context}}
    [FileName]: {{metadata.docname}}
    Url: {{metadata.url}}
    blobType: {{metadata.blobType}}
  3. Connect:
    Qdrant → Custom Retriever → Retriever Tool → Agent
  4. Ask a question to the agent
  5. Observe the response

Expected behavior

The agent response should preserve metadata from the Custom Retriever.

Example:
Some document content...
[FileName]: document.pdf
Url: https://...
blobType: application/pdf

Screenshots

Image

Flow

No response

Use Method

None

Flowise Version

Flowise 3.1.1

Operating System

Windows

Browser

Chrome

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions