Files
nexus/wiki/concepts/RAG.md
2026-04-18 03:18:06 +08:00

30 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "RAG"
type: concept
tags: [llm, rag, ai]
date: 2026-04-18
---
## Description
检索增强生成Retrieval-Augmented Generation为 LLM 提供外部实时知识的机制,被誉为 LLM 的"随身图书馆助理"。
## Core Problem
LLM 只能回答训练数据截止时间之前的问题对实时信息一无所知。LLM 在思考方面非常出色,但对当前情况却一无所知。
## Key Components
- **检索Retrieval**:从外部知识库(向量数据库、知识图谱、公司内部文档等)检索最相关的信息块
- **增强生成Augmented Generation**:将检索到的内容作为上下文输入 LLM指示其基于这些上下文生成答案
## Key Benefits
1. **知识更新与定制**:无需重新训练 LLM 即可获取最新信息
2. **消除幻觉**:通过提供事实依据,极大降低 LLM 胡编乱造的风险
3. **引用来源**:可提供信息来源链接或文档页码,增加可信度
## Related Technologies
- [[向量数据库]]:存储和检索知识的技术
- [[NL2SQL]]:自然语言转 SQL使 Agent 能直接查询数据库
## Connections
- 依赖 [[LLM]] 进行答案生成
- 与 [[开源平替]] 结合实现私有化部署
- 使用 [[语义搜索]] 提高检索精度