Skip to main content
← All Series
Content / Series · 14 parts

LLM & LangChain Fundamentals

Building with LLMs in learning order: what LangChain is and when to write your own code, structured output, chains, RAG with document loaders and vector databases, memory, custom tools and callbacks, autonomous agents, then deploying to production.

LLM & LangChain Fundamentals
01 · Blog

What Is LangChain? When to Use It and When to Write Your Own Code

What LangChain 1.x gives you today (create_agent, middleware, a standard model interface) and a plain framework for deciding between it and your own code.

02 · Blog

LangChain vs. LlamaIndex vs. Vanilla: The Builder's Stack Selection Matrix

Pick between LangChain (with LangGraph), LlamaIndex and plain provider SDKs by asking where your app's complexity lives. Includes a three-question flowchart and starter folder layouts.

03 · Blog

Structured JSON Output from LLMs: Schema Injection, Pydantic and Retry Loops

Get reliable JSON from an LLM: put the schema in the prompt, use structured outputs with a Pydantic model, and add a retry loop that sends errors back.

04 · Blog

Building Your First LLM Chain: A Developer's Guide to Sequential Logic

Build a two-step LLM chain in Python with LangChain's pipe syntax: one prompt picks an angle, the next writes the post. Tested with a fake model, no real API key needed.

05 · Blog

Building Your First RAG Pipeline: A Developer’s Guide to Context-Aware AI

Build a working RAG pipeline in Python: load a PDF, split it into chunks, store embeddings in Chroma, answer from the retrieved text, and measure whether retrieval finds the right chunk.

06 · Blog

Building Robust RAG Pipelines: A Deep Dive into LangChain Document Loaders

Load PDFs, CSVs, web pages and whole folders into LangChain Documents, keep the metadata you need for citations, and split the text into chunks for a RAG pipeline.

07 · Blog

Stop Overthinking Vector Databases: A Builder’s Decision Framework

Choose a vector database with three questions: is your data relational, who runs the infrastructure, and how many vectors you store. Includes HNSW vs IVF basics and a pgvector setup in Python.

08 · Blog

Building Long-Term Memory: Setting Up Vector Databases for Semantic Search in LangChain

Split your text, embed it, store it in Chroma and search it by meaning with LangChain. Then add MMR for varied results, a Pinecone option and a small RAG chain.

09 · Blog

From Chatbot to Agent: The Engineer's Guide to LLM Memory Systems

How agent memory works, in plain Python: a rolling window for the current chat, a running summary, and a vector store for facts, with recency weighting and a fake-model test.

10 · Blog

Building State: A Deep Dive into LangChain Memory for Conversational AI

Add memory to a LangChain chatbot the current way: a checkpointer for chat history, a trimming window, SummarizationMiddleware and the Store API, all tested with a fake model.

11 · Blog

Beyond Built-ins: Architecting Custom Tools in LangChain

Build custom LangChain tools two ways, the @tool decorator and a BaseTool subclass with a Pydantic schema, then handle tool errors so the agent can fix its own mistakes.

12 · Blog

Unmasking the Black Box: Mastering LangChain Callbacks for Debugging

See inside a LangChain agent with callbacks: print every step, write a custom audit handler, count tokens, avoid async mistakes and send traces to LangSmith. Handlers tested with a fake model.

13 · Blog

Architecting Autonomous Agents: A Builder’s Guide to Complex Workflows

How an AI agent loops through thought, tool call and observation, how to build one with LangChain's create_agent, and the guardrails that stop loops, bad arguments and context overflow.

14 · Blog

Best Practices for Deploying LangChain Apps to Production

Serving, streaming, per-user state, caching, tracing, evals, secrets and timeouts: a checklist for moving a LangChain 1.x agent out of the notebook.