Large Model Application Capabilities Open Up: Building Your Own AI Assistant
This article explains the shift from single model APIs to application-level capability interfaces, breaks down a three-layer capability map, and shows how parameterized orchestration works with a minimal example. It also outlines a reference architecture, cost and stability considerations, and practical rollout advice for building an AI assistant with web search, file Q&A, and voice interaction.
1. What Changed: From a Single Model Endpoint to Application-Level Capabilities
When developers called large model capabilities in the past, they typically got a single text completion endpoint: send a prompt, receive text. Capabilities that applications actually need, such as web retrieval, document parsing, and voice interaction, usually had to be integrated from multiple sources, with authentication and rate limiting handled separately for each. The result was a long engineering chain with many failure points.
The core change in this capability opening is layering. The bottom layer is still model inference. The middle layer packages high-frequency application capabilities into callable tools. The top layer lets developers combine them freely through parameter switches. For developers, building an assistant with web Q&A, file Q&A, and voice interaction changes from “integrating multiple services” to “configuring a few switches.”
It is worth noting that these capabilities are not unique to one vendor. The industry commonly uses a “model service + tool service” combined architecture, with differences mainly in interface granularity, orchestration approach, and stability.
2. Capability Map: A Three-Layer Breakdown
The first layer is the model inference layer, responsible for understanding, reasoning, and generation, with support for long context and structured output.
The second layer is the application capability layer, including web search (retrieving real-time information and summarizing it), deep thinking search (combining multi-round retrieval with reasoning), file input (parsing documents and chunking them into storage), and link reading (fetching page content and extracting key points).
The third layer is the atomic tool layer. Search, web fetching, text recognition, speech recognition, and speech synthesis are each independent, callable on their own, and can also be orchestrated into pipelines by the application layer.
The value of layering lies in reuse and replacement: atomic tools can be shared across applications, application capabilities can be recombined per scenario, and the model can be upgraded independently without affecting upper layers.
3. Parameterized Orchestration: A Minimal Runnable Example
Most platforms follow the same idea: add switch fields in the request body to control whether web access is enabled, whether files are parsed, and what modality is returned. Example code:
payload = {"model": "chat-model","messages": [{"role": "user", "content": "Summarize the key conclusions of this quarterly report"}],"tools": {"web_search": True, # Enable web retrieval"deep_search": False, # Turn on when multi-round reasoning is needed"file_input": ["report.pdf"],"url_read": ["https://example.com/a"]},"output": {"modalities": ["text", "audio"]}}
From an engineering standpoint, it is better to make these switches configuration items rather than hard-coded values, so they can be gradually rolled out and rolled back per scenario.
4. Reference Architecture for Replicating an AI Assistant
The access layer handles authentication, rate limiting, and usage metering. The orchestration layer maintains session state and decides when to trigger retrieval and tools. The capability layer calls search, fetching, recognition, and synthesis. The data layer uses object storage for files, a message queue for peak shaving, and logging plus monitoring and alerting for observability.
There are three key design points. First, tool calls need upper limits on timeout and retries to avoid amplifying latency in a chain. Second, retrieval results should carry source citations for fact-checking. Third, the voice pipeline should distinguish streaming from non-streaming to control time to first packet.
5. Cost and Stability: Engineering Details That Are Easy to Miss
Turning on all parameters does not mean the best results. Web access and deep retrieval significantly increase latency and call volume. It is better to route by question type: factual questions go to retrieval, reasoning questions go to the model, and chitchat is generated directly.
For stability, set a fallback strategy for each atomic tool. For example, fall back to a pure model answer when fetching fails, and prompt the user to switch to text input when the recognition service is unavailable. Also build a usage dashboard by tool dimension to prevent a single point of failure from making the whole system unavailable.
6. Implementation Advice
Start from a single scenario, such as file Q&A or web Q&A, get the pipeline working, then add voice on top. Put prompts, tool switches, and timeout thresholds under version control. Build sampling checks and an evaluation set for outputs, and keep running regression tests. If you use Baidu AI Cloud capabilities, you can combine general products such as object storage, message queues, logging, and monitoring and alerting to build a complete loop.
Opening up capabilities lowers the barrier, but what still determines product differentiation is scenario understanding, data quality, and engineering stability.
