ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Question]: Clarification on File and Image Uploads in Version 0.10.0

Open Said-Apollo opened this issue 1 year ago • 3 comments

Describe your problem

With the release of version 0.10.0, the ability to upload files and images directly into the chat has been introduced. However, I have a few questions regarding the functionality and handling of these uploads:

1. Search Process:

  • When files or images are uploaded, does the search process still involve scanning the entire dataset?
  • How are the most relevant chunks selected—are they drawn from both the dataset and the uploaded content?

2. Handling of Uploaded Content:

  • Are the uploaded files/images parsed using the same methods as the rest of the dataset?
  • What happens to the uploaded files and images after they are added to the chat? Are these files stored in the database, or are they only accessible within the current chat session?
  • If the chat is deleted, will the uploaded content be automatically removed as well?
  • From an enterprise perspective, it may not be desirable to store "user-uploaded" files in the database permanently. Would it be possible to have an option where the file is either deleted from the database after usage or only processed once upon upload?

3. Image Parsing:

  • If the uploaded images are indeed parsed by Ragflow, wouldn't it be more efficient to use the model providers' own parsing capabilities, especially for GPT models (at least in case of images)?
  • Could there be an option for users to choose between Ragflow parsing and the LLM provider's parsing when uploaded files?

Said-Apollo avatar Aug 29 '24 13:08 Said-Apollo

Regarding the issue mentioned in 2.4, I also think that neither individuals nor organizations want to "permanently" save temporarily uploaded images or files to the knowledge base. This could lead to serious security issues (e.g. files containing hint attacks or illegal injections) and knowledge base clutter.

cyhasuka avatar Aug 30 '24 02:08 cyhasuka

  1. No, only for uploaded files.
  2. Uploaded files use 'General' to parse.
    • They're stored in dataset.
    • No, they have to be removed manually.
    • That's a good point.
  3. Uploaded images firstly will go through OCR. If there's not enough text for image description, the image will be send to LLM to get description. LLM is much less effective if the image is full of text, I guess.

KevinHuSh avatar Aug 30 '24 06:08 KevinHuSh

@KevinHuSh Additionally, when storing uploaded files in the dataset, how does this process work when multiple knowledge bases are used for an assistant?

If the search only targets the uploaded file, what happens if I upload two files, ask a question, and then upload another file and ask a different question?

  • Will both files be stored in a new knowledge base each time, or will a new knowledge base be created for each upload?
  • If no new knowledge base is created, where exactly are the files stored, especially when multiple knowledge bases are involved?

Said-Apollo avatar Aug 30 '24 09:08 Said-Apollo