How Pretrained Large Language Models Keep Updating Their Knowledge: A Complete Guide
This article explains why pretrained large language models need continual knowledge updates, where those updates fit in the modern training pipeline (pretraining, mid-training, and post-training), and compares the three main approaches: retrieval-augmented generation (RAG), full-parameter supervised fine-tuning, and parameter-efficient fine-tuning (PEFT). It covers how each method changes model weights, their trade-offs in cost, latency, and catastrophic forgetting, and offers practical guidance for choosing and combining them in real projects.
1. The Root of the Problem: Why Knowledge Needs Updating
A large language model’s capabilities come primarily from the pretraining stage. After repeated iterations over massive corpora, the model encodes language patterns and world knowledge as numerical values fixed inside its network weights. This “parametric memory” carries two inherent constraints:
- Knowledge cutoff: Once training finishes, the model’s internal knowledge stops at a fixed point in time. New events, newly released material, and emerging terminology that appear after training remain unknown to the model.
- Static nature: Unlike a database, parameters have no “create, read, update, delete” semantics. You cannot precisely update a single fact the way you would modify one record.
As a result, keeping an already-trained foundation model continuously absorbing new knowledge without degrading its existing capabilities becomes a challenge that engineering practice cannot avoid. A common approach in the industry is to release new versions periodically and update the stated “knowledge cutoff date” in the release notes. Supporting this process are several techniques applied during the post-training stage.
2. The Key Window for Version Iteration: The Mid-Training Stage
Modern large model training is typically divided into three stages: large-scale pretraining, mid-training, and post-training (alignment, instruction fine-tuning, and so on).
What deserves attention is that when many organizations release a new version, the model architecture, parameter count, and context window often stay the same. Only the data recipe and training duration change. This kind of “minor version” update mostly happens in the mid-training stage: target-domain data (such as new corpora, specialized documents, and multilingual capabilities) is added here, allowing the model to fill capability gaps at relatively low cost before it moves on to post-training for alignment.
The advantages of this design include:
- Controllable cost: There is no need to pretrain from scratch; the previous generation’s base model can be reused.
- Efficient iteration: Adjusting data mixtures allows fast trial and error and rolling releases.
- Risk isolation: Decoupling knowledge injection from capability alignment makes it easier to evaluate and roll back each one separately.
Mid-training is the bridge between “knowledge injection” and “capability shaping.” Understanding this stage provides the background for the various update methods that follow.
3. Three Technical Paths: No Parameter Changes, Full Parameter Changes, Lightweight Parameter Changes
Viewed along the dimension of “whether and how much to change the model parameters,” knowledge-update methods fall into three categories.
Path 1: Retrieval-Augmented Generation (RAG) — No Parameter Changes
RAG works by “attaching an external knowledge base.” When a user asks a question, the system first retrieves relevant fragments from an external knowledge source (documents, databases, vector indexes), then concatenates those fragments with the question before feeding them to the model, letting it “answer with an open book.”
The conceptual processing flow is as follows:
Input question q→ Vectorize and retrieve, obtaining relevant fragments [d1, d2, ..., dk]→ Build prompt = template(q, [d1, ..., dk])→ Model generates an answer based on the prompt
- Advantages: Lowest cost and fastest to take effect; knowledge can be added, deleted, or modified in real time without retraining; sources are traceable, making verification easy.
- Limitations: It depends on retrieval quality; the knowledge always lives in the “context” and is not truly internalized; long contexts introduce latency and compute overhead; support is limited for tasks requiring deep reasoning or numerical computation.
RAG has spawned many variants (reranking, query rewriting, multi-round retrieval, and more) and is currently the mainstream choice for avoiding hallucination and quickly incorporating the latest knowledge.
Path 2: Full-Parameter Supervised Fine-Tuning — Full Parameter Changes
Full-parameter fine-tuning updates all of the model’s weights on new data, so knowledge is truly “written into” the parameters. It suits injecting large amounts of new knowledge, but directly modifying pretrained weights brings two prominent problems:
- Catastrophic forgetting: Learning new knowledge overwrites the representations of old knowledge, causing the model to regress on its existing capabilities.
- Worsened hallucination: Knowledge introduced by fine-tuning conflicts with the model’s existing knowledge, or with the new samples themselves. When the boundaries are blurred, the model is more likely to “fabricate” answers. This phenomenon is especially severe for numerical knowledge (dates, statistics, prices, and so on).
In other words, the cost of “remembering more firmly” may be “forgetting more” and “being more confidently wrong.”
Path 3: Parameter-Efficient Fine-Tuning (PEFT) — Lightweight Parameter Changes
The core idea of PEFT is to freeze the original weights and train only a small number of new parameters. Represented by low-rank adaptation (LoRA), the approach approximates weight updates by injecting low-rank matrices through a side path:
# Pseudocode: original weights W are frozen; only low-rank matrices A, B are trainedFreeze(W)Initialize low-rank matrices A (d × r), B (r × k), r << min(d, k)Forward pass:y = W·x + (B·A)·x # side-path contribution is a scalable increment ΔW = B·ATraining:Compute gradients and update only A, B
- Advantages: The number of trainable parameters is very small, keeping memory and storage overhead low; the original capabilities are well preserved, with little forgetting risk; separate adapters can be maintained for different tasks or domains and switched flexibly.
- Limitations: The ability to inject very large-scale general knowledge is limited; coordinating and managing multiple adapters requires engineering support.
PEFT has become a highly cost-effective solution in scenarios such as domain adaptation, style customization, and instruction fine-tuning.
4. Choosing an Approach: There Is No Best, Only the Most Suitable
| Dimension | RAG | Full-Parameter Fine-Tuning | PEFT |
|---|---|---|---|
| Parameter changes | None | All | A small number |
| Update latency (freshness) | High | Low | Medium |
| Main cost | Retrieval/context compute | Training compute | Training compute (lower) |
| Forgetting risk | None | High | Low |
| Knowledge internalization | No | Yes | Partial |
| Typical scenarios | Real-time/traceable knowledge | Massive new-knowledge injection | Domain and capability adaptation |
A common combination in practice is: use mid-training or PEFT to shape capabilities and style, and use RAG to handle time-sensitive, traceable factual knowledge. The two complement each other, balancing “internalized capability” with “real-time accuracy.”
5. Engineering Best Practices
- Identify the need type first: Are you “missing knowledge” or “missing capability”? For missing real-time facts, prioritize RAG; for missing domain or style, prioritize PEFT.
- Prioritize data quality over quantity: High-quality, deduplicated, well-structured corpora suppress hallucination more effectively than blindly accumulating volume.
- Watch out for numerical hallucinations: For updates involving dates, amounts, and quantities, add retrieval-based verification or rule constraints.
- Build an evaluation loop: Use a fixed test set to measure both “new-knowledge acquisition” and “old-capability retention,” preventing forgetting from being overlooked.
- Leverage general cloud capabilities: Using object storage to manage corpora, message queues to orchestrate data pipelines, container platforms to host training and inference, and logging and monitoring services to track results can significantly reduce engineering complexity.
6. Conclusion
Updating a large model’s knowledge is not a single technique but a combination of approaches: mid-training handles the backbone of version iteration, RAG handles real-time external knowledge, full-parameter fine-tuning is used for large-scale injection, and PEFT balances cost against forgetting control. Understanding the principles and costs of each method, and making choices based on a business’s trade-offs among “timeliness, accuracy, cost, and maintainability,” is what allows a model to keep “learning throughout its life” reliably in real projects.
