ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Feature Request]:

Open EugenMayer opened this issue 1 month ago • 8 comments

Self Checks

  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (Language Policy).
  • [x] Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • [x] Please do not modify this template :) and fill in all the required fields.

Is your feature request related to a problem?

Not a problem, but a do-or-die aspect. Without this feature, using RAGflow is impossible for us.

Describe the feature you'd like

We learned with the help of @redredrrred that the chat-completion endpoint can have meta-data filter, even though it is yet undocumented in the REST api - this is awesome!

One problem that still hinders us with those filters is, the ability to use an IN operator when the meta-datum field itself is a list.

Describe implementation you've considered

To accomplish that, would like to start the conversation with a meta-datum filter that looks like

filter: {
  "region": ["A", "C"]
}

now the important part is, when only using an array, to assume is it OR or rather AND, for us OR would be the one we need, but this might be something that can either be left to be defined in the filter (similar to elastic) or a system configuration, if this would be to much effort

Documentation, adoption, use case

For us, there will be a meta-datum called 'region'. Now the region will be a list of regions A,B,C...

Every document will be assigned to one or more regions (this is the important part), so document X1 is in region A,C while X2 is in C, X3 is in B,C.

When a completion starts, we want to limit the conversation to a list of regions, so, for example, this time we start a conversation, where only documents are to be included that are in region A or C (no other).

Additional information

No response

EugenMayer avatar Nov 19 '25 07:11 EugenMayer

Will discuss with @redredrrred to see if there is any solution to it.

ZhenhangTung avatar Nov 19 '25 11:11 ZhenhangTung

It's comming soon.

KevinHuSh avatar Nov 20 '25 02:11 KevinHuSh

I think we can refer to the conditional configuration of the switch node in the agent node:

Image

Will discuss with @redredrrred to see if there is any solution to it.

redredrrred avatar Nov 20 '25 05:11 redredrrred

Thank you, awesome news. In here i can mainly see the and/or operator selection - is the "in" operator coming also?

EugenMayer avatar Nov 20 '25 21:11 EugenMayer

Image @EugenMayer Already implemented :)

ZhenhangTung avatar Nov 27 '25 05:11 ZhenhangTung

This is awesome. I mean, seriously.

@ZhenhangTung @redredrrred extremely appreciated!

This just unlocked RAGflow for us, super happy.

EugenMayer avatar Nov 27 '25 06:11 EugenMayer

Just in case, should i use the UI to re-factor the API calls or are there any docs? Pointer to the rest controller is enough too - what-ever works.

Would be sad to see such a great feature be burried and for others to be invisible! Especially because the meta-data filter open up the world of disecting the chunks / kb when starting a chat.

EugenMayer avatar Nov 27 '25 06:11 EugenMayer

We haven’t implemented this at the API level yet. If you feel comfortable with it, we’d really welcome a PR from you!

ZhenhangTung avatar Nov 27 '25 07:11 ZhenhangTung