teachyou.ai academy

The lab notebook

Field notes on AI engineering

824 articles · page 3 of 28

RAGLlamaIndex

LlamaIndex vs LangChain for RAG

LlamaIndex and LangChain solve overlapping problems but were built with different priorities: one for indexing and retrieval depth, one for orchestration breadth. This guide compares them with runnable code so you can pick correctly the first time.

Jul 2, 2026 · 11 min read
LLM FrameworksLlamaIndex

Building Agents with LlamaIndex

A hands-on walkthrough of building LlamaIndex agents, from a single function-calling agent to multi-agent workflows backed by a RAG query engine.

Jul 2, 2026 · 10 min read
LLM FrameworksLiteLLM

LiteLLM Proxy: One API for Every Model

The LiteLLM proxy sits in front of OpenAI, Anthropic, Gemini, and self-hosted models so every app on your team calls one consistent API, with keys, budgets, and fallbacks handled in one place.

Jul 2, 2026 · 11 min read
LangChainLangGraph

Composing Subgraphs in LangGraph

LangGraph subgraphs let you build large agent systems out of small, testable graphs. This guide covers state sharing, schema transforms, streaming, and debugging patterns for real projects.

Jul 3, 2026 · 11 min read
LangChainLangGraph

Streaming Events from LangGraph: A Practical Guide

Learn how LangGraph streaming works end to end: the different stream modes, how to stream token-level output from inside a graph node, and how to wire it all into a FastAPI backend.

Jul 3, 2026 · 12 min read
LangChainLangGraph

LangGraph Persistence with Postgres

Set up LangGraph persistence with Postgres so your agent's state survives restarts, supports human-in-the-loop pauses, and can resume any conversation thread on demand.

Jul 3, 2026 · 13 min read
LangChainLangGraph

Human Interrupts and Approvals in LangGraph

A hands-on guide to LangGraph interrupts: pausing a graph mid-run for human approval, editing state, and resuming with Command, plus a full approval workflow you can copy into a real agent.

Jul 3, 2026 · 13 min read
LangChainLCEL

Streaming with LangChain LCEL

Learn how LangChain LCEL streaming works under the hood, when `.stream()` silently falls back to batch mode, and how to wire token-by-token output into a FastAPI endpoint.

Jul 3, 2026 · 11 min read
LangChainLLM caching

Caching LLM Calls in LangChain

LangChain caching stores the output of a prompt so a repeated call skips the model entirely, cutting cost and latency. This guide covers in-memory, SQLite, and Redis caches, plus cache keys, TTLs, and streaming caveats.

Jul 4, 2026 · 12 min read
LangChainLLM orchestration

LangChain Agents vs Chains: When to Use Each

Chains run a fixed sequence of steps every time; agents let the LLM decide what to do next. Here's how to tell which one your workflow actually needs, with runnable code for both.

Jul 4, 2026 · 12 min read
LLM Frameworksstructured output

Structured Output with the Instructor Library

Learn how the instructor library turns raw LLM completions into validated Pydantic objects, with runnable examples covering retries, streaming, and nested schemas.

Jul 4, 2026 · 12 min read
LLM FrameworksRAG

Building RAG with Haystack

A hands-on walkthrough of building a retrieval-augmented generation pipeline with Haystack, from document indexing to a working question-answering API.

Jul 4, 2026 · 11 min read
RAGKnowledge Graphs

Graph RAG vs Vector RAG

Choose the right retrieval architecture by building both approaches, testing the same questions, and measuring where each one fails. This practical guide includes runnable Python, Cypher, evaluation logic, and production design advice.

Jul 5, 2026 · 13 min read
LLM Frameworksdspy

A Guide to the DSPy Framework

DSPy replaces hand-tuned prompt strings with compiled, declarative modules that Python can optimize automatically. This guide walks through signatures, modules, optimizers, and a full working pipeline.

Jul 5, 2026 · 12 min read
Workflow AutomationDify

Building a RAG Application with Dify

A hands-on walkthrough for building a retrieval-augmented generation app in Dify, from knowledge base setup to a production-ready API endpoint.

Jul 5, 2026 · 12 min read
CodexAider

OpenAI Codex vs Aider

A hands-on comparison of the OpenAI Codex CLI and Aider, covering installation, editing modes, model support, git workflow, and which one fits your terminal-based coding setup.

Jul 5, 2026 · 11 min read
Codexrefactoring

Large-Scale Refactoring with OpenAI Codex

A hands-on guide to running codex refactoring across large codebases with OpenAI Codex, covering planning, batching, verification, and rollback strategy so a multi-thousand-file change stays safe and reviewable.

Jul 5, 2026 · 12 min read
CodexOpenAI

OpenAI Codex GitHub Integration: The Complete Setup Guide

Learn how to wire Codex into GitHub so it opens pull requests, reviews diffs, and runs coding tasks straight from issues, comments, and CI. Step-by-step setup, config files, and workflow examples included.

Jul 6, 2026 · 12 min read
CodexAGENTS.md

Writing Custom Instructions for OpenAI Codex

Codex custom instructions live in AGENTS.md files and config.toml settings, and getting them right is the difference between an agent that follows your team's conventions and one that fights you on every commit.

Jul 6, 2026 · 13 min read
Codexconfig.toml

The Codex config.toml, Explained

A hands-on walkthrough of the Codex CLI's config.toml file, covering every major setting from approval policy to MCP servers, with copy-paste examples for common setups.

Jul 6, 2026 · 12 min read
Claude CodeAI coding assistants

Claude Code vs Aider: A 2026 Comparison

Claude Code and Aider both let you pair-program with an AI from the terminal, but they solve different problems. Here's how they compare on setup, editing style, git workflow, and cost.

Jul 6, 2026 · 13 min read
Claude CodeAI coding assistant

Claude Code Plan Mode vs Acting Directly

Claude Code plan mode makes the agent read your codebase and propose a plan before touching a single file, while acting directly lets it edit as it goes. Here is how to pick the right one for the task in front of you.

Jul 6, 2026 · 11 min read
Claude Codemonorepo

Using Claude Code in a Monorepo

A practical guide to running Claude Code across a multi-package monorepo without it losing context, editing the wrong package, or blowing your token budget.

Jul 7, 2026 · 12 min read
Claude CodeMCP

Setting Up MCP Servers in Claude Code

A hands-on walkthrough for adding, scoping, and debugging MCP servers in Claude Code, from your first `claude mcp add` command to writing a minimal custom server.

Jul 7, 2026 · 12 min read
Claude Codedatabase migrations

Claude Code for Database Work and Migrations

Claude Code can read your schema, write migrations, and run queries directly from the terminal. Here's how to set it up safely and use it for real database work without breaking production.

Jul 7, 2026 · 11 min read
Claude CodeCI/CD

Integrating Claude Code into CI Pipelines

A hands-on guide to wiring Claude Code into GitHub Actions and GitLab CI for automated code review, test triage, and release notes. Covers non-interactive mode, permission scoping, and cost control so runs stay predictable.

Jul 7, 2026 · 13 min read
Claude CodeAI coding assistants

Claude Code Checkpoints and Rewind: The Undo Button You Actually Need

Claude Code checkpoints snapshot your files before every edit so a bad refactor is one keystroke from undone. Here is how rewind works, how it differs from git, and how to build a workflow around it.

Jul 7, 2026 · 13 min read
Testing AILLM evaluation

CI/CD for LLM Testing: Building Pipelines That Catch Regressions Before Users Do

A practical walkthrough of wiring LLM evals into CI/CD, from unit-style assertion checks to nightly regression suites, so prompt and model changes never ship blind.

Jul 8, 2026 · 12 min read
Testing AItest automation

Generating Test Data with AI

A hands-on guide to AI test data generation: how to combine Faker, Pydantic, and an LLM to produce realistic, schema-valid, edge-case-rich datasets for your test suites.

Jul 8, 2026 · 12 min read
Workflow AutomationAI agents

AI Agent Workflow Patterns for Automation

A practical breakdown of the AI agent workflow patterns that actually hold up in production, with runnable code for each one and guidance on when to reach for which pattern.

Jul 8, 2026 · 13 min read