#AI
34 posts
LLM App Development #10: Building an AI Agent
Build an agent where Claude chooses its own tools and takes multiple steps to get work done. The agent loop, orchestrating several tools, and safe termination conditions.
LLM App Development #9: Conversation Memory and Context Management
How to handle the history that piles up as a conversation grows. Context limits and token cost, sliding windows and summary compaction, and server-side compaction.
LLM App Development #8: Building a RAG Pipeline
Hand the documents found by vector search to Claude so it answers based on our documents. We complete RAG, building the full pipeline of chunking, retrieval, prompt injection, and generation.
LLM App Development #7: Embeddings and Vector Search
Embeddings turn text into vectors that carry meaning, and vector search finds similar documents using those vectors. The preparation step for RAG in the next part.
LLM App Development #6: Connecting External Functions with Tool Calling
Letting Claude call functions you define. Tool definitions, handling tool_use, and the execution loop — the foundation for connecting Claude to external APIs and databases.
LLM App Development #5: Getting Structured Output
Going beyond narrowing output with a prompt by enforcing it with a JSON schema. With a Pydantic model and messages.parse, you receive a validated result and plug it straight into code.
LLM App Development #4: Prompt Engineering in Practice
The same question can yield very different answers depending on how you ask. Specific instructions, output formatting, examples, and separating structure with tags — how to write prompts that reliably draw out the result you want.
LLM App Development #3: Streaming Responses in Real Time
Instead of waiting for the full response, stream it to the screen as it is generated. With messages.stream and text_stream, you sharply cut the perceived wait for the first characters to appear.
LLM App Development #2: Understanding Messages and Parameters
The role structure of messages and multi-turn conversations, the system prompt, and core parameters like max_tokens and temperature. The foundation for conveying context and instructions to Claude precisely.
LLM App Development #1: Your First API Call and Environment Setup
What makes an LLM app different from a typical backend, and a walkthrough from issuing an Anthropic API key to getting your first response with the Python SDK. The starting point of the series.