Skip to main content
Tian Pan

Tian Pan

Software Engineer

View all authors

·tian

Your Database Schema Is Your Agent's Mental Model

Poorly normalized schemas cause AI agents to hallucinate joins, misread relationships, and chain unnecessary tool calls. Here's how to design a schema layer that your agent can actually reason about.

insider
agent-engineering
database
schema-design
+2
·tian

Embedding Models in Production: Selection, Versioning, and the Index Drift Problem

Picking the wrong embedding model—or failing to manage upgrades—silently kills RAG retrieval quality. A practical guide to model selection beyond MTEB scores, detecting index drift, and zero-downtime versioning strategies.

rag
embeddings
vector-search
production-ml
+1
·tian

Feature Flags for AI: Progressive Delivery of LLM-Powered Features

Rolling out LLM-powered features requires more than traditional feature flags. A guide to prompt variant management, the three-tier metric stack, cohort consistency for multi-turn sessions, silent degradation detection, and rollback strategies that actually work.

llm
production
feature-flags
deployment
+1
·tian

Fine-Tuning Economics: The Real Cost Calculation Before You Commit

Most teams underestimate fine-tuning costs by 3–5x because they only budget the training run. Here's the complete cost model — data curation, failed experiments, deployment, maintenance — and a decision framework for when LoRA/PEFT actually beats months of prompt engineering.

fine-tuning
lora
peft
llm
+1
·tian

GraphRAG in Production: When Vector Search Hits Its Ceiling

Vector search fails predictably on multi-hop reasoning queries. GraphRAG addresses that gap — but introduces a different cost structure, failure modes, and maintenance burden that most teams underestimate.

rag
knowledge-graph
retrieval
llm
+1
·tian

Knowledge Distillation Economics: When Compressing a Frontier Model Actually Pays Off

The real cost math behind compressing frontier models into specialized smaller ones — when distillation beats fine-tuning, when it doesn't, and the failure mode where students inherit their teacher's confident wrongness.

insider
llm
knowledge-distillation
cost-optimization
+2
·tian

Releasing AI Features Without Breaking Production: Shadow Mode, Canary Deployments, and A/B Testing for LLMs

Shipping a new model version or prompt change to production carries risks that standard deployment processes don't catch. Here's how shadow mode, canary deployments, and A/B testing work together for safe LLM releases.

insider
llm
deployment
a-b-testing
+2
·tian

Where Production LLM Pipelines Leak User Data: PII, Residency, and the Compliance Patterns That Hold Up

Most LLM data leaks don't come from the model — they come from unredacted RAG chunks, verbatim prompt logs, and injectable retrieval pipelines. A practical guide to PII handling, data residency routing, and compliance logging for production AI systems.

insider
llm
privacy
security
+2
·tian

Long-Context Models vs. RAG: When the 1M-Token Window Is the Wrong Tool

Why dumping your entire knowledge base into a 1M-token context window fails in production — the latency, cost, and accuracy tradeoffs that make RAG the right default for most retrieval workloads, and a five-factor decision framework for when long context actually wins.

rag
llm
production
retrieval
+1
·tian

Why Your Agent Harness Should Be Stateless: Decoupling Brain from Hands in Production

Tight coupling between AI agent harnesses and sandboxes kills reliability, scalability, and security. Here's the architectural pattern that fixes it: external session logs, stateless harnesses, and isolated sandboxes.

ai-agents
architecture
production
distributed-systems
·tian

The Model Upgrade Trap: How Foundation Model Updates Silently Break Production Systems

Foundation model updates silently break production systems through behavioral drift, changed refusal patterns, and JSON serialization inconsistencies — a practical guide to detection and safe migration.

insider
llm
production-ai
model-versioning
+2
·tian

Multi-Tenant LLM API Infrastructure: What Breaks at Scale

A production API gateway in front of LLM providers solves cost attribution and rate limit contention — but the hierarchical isolation model, token-aware limits, failover patterns, and KV cache security create complexity most teams underestimate until they're already burned.

llm
api-gateway
infrastructure
multi-tenant
Showing 1945–1956 of 2314 posts
Prev163 / 193Next