Files
nexus/wiki/concepts/RAG.md

27 lines
1.0 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: [rag, retrieval, llm, knowledge]
aliases: [RAG, Retrieval-Augmented Generation, 检索增强生成]
last_updated: 2025-12-20
---
## Definition
Retrieval-Augmented GenerationRAG检索增强生成通过从外部知识库检索相关信息来增强大语言模型的回答质量解决模型在陌生领域的幻觉Hallucination问题。
## Key Facts
- 大模型在陌生领域容易产生幻觉,"一本正经胡说八道"
- RAG 通过给模型"一些提示",引导其在正确方向上回答
- 效果案例:正确率从 60% 提升至 90%
- RAG 依赖 [[Embedding]] 技术实现语义检索
- 典型 RAG 流程:用户问题 → 检索外部知识 → 将检索结果注入 Prompt → LLM 生成回答
## Connections
- [[Embedding]] ← 依赖 ← [[RAG]]
- [[Hallucination]] ← 解决 ← [[RAG]]
- [[Large Language Model]] ← 增强 ← [[RAG]]
- [[LangChain]] ← 支持 ← [[RAG]]
## Sources
- [[大模型相关术语和框架总结llm-mcp-prompt-rag-vllm-token-数据蒸馏]]