RAG 系统架构概览
了解 RAG 系统的高层组件,包括数据源、检索器和生成器。
RAG 系统架构概览 是 CoddyKit 上的免费 LLM Apps in Production (RAG + Vector DB + Caching) 课时。 这是第 3 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 LLM Apps in Production (RAG + Vector DB + Caching) 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 LLM Apps in Production (RAG + Vector DB + Caching) 课程共包含 4 节课。
本课时的部分内容尚未翻译,以英文显示。
Intro to RAG Architecture
Now let's look at the building blocks of a RAG system. Knowing the architecture shows you exactly how RAG makes LLMs more accurate and reliable.
The Three Main Pillars
RAG blends retrieval (finding info) and generation (creating text) through three components: data sources, a retriever, and a generator.
Component 1: Data Sources
The data sources hold the external knowledge your LLM wasn't trained on — PDFs, web pages, internal wikis, database records, and more.
Preparing Your Data
First your data gets processed: large documents are split into smaller, searchable pieces called chunks, like indexing a library by chapter instead of by whole book.
Component 2: The Retriever
The retriever is a smart search engine for your chunks. It understands the meaning of a query, not just keywords, to fetch the most relevant context.
Retriever in Action
When a user asks, the retriever scans all processed chunks and pulls out the few most likely to hold the answer, passing them along as context.
Component 3: The Generator (LLM)
The generator is your LLM — the part that writes the response. In RAG it gets two inputs: your original question and the context the retriever found.
LLM's Role: Grounded Responses
Instead of leaning on pre-trained knowledge alone, the LLM uses retrieved context to ground its answer, like an expert handed the exact reference documents.
The Full RAG Flow
The full RAG flow: query in, retriever finds chunks, query plus chunks go to the generator, the LLM writes a grounded answer, the user gets a factual reply.
Check Your Understanding
Which component is primarily responsible for finding relevant information from your knowledge base when a user asks a question?
RAG Architecture Recap
Recap: a RAG system has three parts — data sources (the knowledge), retriever (the smart search), and generator (the LLM crafting grounded answers).
常见问题解答
「RAG 系统架构概览」课时是免费的吗?
是的 — 「RAG 系统架构概览」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 LLM Apps in Production (RAG + Vector DB + Caching) 课程的其余内容,请升级到 CoddyKit PRO。 LLM Apps in Production (RAG + Vector DB + Caching) 课程共包含 4 节课。
「RAG 系统架构概览」这节课中我会学到什么?
了解 RAG 系统的高层组件,包括数据源、检索器和生成器。 你通过在浏览器中直接运行的动手代码来练习 LLM Apps in Production (RAG + Vector DB + Caching),全天候 AI 导师会在你学习这节课的过程中回答你的问题。
学习 LLM Apps in Production (RAG + Vector DB + Caching) 需要有经验吗?
无需任何先前经验。CoddyKit 上的 LLM Apps in Production (RAG + Vector DB + Caching) 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 3 节课,共 4 节。
「RAG 系统架构概览」课时需要多长时间?
大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。
我能在这节 LLM Apps in Production (RAG + Vector DB + Caching) 课中编写并运行代码吗?
能。每节 LLM Apps in Production (RAG + Vector DB + Caching) 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。
此课程中的所有课时
- 了解生产环境中的 LLM 应用
- 检索增强生成基础
- RAG 系统架构概览
- 提示工程与上下文窗口