Back to Works

LangChain RAG Patterns: Agent vs. Chain

2026

A modular RAG system comparing two LangChain patterns: Agent (autonomously decides when retrieval is needed) and Chain (always retrieves before answering). Supports multiple embedding and LLM providers with a pluggable architecture.

Agent vs Chain

Multi-Provider Support

Repository
GitHub
Platform
Python CLI
Stack
LangChain, ChromaDB, HuggingFace, OpenAI, Cohere, Gemini, Ollama