CSCI-SHU 376: Natural Language Processing
Hua Shen
Course Agenda: 2026 Spring-NLP-[CSCI-SHU-376]-Class Schedule
2026-03-19
Spring 2026
Lecture 13: Retrieval-Augmented Language Model
Today’s Plan
Retrieval-based Language Models (RALM)
Inference
3
Benefit of RALM #1: Hallucinations
Inference
“The 0.3 cm x 0.4 cm x 0.3 cm oval mass in the left breast at 10 o'clock posterior depth likely represents a complicated cyst.
Language Model Hallucinates, should be 7 o’clock
4
Inference
It is bad under critical domains: medical, law, etc.
Benefit of RALM #1: Hallucinations
5
Inference
Benefit of RALM #2: Adaptations
6
Inference
Benefit of RALM #2: Adaptations
7
Inference
Benefit of RALM #3: Attributions
8
Inference
Benefit of RALM #4: Private Data
9
RALM has been widely used
10
Tool-augmented Language Model
11
Tool-augmented Language Model
12
History of RALM
13
History of RALM
14
History of RALM
15
History of RALM
16
History of RALM
17
Today’s Plan
Inference
Information Retrieval
19
Inference
Sparse Retriever
20
Inference
Sparse vs dense representations
21
Inference
Why dense retrieval now?
22
Inference
Dense Retrieval: Embedding learning
23
Inference
Dense Retrieval: Embedding learning
24
Inference
Dense Passage Retrieval (DPR)
25
Inference
Dense Passage Retrieval (DPR)
26
Inference
Negative Samples Selection - DPR
Issues:
27
Inference
Negative Samples Selection - ANCE
28
Inference
Error Analysis
29
Inference
Mismatch between LLM and Embeddings
30
Performance on MTEB
31
Today’s Plan
Diverse architectures of RALM
Inference
33
Diverse architectures of RALM
Inference
34
RALM: Input Augmentation
Inference
35
REALM: Augmenting input space of LMs
Inference
36
REALM: Augmenting input space of LMs
Inference
13M Wikipedia Passages
37
REALM: Augmenting input space of LMs
Inference
38
REALM: Augmenting input space of LMs
Inference
39
Retrieval augmented generation (RAG)
40
Results
Inference
41
In-context Retrieval-augmented LMs
Inference
42
Pros and Cons of Input Augmentation
Inference
43
Intermediate incorporation
Inference
44
RETRO: Incorporate context in intermediate layers
Inference
45
RETRO: Incorporate context in intermediate layers
Inference
46
RETRO: Incorporate context in intermediate layers
Inference
47
RETRO: Incorporate context in intermediate layers
Inference
48
RETRO: Incorporate context in intermediate layers
Inference
49
RETRO: Incorporate context in intermediate layers
Inference
50
Pros and Cons of Intermediate Augmentation
Inference
51
Output interpolation
Inference
52
KNN-LM: directly interpolate token distributions
Inference
53
KNN-LM: directly interpolate token distributions
Inference
54
KNN-LM: directly interpolate token distributions
Inference
55
KNN-LM: directly interpolate token distributions
Inference
56
Pros and Cons of Output Augmentation
Inference
57
Today’s Plan
Inference
Recap: Benefit of RALM, Adaptations
59
Inference
Update LLM knowledge
60
Inference
One Attempt: Knowledge Editing
61
Inference
Issues with Knowledge Editing
62
Inference
Alternative Approach: RALM
63
Inference
Knowledge Conflict
64
Inference
Knowledge Conflict: Identification
65
Inference
Knowledge Conflict: Localization
66
Inference
Knowledge Conflict: Generation
67
Today’s Plan
Answer
Which city state was OpenAI founded?
OpenAI was founded in
San Francisco in late 2015…
Evidence
Multi-Step
Retriever
Multi-hop Reader
California
San Francisco is the … center of Northern California in the United States…
Connected
Multi-hop Question Answering
California
69
Inference
RALM with Large reasoning models
70
Inference
Task: Reasoning-intensive Retrieval
71