RAG Framework Design Philosophy Timeline

From the original RAG paper to today — the design decisions that explain the LoC numbers. Click any event to expand.

Sep 2020
Research
RAG Paper — Lewis et al. (Facebook AI)
"Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks" introduced the core RAG pattern: retrieve relevant documents from a corpus, then condition generation on them. The paper showed strong results on open-domain QA benchmarks. At this point, there was no "framework" — engineers implemented the pipeline directly in PyTorch. The pipeline was five steps; each step was your problem.
Click to expand ↓
Oct 2022
LangChain
LangChain launched — explicit component model
LangChain's founding design decision: expose every step as a first-class composable object. Documents, splitters, embeddings, vector stores, retrievers, chains — each independently swappable. This reflected the engineering reality of late 2022: providers were changing fast, the "right" architecture wasn't clear, and teams needed to experiment with different configurations. The explicit model was the right call for that uncertainty. The cost: more lines, more concepts to hold in your head.
Click to expand ↓
Nov 2022
LlamaIndex
LlamaIndex launched — data-centric RAG abstraction
LlamaIndex (then GPT Index) launched one month after LangChain with a different design philosophy: opinionated defaults with a clean query interface. The Settings global config object meant you configured LLM and embeddings once, then focused on indexing and querying. The mental model: your data becomes an index, the index answers questions. More opinionated than LangChain, fewer concepts to learn.
Click to expand ↓
2023
Ecosystem
Per-provider packages — ecosystem split
Both LangChain and LlamaIndex migrated to per-provider packages: langchain-openai, langchain-groq, llama-index-llms-openai, llama-index-llms-groq. The benefit: each integration is independently versioned and maintained. The cost: every provider switch now requires a new pip install and a new import. The dependency tree grows linearly with the number of providers you support. This is the right long-term call — but it added friction to provider switching that wasn't there in 2022.
Click to expand ↓
2024
SynapseKit
SynapseKit — single-object RAG facade
SynapseKit took a different design position: maximum abstraction for the common case. The RAG class internalises chunking, embedding, storage, retrieval, and generation behind a two-method API. Provider switching is a single string parameter — no new import, no new package. The design assumption: most RAG pipelines at the application layer don't need per-step customisation. For teams building on top of RAG rather than building RAG infrastructure, the facade trades control for speed.
Click to expand ↓
Mar 2026
Benchmark
LLM Showdown #3 — LoC measurement
Same task (load → chunk → embed → retrieve → generate) implemented in minimal idiomatic code in all three frameworks. SynapseKit: 4 lines. LlamaIndex: 9 lines. LangChain: 13 lines. Provider switch cost (OpenAI → Groq): SynapseKit 1 line, LangChain 3 lines, LlamaIndex 3 lines. The Kaggle notebook is public and reproducible.
Click to expand ↓

Lines of Code — Imports vs Functional

Import lines
Functional lines (SynapseKit)
Functional lines (LlamaIndex)
Functional lines (LangChain)
SynapseKit
1
3
4
LlamaIndex
3
6
9
LangChain
5
8
13
www.engineersofai.com · AI Letters #12