Mapping the World with Python — A Geospatial Guide
There are only two numbers needed to describe any location on Earth — latitude and longitude. With Python, those two numbers can become maps, distance calculations, and satellite analysis. Here's everything you need to get started. What Is Geospatial Data? Geospatial data is...
FastAPI + LLM
The previous post covered why FastAPI fits GenAI applications well in principle. This one is the practical follow-through: a closer, more complete look at actually wiring an LLM into a FastAPI application — from a single endpoint to a more realistic setup with conversation...
FastAPI for GenAI Applications
Once a generative AI script grows from a personal experiment into something other people or systems need to call, it needs an actual API — a defined, reliable interface other code can talk to. FastAPI has become one of the most popular choices for building that layer in...
AI WhatsApp Assistant
For a huge portion of the world, WhatsApp isn't a secondary communication channel — it's the primary one. Building an AI assistant on top of it means meeting users exactly where they already are, rather than asking them to adopt a new app or interface. That convenience comes...
Building a Multi-Agent Application with AgentScope
Everything covered so far in this series' AgentScope posts — the unified message system, the ReAct-based agent abstraction, memory, tools, and model integration — comes together most concretely when building an actual multi-agent application. This post walks through what that...
Playlist Curator MCP Server
Building My Playlist Curator MCP Server with YouTube Music & Claude AI When I first thought about music discovery, I was tired of switching tabs, searching manually, and letting algorithms decide what I wanted to hear. I wanted something simpler — just describe my mood and...
What is AgentScope?
Among the growing field of frameworks for building AI agents — LangChain, CrewAI, AutoGen, and others — AgentScope has carved out a distinct identity around one core principle: transparency. Developed by Alibaba's research team, it's an open-source Python framework built...
Debugging LangChain Applications
Introduction: The Black Box Problem Debugging applications built on Large Language Models is uniquely challenging. Traditional software has deterministic logic. If a function returns the wrong result, you can trace the execution path, inspect variables, and identify the bug....
LangChain Async Operations
Introduction: The I/O Reality of LLM Applications Large Language Model API calls are slow. A single request to GPT-4 might take one to ten seconds. In a synchronous application, that time is wasted. The server sits idle, blocking the thread, waiting for a response from a...
LangChain Memory Concepts
Introduction: The Stateless Nature of LLMs Large Language Models are fundamentally stateless. Each API call is an independent transaction. The model does not remember what you asked five minutes ago unless you explicitly include that history in the new prompt. This...
Building a LangChain Chatbot
Introduction: Beyond Question Answering A basic chatbot that calls an LLM and returns the response is trivial to build. A production-ready chatbot that maintains context, retrieves relevant documents, handles streaming, and manages conversation state is a different challenge...
LangChain Agents
Introduction: From Chains to Autonomous Systems Chains in LangChain follow a predetermined path. You define a sequence of steps, and the system executes them in order. This is powerful for workflows with fixed logic, but many real-world problems require flexibility. An agent...
LangChain Vector Stores
Introduction: Databases for Meaning Traditional databases excel at exact matching. They can find a user by email or filter orders by date with precision and speed. But they fail at semantic matching. If you search for "automobile," a traditional database will not return...
LangChain Embeddings
Introduction: The Bridge Between Language and Mathematics Embeddings are the invisible foundation of modern retrieval systems. At their core, embeddings are dense numerical vectors that capture the semantic meaning of text, images, or other data types. When you convert a...
LangChain Runnable Architecture
The Evolution to LCEL LangChain has evolved significantly since its early days. The original API relied heavily on explicit chain classes like LLMChain and SequentialChain. While functional, these classes were sometimes rigid and required developers to learn specific APIs for...
LangChain Output Parsers
The Structured Output Problem Large Language Models generate text. Production systems consume structured data. This fundamental mismatch is one of the most persistent challenges in building reliable GenAI applications. When you ask a model to return a JSON object, it might...
LangChain Messages
The Message Paradigm Modern conversational AI is built on a message-based interaction model. Unlike early text completion systems that processed raw strings, today's chat models are trained on structured conversations where each utterance has a specific role. LangChain...
LangChain Prompts
Beyond String Concatenation Prompting is the primary interface for controlling LLM behavior. In simple scripts, it is tempting to construct prompts using Python f-strings or basic string formatting. However, this approach quickly becomes unmanageable in production...
LangChain Models
The Model Abstraction At the heart of every LangChain application is a language model. However, LangChain does not implement its own models. Instead, it provides a unified interface that wraps models from dozens of providers. This abstraction is one of the framework's most...
LangChain Architecture Explained
Layered Design Philosophy LangChain's architecture is deliberately layered, resembling the design of modern web frameworks. Each layer has a specific responsibility, and developers can interact with the framework at whatever level of abstraction suits their needs....