Moving from RAG Apps to RAG Systems Engineering
This section outlines four new parts added to a hands-on RAG Systems course, shifting focus from basic RAG applications to advanced RAG systems engineering. Topics include model-driven dynamic retrieval policies, managing context windows across lengthy agent runs, backend vector consistency and storage choices, and scaling vector search indices to millions of items beyond memory limits. The additions emphasize diagnosing system failures across specific architectural layers, spanning retrieval policies, context management, synchronization, and storage infrastructure. NVIDIA introduced Dory1.0-4B, a looped transformer model that decouples parameter count from model depth by reusing a middle stack of layers. The architecture consists of an 8-block input module, a 20-block recurrent section executed 1 to 4 times, and an 8-block output module. Looping significantly boosts performance on reasoning and agentic benchmarks, matching or outperforming larger standard models while generating fewer output tokens. However, looping enhances reasoning rather than internal knowledge, offering no accuracy gains on purely factual benchmarks.
Contents
Moving from RAG apps to RAG systems engineering
This section outlines four new parts added to a hands-on RAG Systems course, shifting focus from basic RAG applications to advanced RAG systems engineering. Topics include model-driven dynamic retrieval policies, managing context windows across lengthy agent runs, backend vector consistency and storage choices, and scaling vector search indices to millions of items beyond memory limits. The additions emphasize diagnosing system failures across specific architectural layers, spanning retrieval policies, context management, synchronization, and storage infrastructure.
- Part 16 focuses on retrieval policy design, allowing models to select search types dynamically and reformulate queries instead of using a static top-k call.
- Part 17 addresses context engineering, covering methods such as history summarization, sub-agent isolation, and external note stores to prevent context window overflow.
- Part 18 explores backend challenges including transactional outboxes, version guards, and consistency management between pgvector and dedicated vector databases.
- Part 19 covers large-scale vector search infrastructure using quantization techniques (PQ, SQ, RaBitQ), index formats (IVF, HNSW), and disk-backed retrieval.
- Debugging production RAG systems requires localizing failures to the correct layer: retrieval policy, context management, data synchronization, or index storage layout.
NVIDIA released a new looped transformer:
NVIDIA introduced Dory1.0-4B, a looped transformer model that decouples parameter count from model depth by reusing a middle stack of layers. The architecture consists of an 8-block input module, a 20-block recurrent section executed 1 to 4 times, and an 8-block output module. Looping significantly boosts performance on reasoning and agentic benchmarks, matching or outperforming larger standard models while generating fewer output tokens. However, looping enhances reasoning rather than internal knowledge, offering no accuracy gains on purely factual benchmarks.
- Dory1.0-4B stores 36 blocks of weights but can execute up to 96 blocks (192 physical layers) through recurrence.
- Before each recurrent pass, the initial hidden state is added back to the current state and L2-normalized.
- On SWE-bench Verified, increasing loops from 1 to 4 raises the score from 50.3 to 61.8.
- Running 2 loops costs only 1.03x to 1.25x the compute of 1 loop end-to-end because the model produces 1.3x to 2.5x fewer output tokens on agentic tasks.
- Looping can increase KV cache memory up to 4x, but retaining only the last loop's cache restores standard memory footprint with minimal accuracy loss.
- Looping does not increase model knowledge, yielding identical scores on factual tests like AA-Omniscience across loop settings.