Skip to main content
Tian Pan

Tian Pan

Software Engineer

View all authors

·tian

Why Your AI Agent Wastes Most of Its Context Window on Tools

Every tool definition your agent loads is a token tax paid upfront. With 50+ MCP tools connected, definitions alone can consume 130K tokens before any work begins. Here are the three bottlenecks breaking production tool use and the patterns that fix them.

tool-use
ai-agents
llm
production
+1
·tian

Why Your AI Agent Should Write Code Instead of Calling Tools

Code-executing agents can cut token usage by 98–99% compared to standard tool-calling patterns — and that's just the start. Here's how the architecture works, where it breaks, and when to use it.

ai-agents
mcp
code-execution
llm-engineering
·tian

Why Multi-Agent AI Architectures Keep Failing (and What to Build Instead)

Multi-agent AI systems fail in production at rates of 41–87%. Here's why parallel agents compound errors, fragment context, and resist debugging — and what simpler architecture actually works.

multi-agent
ai-agents
llm
agent-architecture
+1
·tian

Building a Generative AI Platform: Architecture, Trade-offs, and the Components That Actually Matter

A practitioner's guide to the infrastructure layer around LLMs—RAG pipelines, model gateways, caching strategies, guardrails, and observability—and when to actually add each component.

ai-engineering
llm
platform
rag
+1
·tian

12-Factor Agents: A Framework for Building AI Systems That Actually Ship

Most AI agent projects stall at 80% quality and never ship. The 12-Factor Agents framework documents the principles that production teams converged on independently to build reliable, observable LLM-powered systems.

ai-agents
llm
production
architecture
·tian

The Lethal Trifecta: Why Your AI Agent Is One Email Away from a Data Breach

When an AI agent can access private data, consume untrusted content, and communicate externally, a single poisoned email becomes a data breach. Here's the architectural pattern behind these attacks and how to stop them.

security
ai-agents
prompt-injection
llm
·tian

Agentic Engineering: Build Your Own Software Pokémon Army

One person replaced a 15-person engineering team with autonomous AI agents. Here are the hard-won principles, spectacular failures, and practical setup behind running an AI-native software company.

ai-agents
engineering
productivity
context-engineering
·tian

Valuable. Doable. Mine.

Reflecting on the historical lessons of Xerox PARC and Apple to explore how, in a rapidly changing technological environment, one can judge the true value of a technology and whether it aligns with personal business pursuits.

AI
LUI
GUI
entrepreneurship
+1
·tian

LLM Observability in Production: Tracing What You Can't Predict

Standard monitoring dashboards miss most of what goes wrong in LLM applications. A practical guide to distributed tracing, cost attribution, latency profiling, and debugging non-deterministic agent behavior at scale.

llm
observability
tracing
agents
+1
·tian

The Hidden Costs of Context: Managing Token Budgets in Production LLM Systems

Context windows aren't free storage — they're the biggest hidden cost in LLM systems. Learn how quadratic attention scaling, the lost-in-the-middle problem, and context length creep drive bills up, and the layered strategies that keep them under control.

llm
cost-optimization
context-management
production
·tian

Structured Output in Production: Getting LLMs to Return Reliable JSON

Getting LLMs to return valid, schema-compliant JSON in production is harder than it looks. Here's how constrained decoding, validation layers, and schema design decisions interact — and where each approach breaks down.

llm
production
structured-output
json
+1
·tian

Prompt Engineering Deep Dive: From Basics to Advanced Techniques

A practical guide to prompt engineering for engineers building with LLMs in production — covering zero-shot vs few-shot tradeoffs, chain-of-thought benchmarks, structured output reliability patterns, and the five mistakes that break production prompts.

prompt-engineering
llm
ai-engineering
production-ai
Showing 2017–2028 of 2314 posts
Prev169 / 193Next