<aside> 📖

Date: Sunday, October 11, 2026 · Week 2, Day 14 · Type: Read Day (~30 min) · Paper: Retrieval-Augmented Generation for Knowledge-Intensive NLP (Lewis et al., 2020)

</aside>

Learning Manual

14.1 The Original RAG Paper — Lewis et al. (2020) and the concept of non-parametric memory.

14.2 The 3 Fatal RAG Failure Points — Retrieval Failure (wrong chunks), Augmentation Failure (context truncation / middle-loss), Generation Failure (hallucination).

The Daily Build

Read the RAG paper abstract and introduction, write a 1-page summary breaking down the 3 primary failure modes of enterprise RAG, and write code reproducing a deliberate retrieval failure and how hybrid search fixes it.

Architecture Diagram

[User Query] ---> [Failure Point 1: Bad Retrieval] ---> [Failure Point 2: Missing Context] ---> [Failure Point 3: Hallucination]

Interview Questions

  1. In the original RAG paper by Lewis et al., what is the difference between parametric memory and non-parametric memory?
  2. How do you systematically diagnose whether an incorrect answer in a RAG system was caused by poor retrieval or by model hallucination?

Problem Statement

Problem 14. Write an automated evaluation function check_factual_overlap(answer: str, context_chunks: list[str]) -> float that calculates the percentage of key nouns in the generated answer that explicitly appear in the retrieved context chunks.

AI-DSA Primitive

Algorithm: Set Intersection Over Union (Jaccard Index).

Mechanics: Calculating word/token overlap ratio between two text sets: J(A,B) = |A∩B| / |A∪B|.

Real-World Production Use: Used in automated hallucination detection metrics in evaluation frameworks (Ragas, DeepEval).

Software Design Pattern

Pattern: Proxy Pattern.

AI Context: Intercepting generated responses to verify factual grounding before returning them to the user.