RAG (Retrieval-Augmented Generation) ਇੱਕ LLM ਨੂੰ ਇੱਕ retrieval system ਨਾਲ ਜੋੜਦਾ ਹੈ — ਇੱਕ knowledge base ਤੋਂ ਪ੍ਰਾਸੰਗਿਕ ਜਾਣਕਾਰੀ ਲਿਆ ਰਿਹਾ ਹੈ ਅਤੇ ਇਸਨੂੰ LLM ਨੂੰ context ਦੇ ਤੌਰ ਤੇ ਪ੍ਰਦਾਨ ਕਰਦਾ ਹੈ ਸਹੀ, grounded ਜਵਾਬ ਬਣਾਉਣ ਲਈ। ਇਹ ਕਸਟਮ ਡੇਟਾ ਉੱਤੇ LLM ਐਪਲੀਕੇਸ਼ਨਾਂ ਬਣਾਉਣ ਲਈ ਇੱਕ ਮੁੱਖ ਤਕਨੀਕ ਹੈ।
RAG ਕੀ ਕਰਦਾ ਹੈ
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
