Qdrant search query with payload (into the n8n node)

@Jon

I searched and found that topic :grinning:

I would like to know if it’s possible to pass the payload into the query using the Qdrant node (as far as I can see, you can’t)

Seems possible to include a JSON while inserting a collection (include a document)
So it seems the payload can be integrated here, see :grinning: ReDoc

Get Many, allows for prompting, but does not look like a Payload to me or might be pass here (?)
Retrieve documents has no parameters.

It would be great to have a way to set /overwritte / clear etc… a payload also
https://qdrant.github.io/qdrant/redoc/index.html#tag/points/operation/set_payload
It seems the filter can be applied after the documents with Payload are retrieved.

In that case I guess a Python node after the AI block would complete the all process ? (or as an external tool /hook connected ?)

Using n8n cloud version.
Thanks a lot for any help ! :sweat_smile:

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi. Queries don’t do insertions. You can have payload in the document metadata when inserting.
If this was not the response you were looking for, could you clarify your use case?

1 Like

Thanks, it absolutely clarifies ! So, while inserting the Payload, you also set the filters inside the Payload.
While searching for a document, you should then create an additional node based on code to filter the payload after the query to Qdrant.
I guess it would be better to add some filter variables directly to select more accurately what you are looking into Qdrant…?

Right. Having dynamic values for filtering using variables would be very useful.

1 Like

I suppose a json would like in Collection filter would be ok ? Maybe multiple JSON to prepare bigger results from different perspective. Then, variables into some (don’t know what use case it would open yet, but sounds fun :smiley: )

1 Like

Hi @Anush. Would you please provide a screenshot example of adding “payload” (additional text information along with vectors) when inserting documents in the Qdrant node? All I see is “Collection Config” under Options.

image

The context of “payload” in this case is text metadata that gets store along with a point in the Qdrant vector DB.

Thank you. Jeff

1 Like

Hi @jfang.
Metadata for each point is added in the document loader node if it supports it.

2 Likes

Thank you @Anush. That was super helpful.

I now also see where the n8n documentation talks about inserting metadata.

Based on the earlier part of this thread, it looks like there is currently not a way to add variables to filter by the metadata in the “Retrieve Documents” mode. I understand that better now.

However, The documentation mentions that “Metadata Filter” is available in the “Get Many” mode. Do you know where to enter in the metadata for filtering? Do I put it in the “Prompt”? Or does everything in the prompt get embedded for vector search only, bypassing the metadata? It would be helpful to understand how to utilize everything described in the documentation. Thanks again.

image

1 Like

Is there more infos about this ? Any specific info to point about how to edit an existing node to make these new features ? :smiley:

Hello,
Thanks for your help, but as far as I understand, It seems metadata are indeed stored but as metadata and not Payload !

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.