Appearance
Phase 4 Interactive Flashcards: Context Engineering & Agentic RAG β
Master the architectural concepts of Phase 4 (Context Engineering & Agentic RAG) with interactive flashcards. Test your recall on the Three-Layer Memory Model, RAG Evolution, Indexing Patterns, Question Transformations, RAG Triad Evaluations, and Zero-Trust RAG Security.
π Deck 1: The Context Paradigm & Three-Layer Memory Model β
Master the 70% error root cause, Working Memory, Episodic Memory, and Semantic Memory:
ποΈ Deck 1: Context Paradigm & Memory Model
Card 1 of 3Context ParadigmClick or press Space to flip βΊ
Why do industry benchmarks show that ~70% of production LLM failures stem from context rather than model capability?
Context Paradigm β’ AnswerClick to flip back β»
LLMs are probabilistic reasoning engines conditioned on their prompt context. If provided with noisy, truncated, stale, or conflicting context, even state-of-the-art models will produce hallucinations or irrelevant outputs regardless of raw parameter count.
π‘ Architect Takeaway: Context engineering (providing the right information at the right time) has a far higher ROI than prompt wording tweaks.
π Deck 2: The Evolution of RAG & Agentic Architectures β
Master Naive RAG, Advanced RAG (Hybrid + Re-Ranking), Agentic RAG, GraphRAG, and Small-to-Big retrieval:
ποΈ Deck 2: RAG Evolution & Agentic Architectures
Card 1 of 3RAG EvolutionClick or press Space to flip βΊ
What distinguishes Naive RAG from Advanced RAG and Agentic RAG?
Naive (Cosine Top-k) β Advanced (Hybrid + Reranking) β Agentic (Self-Correction & Routing)RAG Evolution β’ AnswerClick to flip back β»
1. Naive RAG: Fixed chunking, single dense cosine lookup, direct synthesis (brittle, 60-70% accuracy). 2. Advanced RAG: BM25 + Dense Hybrid search, Cross-Encoder Re-Ranking, and Pre/Post-retrieval processing. 3. Agentic RAG: Dynamic query routing, autonomous tool selection, multi-step retrieval loops, and self-reflection.
π‘ Architect Takeaway: Agentic RAG converts static one-shot retrieval into an adaptive, self-evaluating workflow.
π Deck 3: Indexing Patterns & Context Window Management β
Master ParentDocumentRetriever, MultiVectorRetriever, and solving the "Lost in the Middle" attention trough:
ποΈ Deck 3: Indexing Patterns & Context Window
Card 1 of 3Indexing PatternsClick or press Space to flip βΊ
How does ParentDocumentRetriever operate and what problem does it solve?
Embed Small Child Chunks β Retrieve & Return Full Parent ChunksIndexing Patterns β’ AnswerClick to flip back β»
Large chunks dilute vector specificity, while tiny chunks lose vital surrounding context. ParentDocumentRetriever splits documents into small child chunks for vector indexing, but stores a pointer to the parent chunk in a Docstore. When a child matches, the parent chunk is fed to the LLM.
π‘ Architect Takeaway: Solves the chunking dilemma between retrieval granularity and reading comprehension.
π Deck 4: Question Transformations β
Master Rewrite-Retrieve-Read, Multi-Query with RRF, Step-Back queries, and HyDE:
ποΈ Deck 4: Question Transformations
Card 1 of 3Question TransformationsClick or press Space to flip βΊ
What is the Rewrite-Retrieve-Read paradigm and when is it necessary?
Question Transformations β’ AnswerClick to flip back β»
User queries are often colloquial, ambiguous, or reference prior conversational pronouns. An LLM rewrites the raw user query into an optimized, self-contained search query before passing it to the vector retriever, significantly boosting retrieval relevance.
π‘ Architect Takeaway: Always rewrite ambiguous or conversational user input before executing vector lookups.
π Deck 5: The RAG Triad & Automated Offline Evaluations β
Master Answer Faithfulness, Context Precision, Answer Relevance via Ragas, and automated CI/CD Pytest gates:
ποΈ Deck 5: RAG Triad & Evaluations
Card 1 of 3RAG EvaluationClick or press Space to flip βΊ
What are the three pillars of the RAG Triad in automated evaluation?
Faithfulness | Context Precision | Answer RelevanceRAG Evaluation β’ AnswerClick to flip back β»
1. Faithfulness (Groundedness): Is every claim in the generated answer strictly supported by the retrieved context? (Prevents hallucination). 2. Context Precision: Are the retrieved chunks relevant to the query and free of extraneous noise? 3. Answer Relevance: Does the generated answer directly address the original user query?
π‘ Architect Takeaway: The RAG Triad isolates whether a failure occurred in the retriever or the generator.
π Deck 6: Compulsory Security (Document Provenance & Vec2Text Defense) β
Master HMAC/RSA document signatures against Corpus Poisoning (BadRAG) and embedding perturbation against Vec2Text inversion:
ποΈ Deck 6: Compulsory Security
Card 1 of 2Compulsory SecurityClick or press Space to flip βΊ
What is Corpus Poisoning (BadRAG) and how does Cryptographic Document Provenance prevent it?
Compulsory Security β’ AnswerClick to flip back β»
In BadRAG, an attacker injects subtly poisoned documents into the knowledge base designed to rank #1 for target queries and trigger backdoors or fraudulent answers. Provenance requires every document to carry an HMAC/RSA cryptographic signature verifying its authorized source, author, and timestamp before ingestion.
π‘ Architect Takeaway: Never index unauthenticated or unsigned third-party documents into your vector store.