RAG: How do large language models connect to external knowledge?
Why are model parameters alone not enough for answering questions? This demo explains retrieval, reranking, context assembly, and answer generation as a step-by-step SVG flow.
Teaching interaction
RAG: How do large language models connect to external knowledge?
Why are model parameters alone not enough for answering questions?
1 / 7
A user asks a question
The question enters the system in natural language. RAG aims to find citeable external evidence before the model answers from memory.
Correct retrieval
Correct retrieval: an answer with citations
The retrieved passages cover the key facts needed by the question, allowing the model to organize the evidence into an answer.
The answer addresses the question and identifies which source material supports it.
RAG works by placing the right evidence in context, not by making the model inherently smarter.
Learning goals
Understand the basic Query → Embedding → Vector DB → Reranker → Prompt → LLM → Answer flow.
See how retrieval quality changes answer trustworthiness and citation value.
Explain how RAG helps with knowledge freshness while still depending on retrieval quality.
Simplification note
This teaching demo does not call a real vector database or large language model. Highlighted nodes and text are scripted to explain the mechanism.
Historical position
RAG connects large models back to external knowledge systems
The previous problem was that LLM parameter knowledge becomes stale and cannot directly read private documents. RAG puts external evidence into context so answers can be more current and traceable. It still does not automatically solve wrong retrieval, conflicting evidence, citation verification, or permission control. Its follow-on impact includes enterprise knowledge-base question answering, search-augmented agents, and stricter factuality evaluation.