IntelLabs / fastRAG

Efficient Retrieval Augmentation and Generation Framework
Apache License 2.0
1.1k stars 94 forks source link

Confusions about REPLUG #40

Closed richhh520 closed 3 months ago

richhh520 commented 4 months ago
  1. How to train the retriever of REPLUG? How to update the embeddings of query and documents?
  2. In your replug_parallel_reader.ipynb, why directly import the default BM25Retriever rather than the trained Retriever?
  3. What does PromptModel do? What is its function? what does ReplugHFLocalInvocationLayer do? It seems this part is not mentioned in the paper.

Thanks for your help!

danielfleischer commented 4 months ago

Hi, thanks for the questions. Here we focused more on the LLM part of the REPLUG paper, where documents can be fed in parallel. In general, documents can be retrieved using any method; for the simplicity of the notebook we showed in memory DB that uses BM25 with re-ranker using off-the-shelf sentence transformer. We don't have training code for embedders here, we might add it in the future.

The PromptModel is an abstraction around LLMs where you provide a model name and it generates text based on a prompt, abstracting away whether it is a local model, the hardware specifications or perhaps even a cloud-based service. The API is part of Haystack v1, which we use for the development of our library.

kerkathy commented 3 months ago

Thanks for the work, here also look forward to the implementation of the REPLUG training :)