RAG (Retrieval-Augmented Generation) एक LLM को एक retrieval system के साथ जोड़ता है — एक knowledge base से relevant जानकारी प्राप्त करना और इसे LLM को context के रूप में प्रदान करना ताकि accurate, grounded answers generate किए जा सकें। यह custom data पर LLM applications बनाने के लिए एक key technique है।
What RAG does
RAG → augment an LLM's generation with RETRIEVED relevant information:
1. RETRIEVE → search a knowledge base (your documents/data) for info relevant to the query
2. AUGMENT → add the retrieved info to the LLM's prompt as CONTEXT
3. GENERATE → the LLM answers using the provided context (grounded in your data)
→ gives the LLM relevant, up-to-date, specific knowledge it wasn't trained on
