RAG (Retrieval-Augmented Generation) sujungia LLM su paieškos sistema — išgaudama svarbią informaciją iš žinių bazės ir pateikdama ją LLM kaip kontekstą, kad būtų sugeneruoti tikslūs, faktais pagrįsti atsakymai. Tai pagrindinė technika kuriant LLM programas su pasirinktiniais duomenimis.
Ką RAG daro
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
