9 LangChain chain patterns every AI engineer should know, mapped in one infographic
alex_verem · x · 2026-11-30
An infographic maps 9 chain patterns for building AI workflows, with a key insight: the simplest LLM Chain (input straight to model) is the only one that cannot ground answers in anything real — which is exactly why the other eight exist.
The 9 patterns:
- LLM Chain: input → LLM → output, the original form
- Retrieval Chain: fetch relevant context before generating, grounded answers
- Stuff Documents Chain: merge docs into one prompt, best for small inputs
- Map Reduce Chain: process chunks in parallel, then combine
- Refine Chain: update the answer iteratively as context arrives
- Map Rerank Chain: generate candidates, score, select top-k
- Runnable Sequence: compose steps with LCEL
- Runnable Branch: route intelligently on input conditions
- Retrieval QA / Conversational RAG: retrieved docs + chat history for data chat
Paired with the article 'How to become the AI person at your company in 60 days'.
More from coding & agent
- exe.dev pitches 'a private computer for your agents': real VMs with root via SSH — davidcrawshaw · 2026-12-01
- Check crawl logs: ChatGPT-User agent may be hunting /black-friday/ pages at the wrong slug — gaganghotra_ · 2026-12-01
- 'RIP Cursor, long live Grok Build': a user's verdict on xAI's coding tool — alexmacgregor__ · 2026-12-01
- Strands Agents ships Rust SDK: 50ms cold start and 48MB vs Python's 2.4s — FlolightC · 2026-12-01
- MCP config hell: every client wants a different format and failures are silent — TwistNo5735 · 2026-12-01
- 418-byte file balloons to 180KB: tarpit-guard MCP server flags AI-trapping code — Ok-Impact-5316 · 2026-12-01