72 / 90

Day 72: Failure Attribution, Qualitative Error Taxonomies & Comparison Reports

Categorize failure modes into hallucinations, formatting violations, refusals, and catastrophic forgetting, authoring an honest model comparison report.

Self-Directed Learning & Python Engineering Foundations 480 active minutes (8 hours)
01 120 min

Qualitative Error Taxonomies: Hallucinations, Format Violations & Refusals

Agent-Assisted Engineering Check

Prerequisites

Day 71 Quantitative Evaluation Metrics and Error Analysis Principles.

Learning Objective

Classify LLM failure instances into a 4-tier error taxonomy (intrinsic/extrinsic hallucination, schema violation, over-refusal, reasoning breakdown) and attribute root causes.

Instructions

1. Study Ji et al. (2023) NLG hallucination taxonomy: distinguish Intrinsic Hallucination (contradicting source premises or context provided in prompt) from Extrinsic Hallucination (generating fabricated, unverifiable claims absent from input).
2. Formalize Schema & Formatting Violations: invalid JSON syntax, missing required keys, markdown wrapper leaks (e.g. producing ```json code fences when strict raw payload was requested), and token truncation.
3. Analyze Exaggerated Safety Over-Refusal (Röttger et al. 2023 XSTest): safety classifiers triggering false-positive refusals on benign prompts containing sensitive lexical overlap (e.g. refusing 'How to kill a running Linux process').
4. Map Reasoning Chain Breakdown: computational arithmetic mistakes, premise confusion, and circular reasoning.
5. Build an attribution flowchart: determine whether error stems from pretraining data absence, instruction-tuning confusion, or sampling temperature variance.

Practice & Prediction Log

Given a sample evaluation log with 4 failure outputs, write a Python classifier categorize_failure(output_record) that assigns each failure to the appropriate taxonomy bucket and suggests the corrective engineering intervention.

Independent Mastery Criterion

Categorize arbitrary model errors into the 4 canonical taxonomy classes with actionable engineering mitigations.

Authoritative Source Resources & Provenance

linking Open Access / CC BY 4.0

Survey of Hallucination in Natural Language Generation

Author: Ziwei Ji, Nayeon Lee, Rita Frieske, Tiezheng Yu, Dan Su, Yan Xu, Etsuko Ishii, Ye Jin Bang, Andrea Madotto, Pascale Fung | Original Source Link ↗

Relevant Section / Range: Section 2.1 Categorization (intrinsic and extrinsic hallucination)

Verified Version & Date: ACM Computing Surveys 2023 / arXiv:2202.03629v4 (Verified: 2026-10-30)

Selection Rationale:

Primary taxonomy of hallucinations in NLG, formalizing the critical distinction between intrinsic hallucinations (contradicting source input context) and extrinsic hallucinations (asserting unverifiable external facts).

Source Prerequisites:

Natural language generation, factuality evaluation, intrinsic vs extrinsic hallucination.

Safe Fallback (Offline Resilience):

The intrinsic/extrinsic taxonomy, fact-verification prompt protocols, and error attribution workflows are completely developed in lesson modules.

Compared Candidate Sources & Selection Analysis (2)

Focuses on abstractive summarization faithfulness; Ji et al. provides the overarching taxonomy across dialogue, QA, and generation.

Follow-up survey on LLMs; Ji et al. sets out the taxonomy distinctions utilized across evaluation literature.

linking Open Access / CC BY 4.0

XSTest: A Test Suite for Identifying Exaggerated Safety Behaviors in Large Language Models

Author: Paul Röttger, Hannah Rose Kirk, Bertie Vidgen, Giuseppe Attanasio, Federico Bianchi, Dirk Hovy | Original Source Link ↗

Relevant Section / Range: Section 4.4 Results on Unsafe Prompts and Appendix D Details on Automated Evaluation

Verified Version & Date: NAACL 2024 / arXiv:2308.01263v2 (Verified: 2026-10-30)

Selection Rationale:

Groundbreaking benchmark identifying exaggerated safety behaviors and false-positive refusals, formalizing test suites that contrast real unsafe prompts against benign prompts with sensitive lexical overlap.

Source Prerequisites:

Safety alignment, refusal classifiers, false-positive safety evaluation.

Safe Fallback (Offline Resilience):

The 10 refusal prompt categories, refusal detection regex/heuristics, and over-refusal error quantification are implemented in lesson exercises.

Compared Candidate Sources & Selection Analysis (2)

Shows that zero-shot chain-of-thought increases biased and toxic outputs on harmful prompts; XSTest provides an explicit, quantitative evaluation dataset for measuring unnecessary refusal rates.

Safety fine-tuning methodology; XSTest isolates the diagnostic metric for detecting exaggerated refusal side effects.

02 120 min

Catastrophic Forgetting & General Capability Regressions

Independent Mastery Check (no AI assistance).

Prerequisites

Day 72 Activity 1 and fine-tuning weight dynamics.

Learning Objective

Audit catastrophic forgetting of pretraining and general instruction-following capabilities following domain adaptation fine-tuning.

Instructions

1. Review Kirkpatrick et al. (2017) and Luo et al. (2023): domain fine-tuning optimizes parameters on specialized distributions, frequently causing steep capability regressions on general language, reasoning, and coding tasks.
2. Understand the Alignment Tax and Specialization Penalty: an adapter fine-tuned on legal or medical QA may achieve +15% domain EM while suffering a -25% drop on GSM8K reasoning or loss of multi-turn conversational nuance.
3. Formulate the Catastrophic Forgetting Audit Protocol: evaluate model checkpoints across a locked general benchmark suite (MMLU STEM, GSM8K, HumanEval, ARC-Challenge) before and after domain tuning.
4. Calculate Relative Retention Ratio: Retention = Metric_post / Metric_pre. Define acceptable regression thresholds (e.g. <= 5% degradation on general capabilities).
5. Analyze mitigation trade-offs: replay buffers (mixing 10% general instruction data into domain tuning), parameter-efficient LoRA rank limits, and KL penalty terms.

Practice & Prediction Log

You are auditing a fine-tuned financial reasoning model. Pre-tuning MMLU score was 64.2% and GSM8K was 52.0%. Post-tuning financial QA accuracy reached 84.0%, but MMLU dropped to 48.1% and GSM8K dropped to 31.5%. Calculate the percentage degradation and formulate a 3-step mitigation strategy.

Independent Mastery Criterion

Quantify general capability regressions across held-out benchmarks and design data-mixing and architectural mitigations.

Authoritative Source Resources & Provenance

linking Open Access / PNAS Open Access

Overcoming Catastrophic Forgetting in Neural Networks

Author: James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, et al. | Original Source Link ↗

Relevant Section / Range: Section 2 Elastic weight consolidation

Verified Version & Date: PNAS 2017 / arXiv:1612.00796v2 (Verified: 2026-10-30)

Selection Rationale:

Foundational paper formalizing catastrophic forgetting during continual fine-tuning, explaining why updating parameters on domain distributions causes dramatic capability loss on pretraining tasks.

Source Prerequisites:

Neural network weight drift, Fisher information matrix, continual learning.

Safe Fallback (Offline Resilience):

Mathematical explanation of weight trajectory divergence, Fisher regularized objectives, and forgetting audit protocols are integrated into the lesson.

Compared Candidate Sources & Selection Analysis (2)

Cognitive science perspective; Kirkpatrick et al. provides the modern deep neural network gradient formulation (EWC).

Online path integral regularization; Kirkpatrick introduces the benchmark standard for evaluating catastrophic forgetting.

linking Open Access / CC BY 4.0

An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuning

Author: Yun Luo, Zhen Yang, Fandong Meng, Yingxue Liu, Jie Zhou, Yue Zhang | Original Source Link ↗

Relevant Section / Range: Section 3 Method (3.1 Continual Tasks, 3.3 Evaluation Metric) and Section 5.1 Main Results

Verified Version & Date: arXiv:2308.08747v2 (Verified: 2026-10-30)

Selection Rationale:

Rigorous empirical investigation demonstrating how domain fine-tuning degrades foundation LLMs across reasoning, coding, and general instruction following, comparing full fine-tuning against parameter-efficient adapters.

Source Prerequisites:

Instruction fine-tuning, general capability retention, LoRA vs full fine-tuning degradation.

Safe Fallback (Offline Resilience):

General benchmark regression tests, forgetting audit templates, and pre/post radar chart analysis are completely provided.

Compared Candidate Sources & Selection Analysis (2)

Focuses on QA domain transfers; Luo et al. comprehensively assesses broad LLM capability collapse across multiple benchmark domains.

Studies forgetting after fine-tuning multimodal LLMs; Luo et al. targets text-only LLM continual fine-tuning and compares adapter-based with full-parameter tuning.

03 120 min

Pre/Post Fine-Tuning Artifact Analysis & Multi-Dimensional Trade-Off Matrix

Agent-Assisted Engineering Check

Prerequisites

Day 72 Activities 1-2 and deployment resource arithmetic.

Learning Objective

Construct a grounded multi-dimensional trade-off matrix balancing task accuracy, inference latency, memory footprint, and serving costs across pre/post fine-tuning artifacts.

Instructions

1. Real-world model deployment is never determined solely by held-out task accuracy; serving latency, memory limits, and financial costs dictate engineering feasibility.
2. Define the 5 trade-off dimensions: (a) Task Performance (EM, Token F1, ROUGE-L), (b) Inference Latency (Time to First Token TTFT, Tokens per Second TPS), (c) Memory Footprint (FP16 weights, KV cache, adapter VRAM overhead), (d) Training & Maintenance Cost (GPU compute hours, adapter disk storage, multi-tenant serving capacity), and (e) Operational Reliability (format compliance rate, refusal rate).
3. Compare artifacts: Base Model (Zero-Shot), Instruction-Tuned Chat Model, and Domain-Adapted LoRA Checkpoint.
4. Apply weight merging trade-off: evaluate whether to deploy merged weights (zero-latency overhead, fixed single-tenant model) vs unmerged dynamic LoRA adapters (multi-tenant shared base weight, minor kernel invocation latency).
5. Prevent post-hoc rationalization: establish minimum acceptance thresholds (SLA) before reviewing evaluation numbers.

Practice & Prediction Log

Populate a trade-off scorecard comparing 3 candidate architectures (Zero-shot Base 7B, General Chat 7B, Domain LoRA 7B) across accuracy, P99 latency (ms), VRAM (GB), and format compliance (%). Provide an evidence-backed production recommendation.

Independent Mastery Criterion

Synthesize empirical benchmark data and hardware constraints into multi-dimensional trade-off matrices for executive decision-making.

Authoritative Source Resources & Provenance

linking Open Access

Llama 2: Open Foundation and Fine-Tuned Chat Models

Author: Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, et al. | Original Source Link ↗

Relevant Section / Range: Section 3.4 RLHF Results and Section 4.4 Safety Evaluation of Llama 2-Chat

Verified Version & Date: arXiv:2307.09288v2 (Verified: 2026-10-30)

Selection Rationale:

Defines the standard LLaMA-2 instruction format ([INST] <<SYS>> ... <</SYS>> [/INST]) and analyzes token boundary alignment impact on generation stability.

Source Prerequisites:

Transformer architecture, RLHF/SFT pipelines.

Safe Fallback (Offline Resilience):

The LLaMA-2 prompt structure, token boundary rules, and comparative analysis are fully worked out in curriculum lessons.

Compared Candidate Sources & Selection Analysis (2)

Original foundation model paper without conversational chat tuning details; LLaMA-2 formalizes dialogue formatting.

Jiang et al. Mistral 7B ↗ compared_alternative [Open Access]

Adopts similar [INST] formatting; LLaMA-2 provides the foundational ablation on system prompt integration.

linking Open Access

Training language models to follow instructions with human feedback

Author: Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, et al. | Original Source Link ↗

Relevant Section / Range: Section 4.2 Results on public NLP datasets ('alignment tax') and Appendix E.1

Verified Version & Date: arXiv:2203.02155v1 (Verified: 2026-10-30)

Selection Rationale:

Foundational InstructGPT paper defining the SFT objective: maximizing log-likelihood of demonstrator completions conditioned on prompts.

Source Prerequisites:

Supervised fine-tuning, conditional autoregressive generation.

Safe Fallback (Offline Resilience):

The conditional likelihood objective and prompt-conditioning derivations are completely formulated in the review.

Compared Candidate Sources & Selection Analysis (2)

Earlier RLHF formulation on summarization; InstructGPT standardizes the prompt-response SFT training phase.

Focuses on massive multi-task scaling; InstructGPT details the exact prompt-conditioned loss setup.

04 120 min

Assessment: Authoring an Honest, Reproducible Model-Comparison Report

Independent Mastery Check (no AI assistance).

Prerequisites

Day 72 Activities 1-3.

Learning Objective

Author a comprehensive, transparent model-comparison report synthesizing held-out benchmark metrics, 95% bootstrap confidence intervals, error taxonomies, and negative results.

Instructions

Study source: within this activity's existing reading/practice time, use Hugging Face LLM Evaluation Guidebook (legacy edition), contents/model-as-a-judge/evaluating-your-evaluator.md; contents/troubleshooting/troubleshooting-reproducibility.md, then explain one connection to the local task in your own words. Keep the local exercise and acceptance checks; use its original explanation if the external source is unavailable. 1. Adopt Mitchell et al. (2019) Model Cards and Gebru et al. (2021) Datasheets reporting standards.
2. Structure the formal report: (1) Executive Summary & Decision, (2) Pre-declared Protocol & Hypotheses, (3) Quantitative Scorecard with 95% Bootstrap Confidence Intervals, (4) Qualitative Error Breakdown (Hallucinations, Formatting Violations, Refusals, Forgetting), (5) Operational Trade-off Matrix (Latency, VRAM, Cost), (6) Negative Results & Regressions (where the model failed), and (7) Reproducibility Manifest (hyperparameters, seeds, prompt signatures).
3. Enforce scientific honesty: explicitly state all negative findings, test set sizes, and statistical confidence overlaps where differences are not significant.
4. Grade reports against a rubric demanding verified data provenance, full rights disclosure, and reproducibility.

Practice & Prediction Log

Draft an executive summary and statistical scorecard section for a model comparison report evaluating Model Alpha (Fine-tuned LoRA) vs Model Beta (Base + 5-shot CoT) on a 100-sample test slice. State whether the observed +3.2% accuracy gain is statistically conclusive.

Independent Mastery Criterion

Produce publication-grade, honest model-comparison reports incorporating bootstrap confidence intervals, error taxonomies, and explicit negative result disclosures.

Authoritative Source Resources & Provenance

linking CC BY-NC-SA 4.0 noncommercial share-alike

Hugging Face LLM Evaluation Guidebook (legacy edition)

Author: Hugging Face evaluation-guidebook contributors | Original Source Link ↗

Relevant Section / Range: contents/model-as-a-judge/evaluating-your-evaluator.md; contents/troubleshooting/troubleshooting-reproducibility.md

Verified Version & Date: Public edition checked 2026-11-01; moving pages may change

Selection Rationale:

Teaching-oriented evaluation design and reproducibility guidance complements the benchmark papers. Stable methodological chapters only; not a current tooling/version reference.

Source Prerequisites:

Held-out data, basic language-model metrics and experimental comparisons.

Safe Fallback (Offline Resilience):

Use the original localized explanations, exercises and checks already present in this activity; no external account or purchase is required for that fallback.

Compared Candidate Sources & Selection Analysis (2)
HELM ↗ compared_alternative [Open Access / CC BY 4.0]

Retained for the multi-metric framework; the guidebook makes practical choices easier to teach.

LM Evaluation Harness ↗ compared_alternative [MIT]

Useful implementation cross-check; tool configuration alone does not teach metric choice or evaluator limitations.

linking arXiv non-exclusive license / Open Access

Model Cards for Model Reporting

Author: Margaret Mitchell, Simone Wu, Andrew Zaldivar, Parker Barnes, Lucy Vasserman, Ben Hutchinson, Elena Spitzer, Inioluwa Deborah Raji, Timnit Gebru | Original Source Link ↗

Relevant Section / Range: Section 4 Model Card Sections (4.1-4.9)

Verified Version & Date: FAT* 2019 / arXiv:1810.03993v2 (Verified: 2026-10-30)

Selection Rationale:

Primary standard for structured, transparent model reporting, mandating explicit disclosure of intended uses, evaluation slices, out-of-scope tasks, ethical considerations, and negative results.

Source Prerequisites:

Evaluation reporting, demographic and performance slicing, model limitations and caveats.

Safe Fallback (Offline Resilience):

Complete Model Card Markdown templates, section schemas, and evaluation disclosure checklists are provided in the curriculum.

Compared Candidate Sources & Selection Analysis (2)

Corporate transparency audit index; Mitchell et al. provides the concrete technical artifact specification for individual model releases.

Dataset documentation focus; Mitchell et al. provides the required specification for trained model artifact reporting.

linking arXiv non-exclusive license / Open Access

Datasheets for Datasets

Author: Timnit Gebru, Jamie Morgenstern, Briana Vecchione, Jennifer Wortman Vaughan, Hanna Wallach, Hal Daumé III, Kate Crawford | Original Source Link ↗

Relevant Section / Range: Section 3 Questions and Workflow (3.1 Motivation through 3.7 Maintenance)

Verified Version & Date: Communications of the ACM 2021 / arXiv:1803.09010v8 (Verified: 2026-10-30)

Selection Rationale:

Foundational literature introducing standardized documentation for machine learning datasets, specifying questions on dataset composition, collection mechanisms, preprocessing, and distribution rights.

Source Prerequisites:

Dataset provenance, curation motivation, preprocessing transparency, maintenance lifecycle.

Safe Fallback (Offline Resilience):

Datasheet questionnaires, provenance schemas, and dataset auditing checklists are completely integrated into lesson materials.

Compared Candidate Sources & Selection Analysis (2)

Linguistic demographic documentation focus; Gebru et al. provides the universal engineering datasheet framework adopted across AI.

Nutrition label metaphor; Gebru et al. is a widely cited framework for dataset documentation in both academic and industrial practice.