跳到正文
菜单
简体中文

RAG vs Fine-tuning

Retrieval-Augmented Generation: ground a model answer in documents fetched at query time.

功能对比

这两项技术尚未记录可对比的属性。

该选哪个?

由上述差异按固定规则生成,不是模型生成的。

Choose RAG if…

已记录的属性中,没有任何一项显示它更有优势。

Choose Fine-tuning if…

已记录的属性中,没有任何一项显示它更有优势。

关于本页

页面保持可访问,但在积累足够的带来源细节之前不纳入搜索索引(PRD SEO-08)。

RAG

technique · Techniques

Retrieval-Augmented Generation answers a question by first retrieving relevant passages from a knowledge source and then having a language model compose the answer from them. It solves two problems at once: a model cannot know facts outside its training data, and fine-tuning it on new facts is expensive and must be repeated whenever the facts change. It exists because most factual answers are cheaper to look up than to memorise. The cost is a new dependency chain - embeddings, a vector store, reranking and a generation step - which is why it is the most interconnected node in this graph.

Fine-tuning

technique · Techniques

Fine-tuning continues training an already pre-trained model on a smaller, task-specific dataset so that its weights shift toward the behaviour you want. It solves the problem that a general model may not follow a house style, a domain vocabulary or a fixed output format. It exists because pre-training is expensive but adaptation is not: starting from a pre-trained checkpoint means a modest dataset is enough. It is the main alternative to retrieval when the goal is behaviour rather than fresh facts.