AI Engineering in 2025: A Practical Path from Models to the Physical World

    This article outlines a layered engineering approach to deploying AI in 2025, shifting focus from model capability to system capability. It covers compute and runtime cost control, model routing and tool calling, data and knowledge loops, device-cloud collaboration for AI in the physical world, and governance with observability and evaluation, along with common pitfalls to avoid.

    1. The Main Shift: From Model Capability to System Capability

    In 2025, industry attention has clearly moved from parameter count to usability and stability in real scenarios. Application forms such as AI coding tools, AI search, agents, and conversational assistants are spreading quickly. At the same time, AI is being embedded into the physical world through cameras, microphones, screens, and sensors, resulting in carriers such as AI glasses, AI phones, AI PCs, edge computing boxes, and service robots.

    A direct consequence is that judging whether an AI project is “in production” no longer depends only on a single inference demo. It depends on whether the system can run stably over time under real traffic, real noise, and real latency constraints. In engineering, such systems are usually split into five layers: compute and runtime, model serving, data and knowledge, interaction and devices, and governance and evaluation. The sections below go through them layer by layer.

    2. Compute and Runtime: Turning Inference Cost into a Budgetable Item

    The first problems exposed in deployment are often not accuracy but cost and capacity. Practical approaches include:

    1. Load tiering. Classify requests into real-time interaction, near-real-time batch, and offline processing, and bind each tier to runtime resources of different specifications, so expensive resources are not consumed by low-value tasks.
    2. Batching and concurrency control. Enable dynamic batching on throughput-sensitive paths, and limit batch size and set queue caps on latency-sensitive paths to prevent tail latency from amplifying.
    3. Cache reuse. Build semantic caches and result caches for high-frequency repeated requests, and return on a hit, which can significantly reduce repeated computation.
    4. Elastic scaling. Scale based on multiple metrics such as queue length, concurrency, and time to first token, rather than relying only on CPU utilization.

    A sample capacity and degradation strategy can be expressed like this:

    1. def route(request):
    2. if request.cached:
    3. return cache_get(request.key)
    4. tier = classify(request) # realtime / nearline / offline
    5. if queue_len(tier) > LIMIT[tier]:
    6. return fallback_answer(request) # rule-based or small-model fallback
    7. return dispatch(tier, request)

    The key point is that the degradation path must be part of product design, not a temporary patch applied during an incident.

    3. Model Serving: Small Models, Routing, and Tool Calling

    Having a single large model handle every task is neither economical nor stable. The common industry structure is “routing plus multi-model collaboration”: a lightweight classifier first judges intent and difficulty, simple requests go to small models or templates, and complex requests are escalated to large models. When external capabilities are needed, tool-calling interfaces are used to access retrieval, computation, databases, and other components.

    There are three engineering constraints. First, tool calls must be idempotent, and write operations must carry a unique request identifier to avoid duplicate side effects from retries. Second, structured output should be preferred, using explicit schemas to constrain the return format and reduce downstream parsing failures. Third, timeouts and retries should be designed in layers, with separate budgets for model calls, tool calls, and external dependencies, so total latency stays within the user-perceptible threshold.

    4. Data and Knowledge: A Closed Loop Matters More Than Data Volume

    The ceiling on deployment results is usually determined by the data loop. It is advisable to build four channels: sampling of real online requests, explicit user feedback, automated evaluation scores, and backflow of abnormal samples. Each channel needs desensitization and authorization steps before entering cleaning, labeling, slicing, vectorization, and versioned management.

    On the knowledge side, the recommended pattern is “retrieval augmentation plus tiered indexing”: high-frequency precise facts go through structured queries, long-tail semantics go through vector retrieval, and the fused results are passed to the model for generation, with verifiable citation snippets retained in the answer. Indexes need version numbers and a rollback mechanism, so knowledge updates avoid full rebuilds that cause service jitter.

    5. Device-Cloud Collaboration: A Requirement for AI Entering the Physical World

    When AI runs on glasses, phones, personal computers, in-vehicle terminals, and robots, the network cannot be assumed to be always available. A reasonable division of labor is: the device side handles wake-up, noise reduction, visual pre-screening, caching, and privacy-sensitive processing to guarantee millisecond-level response and offline availability; the cloud side handles complex inference, cross-device memory, and model update delivery.

    Device-cloud collaboration must address three engineering problems. First, model sharding and incremental updates, controlling download size and failure rollback. Second, device heterogeneity, using capability detection to decide available operators and precision levels. Third, power and thermal constraints, using dynamic adjustment of frame rate, sampling rate, and inference frequency to maintain sustainable operation. For embodied AI devices, perception, decision, and control also need to be built into a state machine with a watchdog and human takeover, so any anomaly can trigger a safe shutdown.

    6. Governance and Evaluation: Observable, Accountable, and Iteratable

    Production environments need three types of observability data: tracing (which stages a request passes through and the latency distribution), quality metrics (accuracy, refusal rate, citation hit rate, task completion rate), and security metrics (unauthorized access, sensitive information leakage, prompt injection blocking). Logs and metrics should be collected uniformly, stored centrally, and configured with tiered alerts, rather than only being examined after the fact.

    For compliance, follow the principle of minimal necessity: data classification, encryption in transit and at rest, access auditing, retention period policies, and an executable process for user deletion requests. For high-risk scenarios, retain human review and a complete decision trail.

    For evaluation, a two-layer mechanism of an offline evaluation set plus online canary is recommended. Canary rollout increases traffic by percentage step by step, and if core metrics degrade, it rolls back automatically.

    7. Common Pitfalls

    • Only building demos without fallbacks, causing failure rates to rise quickly under real traffic.
    • Ignoring tail latency, so averages look good but the user experience is poor.
    • No version management for the knowledge base, so every update becomes an incident.
    • Piling unlimited features onto the device side, then being hit by power and heat.
    • Relying on subjective impressions for evaluation, lacking a reproducible quantitative baseline.

    8. Conclusion

    The essence of putting AI into production is encapsulating uncertainty within controllable engineering boundaries: using tiered scheduling to control cost, routing and tool calling to extend capability, data loops to raise the ceiling, device-cloud collaboration to cross the boundary between digital and physical, and observability and compliance systems to ensure long-term trust. Baidu AI Cloud provides reference practices in general capability areas such as compute scheduling, model serving, data governance, and device-cloud collaboration. Enterprises can combine these with their own scenarios and build a sustainable, evolving AI system layer by layer as described above.