Overview

1 Why your AI projects need a platform

The chapter opens by showing how AI projects often begin as impressive prototypes that seem easy to productionize, only to reveal a much harder reality once real users, real load, and real business constraints arrive. A chatbot demo may succeed in a few days, but production demands predictable latency, scalability, cost controls, observability, safety, accurate grounding in current company knowledge, and disciplined experimentation. The central lesson is that AI applications are not just model calls; they are production systems with distributed-systems complexity.

That complexity becomes even clearer through the idea of AI sprawl: when teams independently rebuild the same supporting components, the organization accumulates duplicated effort, inconsistent security practices, fragmented monitoring, and isolated knowledge. The result is not simply inefficiency but technical debt that slows down every new initiative. The chapter argues that the model itself is only a tiny part of the system, while the surrounding infrastructure now dominates the engineering effort, especially for generative AI applications.

To address this, the chapter proposes platform thinking: a shared, service-oriented foundation that provides reusable capabilities such as data access, session management, workflow orchestration, tool integration, guardrails, observability, experimentation, model abstraction, and scalable infrastructure. These services let application teams focus on business logic while the platform handles safety, reliability, and operational concerns consistently across the organization. In short, the chapter frames a platform as the way to turn AI from a collection of fragile prototypes into a sustainable engineering practice.

The Hidden Infrastructure Iceberg in Traditional ML Systems. While the actual machine learning code (dark center box) represents only 5-10% of system complexity, the surrounding infrastructure components—data collection, feature extraction, monitoring, and serving infrastructure—constitute 90-95% of the engineering effort. This foundational insight from the 2015 NeurIPS paper reveals why ML systems are so complex to put into production.
The GenAI Infrastructure Explosion. The model API call now represents just 2% of total system complexity—even less than in traditional ML. Modern GenAI applications require vastly expanded infrastructure: knowledge management systems, safety and compliance layers, session management for conversations, tool integration platforms, advanced observability, and multi-provider model orchestration. This architectural shift explains why simple prototypes become complex production systems.
AI Platform Architecture: Our platform design directly addresses the core requirements through specialized services: the Data Service and Session Service provide context-aware intelligence; the Workflow Service enables multi-step orchestration; the Tool Service handles dynamic integrations; the Guardrails Service ensures safety and compliance; the Observability and Experimentation Services provide monitoring and experimentation; the Model Service abstracts provider differences; and the Infrastructure Layer with API Gateway provides scalable foundations. Each service operates independently while sharing common patterns, eliminating the need for teams to rebuild foundational components.
The conversational request flow shows how Maria's simple question flows through multiple platform services before returning a response. The Workflow Service orchestrates the entire interaction, coordinating calls to the Session Service to retrieve conversation history, the Guardrails Service to validate both input and output for safety, the Data Service to search organizational knowledge, and the Model Service to generate contextually appropriate responses. The Observability Service tracks costs and performance throughout this coordinated sequence, demonstrating how platform services transform simple interactions into production-ready AI applications.

Summary

  • AI prototypes consistently fail in production because they lack the infrastructure that real-world usage demands.
  • The model API call represents only 2% of total system complexity in modern GenAI applications.
  • The remaining 98% consists of knowledge management systems, session management, safety and compliance layers, tool integration platforms, observability systems, model management, and infrastructure layers.
  • AI sprawl emerges when teams build disconnected AI solutions independently, each implementing their own versions of session management, cost tracking, safety controls, and observability. This duplication makes each new AI feature exponentially harder to build as teams navigate a maze of incompatible one-off implementations.
  • Context-aware intelligence requires two complementary capabilities that AI applications must provide. The Data Service handles document ingestion, vector embedding generation, and semantic search. The Session Service manages conversational state by tracking user interactions, preferences, and conversation history across multiple exchanges.
  • Multi-step orchestration through the Workflow Service coordinates complex AI processes involving sequential and parallel operations where each step depends on previous ones and any step can fail.
  • Model abstraction through the Model Service provides a unified interface that works seamlessly with any AI provider—GPT-4, Claude, local Llama models, or future providers—without requiring application code changes. The service handles provider-specific API differences, response formatting variations, error handling strategies, intelligent routing based on task requirements, automatic fallback, and cost optimization.
  • Dynamic tool integration via the Tool Service provides registration and discovery mechanisms for external APIs and services, handling authentication patterns, rate limiting, error recovery, and result caching automatically.
  • Safety and compliance enforcement through the Guardrails Service ensures every input and output passes through configurable safety filters automatically rather than relying solely on model behavior that users can manipulate, preventing scenarios where AI assistants provide unauthorized advice or expose sensitive data regardless of prompt engineering attempts.
  • The Observability Service handles operational monitoring by tracking costs per request, measuring performance across services, implementing distributed tracing that follows requests through multiple components, and collecting system metrics that identify bottlenecks before they impact users.
  • The Experimentation Service focuses on AI-specific assessment through systematic experiments, A/B testing infrastructure, prompt versioning, and quality measurement that enables data-driven optimization rather than guesswork.
  • Scalable infrastructure foundations come from the API Gateway and the Kubernetes layer beneath it: configuration management for secrets and environment settings, service discovery so components can find each other, resource allocation that scales individual services based on load, and deployment automation that enables reliable updates without downtime.
  • Service-oriented architecture enables independent scaling where high-demand features don't impact other applications, clear boundaries where teams can work on different services without coordination, and shared infrastructure patterns that prevent duplication.
  • Each service operates independently with well-defined API contracts, allowing the Model Service to scale separately from the Session Service, the Data Service to use different storage technology than the Workflow Service, and teams to deploy updates to individual services without affecting the entire platform.

FAQ

Why do AI projects often succeed as prototypes but struggle in production?AI prototypes usually work in controlled demos with limited users, static data, and manual oversight. In production, they must handle unpredictable latency, concurrent traffic, cost control, safety checks, monitoring, and reliable integrations. That gap is why many AI projects need platform support from the start.
What is the main lesson from Sam’s chatbot story?Sam’s chatbot showed that a quick, impressive demo can hide major production needs. Once real users arrived, the system needed observability, scalability, budget controls, guardrails, and better knowledge grounding. The lesson is that AI applications are distributed systems, not just API calls.
What is “AI sprawl”?AI sprawl is the growth of many disconnected AI solutions across teams, each rebuilding similar capabilities like session storage, token tracking, logging, or safety controls. Over time, this creates fragmentation, duplicated effort, inconsistent security, and growing technical debt.
Why does the chapter say the model is only a small part of the story?The model call is only a tiny piece of a real AI application. Most of the engineering effort goes into the surrounding infrastructure: data ingestion, retrieval, session management, orchestration, observability, safety, deployment, and cost management. In GenAI systems, this infrastructure can be about 98% of the total complexity.
What core capabilities do production AI applications need?They need context-aware intelligence, multi-step orchestration, dynamic tool integration, safety and compliance, observability and experimentation, model abstraction, and a scalable infrastructure foundation. These capabilities help AI systems work reliably beyond demos.
How do Data Service and Session Service help AI applications?The Data Service retrieves and grounds responses in current organizational knowledge through document ingestion and semantic search. The Session Service preserves conversational state, user preferences, and history across interactions. Together, they allow the system to respond with context and accuracy.
What problem does the Workflow Service solve?The Workflow Service coordinates multi-step AI processes that may include sequential or parallel tasks, retries, and failure recovery. It removes the need for teams to manually code orchestration logic for every workflow, making complex AI operations more reliable and reusable.
Why is a Guardrails Service important?A Guardrails Service enforces safety and compliance across inputs, outputs, and intermediate steps. It can help with content moderation, PII detection, policy enforcement, bias monitoring, and audit logging, reducing the risk of unsafe or unauthorized AI behavior.
How does a Model Service reduce vendor lock-in?A Model Service provides a unified interface for multiple model providers, such as GPT-4, Claude, or local models. It hides provider-specific differences and can route requests intelligently, so teams can switch models or optimize costs without rewriting application code.
Why is platform thinking better than letting each team build its own AI stack?Platform thinking centralizes common capabilities into shared services, so teams can focus on business logic instead of rebuilding infrastructure. It improves consistency, security, observability, reuse, and scalability while reducing technical debt and making AI development faster over time.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Designing AI Systems ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Designing AI Systems ebook for free