惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
阮一峰的网络日志
阮一峰的网络日志
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
MyScale Blog
MyScale Blog
雷峰网
雷峰网
博客园 - 叶小钗
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 三生石上(FineUI控件)
云风的 BLOG
云风的 BLOG
V
V2EX
宝玉的分享
宝玉的分享
酷 壳 – CoolShell
酷 壳 – CoolShell
N
Netflix TechBlog - Medium
Vercel News
Vercel News
美团技术团队
人人都是产品经理
人人都是产品经理
The Cloudflare Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Why AI Infrastructure Code Fails After 6 Months - Even Wh...
Karan Padhiy · 2026-05-19 · via DEV Community

Most AI demos fail for boring reasons.

Not because the model stopped working.

Not because the architecture was wrong.

Usually because the surrounding infrastructure was treated like temporary code.

The first version works in staging. Everyone is happy. The AI response looks good. The dashboard works. The API calls succeed.

Then 6 months later:

  • Queue workers are stuck
  • Retry loops are duplicating records
  • Context storage is inconsistent
  • Token usage exploded
  • Logs are impossible to trace
  • One vendor silently changed response formatting
  • Nobody wants to touch the integration layer anymore

We see this pattern a lot when AI systems move from experiments into permanent operation.

The problem is that most teams still build AI systems like feature launches instead of operational infrastructure.

The Demo Phase Hides Infrastructure Problems

In early development:

  • Low traffic
  • Small datasets
  • Few edge cases
  • Short prompts
  • Manual monitoring
  • One environment
  • One client
  • One model

Everything feels stable.

Then production happens.

Now the system runs continuously:

  • Thousands of requests
  • Multi-step workflows
  • External APIs timing out
  • Different client configurations
  • Long-term memory storage
  • Version drift between services
  • Human operators depending on outputs

This is where temporary architecture starts collapsing.

The Real Problem Usually Starts Around State

Most AI systems today are stateful whether teams admit it or not.

The moment you add:

  • conversation history
  • retrieval systems
  • workflow orchestration
  • memory
  • agent actions
  • async processing

you are no longer building a simple API wrapper.

You are building distributed infrastructure.

One issue we hit recently was inconsistent retrieval context across workers.

The vector database was healthy.

The embeddings were correct.

The prompts were valid.

But async jobs were reading stale state because cache invalidation timing was different between services.

The AI output looked "random" to users.

The actual issue was infrastructure consistency.

AI Failures Rarely Look Like Traditional Failures

Traditional backend failures are easier to spot:

  • 500 errors
  • crashes
  • failed queries
  • high latency

AI infrastructure failures are slower and messier.

Examples:

  • degraded answer quality
  • partial context injection
  • duplicated memory
  • token truncation
  • hallucinations caused by stale retrieval
  • silent schema mismatches
  • prompt formatting drift

The dangerous part is that systems still appear operational.

Requests succeed.

But output quality slowly degrades.

Those failures survive longer because monitoring is usually focused on uptime instead of reasoning quality.

Vendor Instability Changes Everything

A lot of teams underestimate this.

External AI providers change behavior constantly:

  • response formatting
  • tokenization
  • latency
  • rate limits
  • model quality
  • safety filtering
  • tool calling structure

If your infrastructure assumes provider consistency, production becomes fragile fast.

We started treating model providers the same way we treat unstable third-party integrations.

That means:

  • strict schema validation
  • response normalization layers
  • retry isolation
  • fallback handling
  • output sanity checks
  • version pinning where possible

Without that layer, small upstream changes leak directly into production behavior.

Long-Term Systems Need Operational Code

There is a difference between code that works and code that survives.

Operational AI systems need things most demos ignore:

Traceability

You need to answer:

  • Which prompt version generated this output?
  • Which retrieval documents were injected?
  • Which worker processed the request?
  • Which model version responded?
  • What was the token usage?
  • What changed between successful and failed runs?

Without deep tracing, debugging becomes impossible after scale.

Replayability

One thing we started building early:

Ability to replay full AI execution chains.

Not just logs.

Actual reconstruction of:

  • prompts
  • retrieval state
  • tool outputs
  • model responses
  • orchestration decisions

Because production AI bugs are hard to reproduce otherwise.

Failure Isolation

One bad external dependency should not corrupt the entire pipeline.

We now isolate:

  • embedding generation
  • retrieval
  • model execution
  • memory updates
  • workflow actions

as separate recoverable stages.

That changed system stability more than prompt optimization ever did.

The Biggest Mistake

The biggest mistake is assuming the AI model is the product.

In enterprise systems, the model becomes one component inside a much larger operational environment.

The infrastructure around it matters more over time:

  • orchestration
  • observability
  • recovery
  • consistency
  • deployment safety
  • data integrity
  • monitoring

The model can improve next month.

Broken infrastructure compounds for years.