← Agentic Architectural Patter… Latent Shelf · Ch.3

Chapter Study Guide · Part 1

The Spectrum of LLM Adaptation for Agents: RAG to Fine-tuning

Pretrained LLMs are generalists; enterprise agents must be specialists — and adaptation is usually a thoughtful combination of techniques, not a single choice.

— the chapter's premise

How to turn a generic model into a specialized agent brain. It frames the Agentic AI Maturity Model, then walks the adaptation spectrum — the RAG levels, fine-tuning (PEFT vs FFT), in-context learning, and the grounding practices that keep any of them reliable.

6-level agentic maturityRAG spectrumPEFT vs FFT15 quiz questions
01Generalist to specialist

Why adapt — and the Agentic AI Maturity Model

Pretrained LLMs are generalists; enterprise agents need to be specialists that speak a domain's vocabulary, follow its workflows, and respect its proprietary data. Adaptation delivers accuracy & relevance, reliability (less hallucination via grounding), efficiency (smaller focused models), and goal alignment. It also enables a move from one centralized LLM to distributed Router-Executor / Planner-Worker designs.

Key concept · Agentic AI Maturity Model (expands GenAI L5–L6)

  • 1 · Basic agentic systems — a single agent, predefined workflows, function calls to tools.
  • 2 · Dynamic single-agent workflows — the agent dynamically selects from pre-approved tools.
  • 3 · Introspective — step-by-step reasoning (e.g. ReAct) before acting.
  • 4 · Multi-agent — specialized agents collaborate across a task.
  • 5 · Advanced multi-agent — richer coordination while maintaining policy adherence.
  • 6 · Self-correcting — multi-turn feedback, self-checks, and correction.
02RAG spectrum

Right data, right time

Retrieval-augmented generation (RAG) brings external knowledge to the model at inference time — the right data at the right moment. Its sophistication is a spectrum mapping directly onto the GenAI Maturity Model.

The RAG spectrum mapped to maturity.
RAG levelDescriptionMaturity level
"Vanilla" RAGBasic contextual augmentation from a single knowledge source.L2 — Contextual enhancement
Advanced RAGRe-ranking, fusion, and citing sources across multiple sources.L4 — Grounding & evaluation
Agentic RAGAutonomous agents orchestrate the whole retrieval process, often collaboratively.L5–L6 — Single/multi-agent

Whatever the level, RAG's objective is constant: give the LLM the specific, accurate, timely information it needs to run its sense–reason–plan–act cycle. But some needs call for more enduring change to the model itself — that is fine-tuning.

03Fine-tuning

PEFT vs full fine-tuning

Fine-tuning is a more profound, persistent adaptation that changes the model's weights. It ranges from lightweight PEFT (LoRA, adapter/prefix/prompt tuning — modify a small subset of parameters, keep the rest frozen) to full fine-tuning (FFT) (update all or most weights).

FFT vs PEFT from an agentic perspective.
ConsiderationFFTPEFT
Depth of specializationHighest — deep adaptationModerate–high; may cap below FFT
Training costVery high (GPU/TPU, time)Low–moderate
Dataset sizeLarge, high-quality labeledSmall–moderate
Catastrophic forgettingHigher riskLower — base stays frozen
Many agentsCostly — a full model eachCheap — share one base + adapters

Key concept · Supervised vs unsupervised, and why PEFT fits agents

Training data comes in two forms: unsupervised (domain-adaptive) fine-tuning continues pretraining on unlabeled domain text to absorb vocabulary and style; supervised fine-tuning (SFT) uses labeled input-output pairs to teach specific tasks, instruction-following, and output format. For a suite of specialized agents, PEFT usually wins — many LoRA adapters share one frozen base model, slashing overhead while avoiding catastrophic forgetting. FFT is reserved for when the deepest possible specialization justifies the cost.

04ICL & grounding

Adapt on the fly, then verify

In-context learning (ICL) lets an agent learn a task from examples placed directly in the prompt — few-shot or, with large windows, many-shot — with no change to the model's weights. The agent's control logic constructs these prompts dynamically, making ICL ideal for adapting to novel situations and shifting preferences in real time.

Key concept · Grounding — the cornerstone of reliability

Whatever the adaptation method, grounding connects output back to verifiable sources — essential because agent outputs trigger real-world actions. Four techniques: citing sources & attributions (link answers to the document/section used), fact verification & cross-referencing (programmatically check key assertions, sometimes with a dedicated fact-checking sub-agent), confidence scores (respond cautiously or escalate when the model is unsure), and proactive ambiguity reduction (ask a clarifying question before acting on a vague input). The strongest agents combine RAG + fine-tuning + ICL + grounding.

★Test yourself

Chapter 3 quiz

Fifteen questions on the maturity model, the RAG spectrum, PEFT vs FFT, in-context learning, and grounding. Answer first, then expand Show answer.

Part A · Multiple choice

Q1

Why must enterprise agents adapt a generic LLM?

  • A Generic models are always broken
  • B Agents need specialist domain vocabulary, workflows, and proprietary-data understanding
  • C To increase token cost
  • D Adaptation is legally required
Show answer

B. Pretrained LLMs are generalists; specialization yields accuracy, reliability, efficiency, and goal alignment.

Q2

Which RAG level maps to Level 4 (Grounding & evaluation)?

  • A Vanilla RAG
  • B Advanced RAG
  • C Agentic RAG
  • D No RAG
Show answer

B — Advanced RAG. Its re-ranking, fusion, and source citation align with grounding and evaluation. Vanilla = L2, Agentic = L5–L6.

Q3

Which is a PEFT technique?

  • A LoRA
  • B Retraining all weights
  • C Needle in a haystack
  • D Quantization
Show answer

A — LoRA. Also adapter tuning, prefix tuning, and prompt tuning. Retraining all weights is FFT.

Q4

What is a key advantage of PEFT when building many specialized agents?

  • A It always outperforms FFT
  • B Multiple adapters can share one frozen base model, cutting overhead
  • C It needs no data
  • D It changes all weights
Show answer

B. Sharing a base model across LoRA adapters drastically reduces storage/serving cost and avoids catastrophic forgetting.

Q5

In-context learning adapts the agent by:

  • A Updating the model's weights
  • B Providing examples in the prompt, with no weight changes
  • C Retraining from scratch
  • D Deleting the memory
Show answer

B. ICL infers the pattern from few-shot/many-shot examples in context — ideal for real-time adaptation.

Q6

Which grounding technique means asking a clarifying question before acting on a vague input?

  • A Citing sources
  • B Confidence scoring
  • C Proactive ambiguity reduction
  • D Quantization
Show answer

C. It grounds the agent's own interpretation, preventing a cascade of downstream errors.

Q7

What distinguishes supervised fine-tuning (SFT) from unsupervised/domain-adaptive fine-tuning?

  • A SFT uses labeled input-output pairs; unsupervised continues pretraining on unlabeled domain text
  • B They are identical
  • C SFT never uses data
  • D Unsupervised requires labels
Show answer

A. SFT teaches specific tasks/format from labeled pairs; unsupervised absorbs domain vocabulary and style.

Part B · True or false

Q8

Adapting an LLM is usually a single-method choice, not a combination.

Show answer

False. It's typically a thoughtful combination — RAG, fine-tuning, ICL, and grounding aligned to the agent's needs.

Q9

FFT carries a higher risk of catastrophic forgetting than PEFT.

Show answer

True. Updating all weights can erode general capabilities; PEFT freezes most of the base model.

Q10

Grounding is optional for agents because their outputs rarely have consequences.

Show answer

False. Agent outputs trigger real actions and high-stakes decisions, so grounding is a critical requirement.

Q11

RAG operates at inference time without changing the model's weights.

Show answer

True. RAG dynamically brings external knowledge to the model; fine-tuning is what changes weights.

Part C · Short answer

Q12

Name the three levels of the RAG spectrum.

Show answer

Vanilla RAG, Advanced RAG, and Agentic RAG.

Q13

Give three ways PEFT differs from FFT.

Show answer

Any three: lower training cost, smaller datasets, less catastrophic forgetting, cheaper for many agents (shared base), and it modifies only a small parameter subset.

Q14

Name the four grounding techniques.

Show answer

Citing sources & attributions, fact verification/cross-referencing, confidence scores, and proactive ambiguity reduction.

Q15

Which four techniques combine to make an LLM truly "agent-ready"?

Show answer

RAG (dynamic context), fine-tuning (deep specialization), ICL (flexible on-the-fly adaptation), and grounding (reliability).