Is uploaded file analysis still overridden by KB-based answering when a knowledge base is selected? #14044
|
Hi, I would like to confirm whether this behavior is still expected in recent versions, or whether it should be considered a bug. My scenario is:
However, it seems that when a knowledge base is selected, the assistant tends to answer from the knowledge base instead of analyzing the uploaded file directly. What I want here is file analysis, not knowledge-base retrieval. I found an older issue/discussion that seems related: #6641 mentions that it is not possible to use the file as part of the question and have a conversation with the knowledge base at the same time. So I would like to ask:
Thanks. |
Replies: 1 comment 4 replies
|
@zzming-tjufe From what I could find, this behavior is still expected rather than a bug. RAGFlow treats these as two different mechanisms:
Because a selected knowledge base always participates in retrieval, if your prompt is something generic like:
the assistant may still retrieve relevant KB content and incorporate it into the response, even though your intention is to analyze only the uploaded file. If your goal is pure document analysis, the most reliable approaches are:
Whether the model consistently follows that instruction may depend on how the chat assistant is configured. One question that would help clarify your scenario:
That distinction affects whether you're seeing expected retrieval behavior or a potential issue with how the assistant prioritizes uploaded files versus retrieved context. If this solves your problem, feel free to mark it as the accepted answer so others can find it easily. |
Thanks for digging into the source code—that's a really helpful observation.
From your analysis, it does appear that the execution order is roughly:
split_file_attachments()).empty_responseis configured:If that's the current flow in both v0.26.4 and
main, then I agree that these are really two separate concerns.Potential bug: If a valid uploaded attachment exists, r…