Corrective RAG, self-reflective RAG, and context compression
Practice this questionOverview
- Corrective RAG detects inadequate retrieval and applies a correction, such as reformulating search.
- Self-reflective RAG checks whether evidence or an answer is sufficient and supported.
- Context compression reduces retrieved text to the parts useful for the current question.
Why this matters
First retrieval may be weak, and bulky evidence can distract the model or exceed budgets.
An everyday example
An employee checks whether the selected page actually answers the question, tries another page once, and highlights relevant lines.
A technical example
If required clause IDs are absent, run one alternative search; preserve exact evidence excerpts rather than summarizing away exceptions.
How it works
- Retrieve
- Check coverage/support
- Apply one bounded correction
- Select or compress evidence
- Answer
- Validate support
- Abstain if still insufficient.
Architecture and flow
Retrieve → evidence check → corrective branch → compressed evidence → answer check.
The insurance assistant example
A coverage response fails if it cites a brochure instead of the policy; the workflow retrieves policy wording or escalates.
When to use it
When evaluations show recoverable retrieval failures or context clutter.
When to avoid it
Do not trust model self-approval as proof of correctness or allow compression to remove monetary limits and exceptions.
Interview answer
“These patterns add bounded evidence and answer checks. I measure whether they improve outcomes and use abstention when correction cannot find support.”
Benefits, trade-offs, and production considerations
- Critic models can repeat the original model's mistake.
- Prefer extractive compression where possible, preserve source offsets, and independently test the checker's false acceptance rate.