LangChain
Browse articles on LangChain — tutorials, guides, and in-depth comparisons.
LangChain is the most widely used Python framework for building LLM-powered applications. Its modular abstractions — chains, retrievers, agents, and memory — let you compose complex AI workflows without reinventing common patterns.
LangChain Ecosystem
| Tool | Role | When to use |
|---|---|---|
| LangChain | Core framework, chains, agents | Connecting LLMs to data and tools |
| LangGraph | Stateful multi-agent workflows | Complex agent orchestration |
| LangSmith | Observability, eval, monitoring | Debugging and testing in production |
| LlamaIndex | Data indexing, RAG patterns | Document-heavy applications |
| LangServe | Serve chains as REST API | Deploying chains as microservices |
Quick Start — RAG Pipeline
from langchain_openai import ChatOpenAI, OpenAIEmbeddings
from langchain_community.vectorstores import PGVector
from langchain.chains import RetrievalQA
# Embedding model
embeddings = OpenAIEmbeddings(model="text-embedding-3-small")
# Vector store (PostgreSQL + pgvector)
vectorstore = PGVector(
connection_string="postgresql://user:pass@localhost/db",
embedding_function=embeddings,
collection_name="docs",
)
# RAG chain
qa_chain = RetrievalQA.from_chain_type(
llm=ChatOpenAI(model="gpt-4o"),
retriever=vectorstore.as_retriever(search_kwargs={"k": 5}),
)
answer = qa_chain.invoke("What is LangGraph used for?")
LCEL — LangChain Expression Language
from langchain_core.prompts import ChatPromptTemplate
from langchain_openai import ChatOpenAI
from langchain_core.output_parsers import StrOutputParser
# Compose chains with | operator
chain = (
ChatPromptTemplate.from_template("Summarize: {text}")
| ChatOpenAI(model="gpt-4o")
| StrOutputParser()
)
result = chain.invoke({"text": "Your document here..."})
Learning Path
- LCEL basics — prompt templates, model invocation, output parsers
- Retrieval chains — document loaders, text splitters, vector stores
- Agents — tool definitions, ReAct agent, tool calling
- LangGraph — stateful workflows, human-in-the-loop, multi-agent
- LangSmith — tracing, evaluation datasets, CI/CD testing
- Production — streaming, async, caching, error handling
Showing 1–30 of 41 articles · Page 1 of 2
- DeepSeek R1 with LangChain: Build Reasoning Pipelines in 2026
- Build a Multi-Agent RAG System with LangChain Step by Step
- Building HFT Algorithms with AI: Why You'll Lose Money (Reality Check)
- Build a Production RAG Pipeline in 30 Minutes with LangChain 0.5
- Fix MiFID II Data Compliance in 3 Hours (Not 3 Weeks)
- Fix Data Source Divergence in EU/UK Gold Trading Systems in 45 Minutes
- Configure MiFID II Order Execution Policies in 45 Minutes
- Fix VADER Sentiment's Negative Bias in Gold Market Analysis
- Fix MiFIR Record Keeping Before Your 2025 Audit - 45 Minute Setup
- Fix Gold Data Provenance Issues in 45 Minutes - MiFID II Compliance
- Build a Real-Time Gold Market Data Feed in 45 Minutes
- Fix UK/EU MiFIR Transaction Reporting in 45 Minutes
- Fix MiFID II Gold Reporting Errors in 45 Minutes
- Stop Configuration Drift: Secure Your Gold Trading API in 20 Minutes
- Model Gold Volatility Surfaces with GS-Quant in 20 Minutes
- Fix VIX & Gold Price Scale Mismatches in 20 Minutes
- Build a Gold News Crawler That Actually Works in 45 Minutes
- Fix Gold Portfolio Risk Calculations in 20 Minutes with GS-Quant V3.1
- Fix Feature Leakage in Gold Strategy Backtesting with gs-quant
- Feature Engineering Gold Volatility Signals That Actually Predict Price Moves
- Cut Gold Futures Model Training Time by 73% Using PCA
- Set Up gs-quant V3.1 for Gold Derivatives in 20 Minutes
- Fix Missing Gold Price Data with Advanced Interpolation in 20 Minutes
- Stop Trusting Fake Gold Prices: Add PGP Verification in 20 Minutes
- Cut $25K/Year: Best Low-Cost Alternatives to Refinitiv Eikon for Quant Gold Data
- Stop Building Dumb Chatbots: How to Create Smart LangChain Agents That Actually Think
- How to Build a Production-Ready RAG Pipeline with LangChain and Pinecone in 30 Minutes
- Semantic Kernel vs LangChain: Microsoft's Alternative Approach to AI Orchestration
- Phoenix Tracing: Debug and Monitor LangChain Applications Like a Pro
- Memory Management in Large LangChain Applications: Complete Guide to Optimization