RAG (Retrieval-Augmented Generation) ผสาน LLM เข้ากับ ระบบ retrieval โดยดึงข้อมูลที่เกี่ยวข้องจากฐานความรู้และส่งให้ LLM เป็นบริบทเพื่อสร้างคำตอบที่แม่นยำและมีพื้นฐานจากข้อมูลจริง มันเป็นเทคนิคสำคัญสำหรับการสร้างแอปพลิเคชัน 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
