Why Retrieval?

This helps the LLM to get the exact information from the source instead of just guessing its answer. Like checking your calender to tel you about your next meeting time instead of guessing, if LLM can retrieve your calender information then it can give you the actual and factual answer

This is a dynamic process and can give you citations to the sources it used for the answer which really helps in verifying the solution source

Retrieval is a common mechanism for identifying such relevant information:

  • Dynamic: its easy to update/add documents to your retrieval system
  • Interpretable: LLM can generate pointers to retrieved documents that support human verification of its generations (citations)

Retriever - Reader Framework

Input: a large collection of documents and
Output: an answer string

Q stands for question
D stands for Documents
A stands for answer

Retriever: . Here, is pre-defined (e.g., 100 or 50 or 10)
Reader: . Here, is reading comprehension problem

Retrieval Augmented Generation (RAG)