Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[BUG] Retriever query ignored for multiple retrievers

Open Nek-11 opened this issue 10 months ago • 2 comments

Describe the bug There's a bug in all the Retrievers that have a "Query" field, when being used as "Retriever" (as opposed to "Document" or "Text"). The Query clearly states: "Query to retrieve documents from retriever. If not specified, user question will be used"

However, when specifying a query there, it's not using that one, and still using the user question instead.

For example, I set the query to be "How to get to the Singapore campus?" and the user question will be "Where to go eat on the Lausanne campus?", and the chatbot will still respond correctly even though it should absolutely not be able to retrieve the correct documents.

Is there something I am missing ? Why is the specified query completely getting overlooked ?

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Chatflows'
  2. Click on a retriever like 'HyDE retriever', "Extract metadata retriever', or another retriever with a modifiable Query field
  3. Specify a query in that field
  4. Ask an unrelated question to the chatbot
  5. Bug happens: the chatbot retrieves the correct documents to answer the user question, instead of using the specified query

Expected behavior The query used to retrieve documents should be the one set inside the "Query" field, not the user question.

Screenshots Image

Image

Setup

  • Installation [deployed on Azure with terraform]
  • Flowise Version [2.2.7-patch.1]
  • OS: [macOS]
  • Browser [chrome]

Nek-11 avatar Mar 19 '25 10:03 Nek-11

you're right, its misleading. The query only applies to Document or Text, doesnt apply to Retriever

HenryHengZJ avatar Apr 02 '25 18:04 HenryHengZJ

@HenryHengZJ Thanks for answering.

Is there a plan to make it also work as a Retriever? I found a workaround but it adds a little latency and feels a bit hacky:

Image

Nek-11 avatar Apr 03 '25 08:04 Nek-11