Naive RAG = 1 lần retrieve → generate. Ổn cho câu hỏi đơn giản, dữ kiện nằm trong 1-2 chunk. Fail khi câu hỏi multi-hop, cần nhiều bước suy luận, hoặc dữ liệu có cấu trúc quan hệ.
Agentic RAG trao quyền cho LLM tự quyết định: có nên retrieve không, query gì, khi nào retrieve lại với query khác, khi nào dừng. Chạy loop kiểu ReAct với tools: search, query_db, clarify, answer. Ví dụ: "So sánh chiến lược pricing của 3 đối thủ" → agent tự query từng đối thủ, tổng hợp. Hỗ trợ bởi LangGraph, LlamaIndex Query Engine / Agent, CrewAI, AutoGen. Đổi lại: latency cao hơn 5-10x, khó debug, tốn token.
Graph RAG (Microsoft 2024) lập chỉ mục knowledge dưới dạng knowledge graph (entity + relationship + community summary) thay vì chỉ vector chunks. Khi query:
- trích xuất entity từ câu hỏi
- traverse graph theo các hop liên quan
- tổng hợp community summaries + chunks. Giỏi với câu hỏi global/thematic ("xu hướng chính trong tài liệu?"), multi-hop ("X liên quan Y qua Z thế nào?"), dữ liệu có cấu trúc quan hệ rõ (legal, scientific, org chart)
Chi phí: indexing Graph RAG đắt hơn rất nhiều (cần LLM để extract entity, xây graph, tạo summary) — phù hợp corpus có giá trị cao, ít update. Combine: dùng hybrid vector + graph retrieval trong pipeline agentic cho các use case phức tạp.
Naive RAG = one retrieve → one generate. Fine for simple questions with facts in 1–2 chunks. Fails on multi-hop questions, multi-step reasoning, or relational data.
Agentic RAG gives the LLM autonomy: decide whether to retrieve, what to query, when to re-query, when to stop. Runs a ReAct-like loop with tools: search, query_db, clarify, answer. E.g. "Compare 3 competitors' pricing strategies" → agent queries each one and synthesizes. Supported by LangGraph, LlamaIndex Query Engine / Agent, CrewAI, AutoGen. Tradeoffs: 5–10x higher latency, harder to debug, more tokens.
Graph RAG (Microsoft 2024) indexes knowledge as a knowledge graph (entity + relationship + community summary) rather than plain vector chunks. At query time:
- extract entities from question
- traverse graph along relevant hops
- synthesize community summaries + chunks. Strong on global/thematic queries ("key trends in the docs?"), multi-hop ("how does X relate to Y via Z?"), and relational data (legal, scientific, org charts)
Cost: Graph RAG indexing is far more expensive (LLM-driven entity extraction, graph construction, summaries) — best for high-value, slow-changing corpora. Combine: use hybrid vector + graph retrieval inside an agentic pipeline for complex use cases.