一文搞懂 RAG

666tester發表於2025-02-07

一、 RAG 有什麼用

RAG 可以解決通用大模型存在的問題

通用的基礎大模型的侷限性

知識的侷限性

幻覺問題

資料安全性

二、 RAG 是什麼

概念

檢索

增強

生成

三、 RAG 的工作原理

建立外部資料

檢索相關資訊

增強 LLM 提示

更新外部資料

四、 RAG 的工作流程

資料準備

資料提取

資料載入
資料處理
後設資料獲取

文字分割

分割原因
分割方法

向量化

簡要介紹
什麼是文字嵌入
為什麼要做嵌入
嵌入的步驟

文字嵌入
建立索引

資料入庫

簡要介紹
儲存方式

應用階段

資料檢索

簡要介紹
檢索步驟
檢索方法

注入 prompt

簡要介紹
舉例說明

生成

簡要介紹

五、 RAG 的體系結構

檢索器模組

生成器模組

融合機制

六、 RAG 的型別

開放域問題解答

特定領域的專用查詢

內容摘要

個性化推薦

複雜場景分析和內容製作

研究資訊和合成

多語言和跨語言應用

參考

https://zhuanlan.zhihu.com/p/668082024
https://blog.csdn.net/m0_70486148/article/details/144883208
https://cloud.tencent.com/developer/article/2373282
https://aws.amazon.com/cn/what-is/retrieval-augmented-generation/
https://blog.csdn.net/2401_82452722/article/details/135934144
https://azure.microsoft.com/zh-cn/resources/cloud-computing-dictionary/what-is-retrieval-augmented-generation-rag

相關文章