infiniflow / ragflow

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
https://ragflow.io
Apache License 2.0
23.26k stars 2.28k forks source link

Add components to Agent, such as: keywordExtraction/Baidu/duckduckgoSearch/pubmed/wikipedia/bing/google. #1739

Open KevinHuSh opened 3 months ago

KevinHuSh commented 3 months ago
peizimo commented 1 month ago

Currently, the retrieval component in the agent only supports the retrieval of the input content of human-computer interaction. Can you set the retrieval to generate content for the upper level, such as LLM, or optimize the content? Thank you

peizimo commented 1 month ago

Baidu translation plug-in has top n errors

KevinHuSh commented 1 month ago

Currently, the retrieval component in the agent only supports the retrieval of the input content of human-computer interaction. Can you set the retrieval to generate content for the upper level, such as LLM, or optimize the content? Thank you

Could you elaberate on your scenario?

KevinHuSh commented 1 month ago

Baidu translation plug-in has top n errors

Could you file an issue?

peizimo commented 1 month ago

Currently, the retrieval component in the agent only supports the retrieval of the input content of human-computer interaction. Can you set the retrieval to generate content for the upper level, such as LLM, or optimize the content? Thank you

Could you elaberate on your scenario?

for example,I want to Implement cross-language retrieval in Agent module,First, I'm going to translate the user input language into the knowledge base language by "generating" the component and then sending the content to the "retrieval" component, but for now the "retrieval" component only retrieves for input history, and I hope you can help me with that ![Uploading retrieval.jpg…]()

KevinHuSh commented 1 month ago

Please check this one out. image

Is that what you need?

peizimo commented 1 month ago

Please check this one out. image

Is that what you need?

I have tried this template, the "search" component does not search for the translated content, but for the input content, for example, my input language is English, and the knowledge base content is Chinese, then the "search" component will search for English, rather than "generate" the Chinese translation of the component, then the return result is empty

peizimo commented 1 month ago

Please check this one out. image

Is that what you need?

If it is convenient for you, could you please give me a modified code of "retrieval" component, or other solutions? Thank you very much. Looking forward to your reply

KevinHuSh commented 1 month ago

I think half of this template solve your problems. image

peizimo commented 1 month ago

I think half of this template solve your problems. image

thanks for your reply ! Although I have tried, the effect is not satisfactory, but I will continue to try, if the component code is the reason, I will also try to modify, hoping to make RAGFlow platform more perfect.

peizimo commented 1 month ago

I think half of this template solve your problems. image 3 Because the kb context is English,The content I input is in Chinese. Normally, it should be translated into English for retrieval component, but its code retrieves history dialogue by default, so retrieval is in Chinese, so it cannot be retrieved by retrieval component,thanks for your understand

KevinHuSh commented 1 month ago

Hover on the 'Generate' and check the output of translation.