FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
31.81k stars 16.58k forks source link

[BUG] Dynamic Postgres Metadata Filtering via Agent State #3545

Open sirsimonson opened 4 days ago

sirsimonson commented 4 days ago

Describe the bug

The metadata filter for Retriever Tool does not work with Postgres Metadata Filtering when used with the new dynamic filtering feature via agent state. (https://github.com/FlowiseAI/Flowise/pull/3501) The filter is not passed down to the Postgres query, resulting in an unfiltered response.

To Reproduce

Configure a metadata filter for Retriever Tool using the new dynamic filtering feature. Observe that filters are not applied as described in the PR. Expected behavior The metadata filter should correctly apply to the Postgres query and return filtered results.

image

Additional context

Filters configured as "Postgres Additional Metadata Filter" works currently in "Test Retrieval Query" Playground but fail when dynamically added as "Additional Metadata Filter" to the Retriever Tool.

sirsimonson commented 4 days ago

@HenryHengZJ Please describe how this could be verified/tested... image I've logged the vectorstore instance used and it seems to have the correct "filter" property attached. shouldn't this be the same as "Additional Metadata" for Postgres Node itself?

HenryHengZJ commented 1 day ago

I've tried it on Pinecone and it works. Will test it on PG.