Topic
langchain
20 articles across 6 sub-topics
Sub-topic
11 articles
LangChain Tools and Agents: The Classic Agent Loop
π― Quick TLDR: The Classic Agent Loop TLDR: LangChain's @tool decorator plus AgentExecutor give you a working tool-calling agent in about 30 lines of Python. The ReAct loop β Thought β Action β Observation β drives every reasoning step. For simple l...

LangChain 101: Chains, Prompts, and LLM Integration
TLDR: LangChain's LCEL pipe operator (|) wires prompts, models, and output parsers into composable chains β swap OpenAI for Anthropic or Ollama by changing one line without touching the rest of your code. π One LLM API Today, Rewrite Tomorrow: The...
From LangChain to LangGraph: When Agents Need State Machines
TLDR: LangChain's AgentExecutor is a solid starting point β but it has five hard limits (no branching, no pause/resume, no parallelism, no human-in-the-loop, no crash recovery). LangGraph replaces the implicit loop with an explicit graph, unlocking e...

LangGraph Tool Calling: ToolNode, Parallel Tools, and Custom Tools
TLDR: Wire @tool, ToolNode, and bind_tools into LangGraph for agents that call APIs at runtime. π The Stale Knowledge Problem: Why LLMs Need Runtime Tools Your agent confidently tells you the current stock price of NVIDIA. It's from its training d...
Streaming Agent Responses in LangGraph: Tokens, Events, and Real-Time UI Integration
TLDR: Stream agents token by token with astream_events; wire to FastAPI SSE for zero-spinner UX. π The 25-Second Spinner: Why Streaming Is a UX Requirement, Not a Nice-to-Have Your agent takes 25 seconds to respond. Users abandon after 8 seconds....
The ReAct Agent Pattern in LangGraph: Think, Act, Observe, Repeat
TLDR: ReAct = Think + Act + Observe, looped as a LangGraph graph β prebuilt or custom. π The Single-Shot Failure: Why One LLM Call Isn't Enough for Complex Tasks Your agent is supposed to write a function, run the tests, fix the failures, and re...
Sub-topic
5 articles

Skills vs LangChain, LangGraph, MCP, and Tools: A Practical Architecture Guide
TLDR: These are not competing ideas. They are layers. Tools do one action. MCP standardizes access to actions and resources. LangChain and LangGraph orchestrate calls. Skills package business outcomes with contracts, guardrails, and evaluation. Most ...
Mastering Prompt Templates: System, User, and Assistant Roles with LangChain
TLDR: A production prompt is not a string β it is a structured message list with system, user, and optional assistant roles. LangChain's ChatPromptTemplate turns this structure into a reusable, testable, injection-safe blueprint. TLDR: LangChain p...
How to Develop Apps Using LangChain and LLMs
TLDR: LangChain is a framework that simplifies building LLM applications. It provides abstractions for Chains (linking steps), Memory (remembering chat history), and Agents (using tools). It turns raw API calls into composable building blocks. TLD...
Guide to Using RAG with LangChain and ChromaDB/FAISS
TLDR: RAG (Retrieval-Augmented Generation) gives an LLM access to your private documents at query time. You chunk and embed documents into a vector store (ChromaDB or FAISS), retrieve the relevant chunks at query time, and inject them into the LLM's ...

Mastering Prompt Templates: System, User, and Assistant Roles with LangChain
TLDR: Prompt templates are the contract between your application and the LLM. Role-based messages (System / User / Assistant) provide structure. LangChain's ChatPromptTemplate and MessagesPlaceholder turn ad-hoc strings into versioned, testable pipel...
Sub-topic
1 article
LLM Observability: Tracing, Logging, and Debugging Production AI Systems
TLDR: π LLM observability is radically different from traditional APMβnon-deterministic outputs, variable token costs, and multi-step reasoning chains require specialized tracing. LangSmith provides native LangChain integration, OpenTelemetry offers...
Sub-topic
1 article
Context Window Management: Strategies for Long Documents and Extended Conversations
TLDR: π§ Context windows are LLM memory limits. When conversations grow past 4K-128K tokens, you need strategies: sliding windows (cheap, lossy), summarization (balanced), RAG (selective), map-reduce (scalable), or selective memory (precise). LangCha...
Sub-topic
1 article
LangChain RAG: Retrieval-Augmented Generation in Practice
β‘ TLDR: RAG in 30 Seconds TLDR: RAG (Retrieval-Augmented Generation) fixes the LLM knowledge-cutoff problem by fetching relevant documents at query time and injecting them as context. With LangChain you build the full pipeline β load β split β embed...
Sub-topic
1 article

LangChain Memory: Conversation History and Summarization
TLDR: LLMs are stateless β every API call starts fresh. LangChain memory classes (Buffer, Window, Summary, SummaryBuffer) explicitly inject history into each call, and RunnableWithMessageHistory is the modern LCEL replacement for the legacy Conversat...
