Building Multimodal Conversational Apps: Integration Architecture and Production Practices

    This article explains how to move a conversational app beyond text-only replies so it can handle long documents, scanned files, retrieval, and voice. It covers the split between capability, orchestration, and application layers, when to use a unified dialogue entry versus standalone APIs, and how to build file parsing, retrieval, and voice handling with traceable evidence, timeouts, permissions, and evaluation.

    1. From Text Q&A to Coordinated Multi-Capability Apps

    A traditional conversational app follows a simple flow: it receives the user’s text, calls a model, and displays the generated result. When an application must handle up-to-date information, long documents, scanned images, and voice messages, text generation alone cannot meet the full requirement.

    For example, a user uploads a scanned contract and asks the system to extract the payment terms, check them against internal policies for risks, and read the conclusion aloud. This single request involves several steps: receiving the file, recognizing text, locating content, retrieving authorized material, analyzing and generating a response, and synthesizing speech. These steps have an execution order, and each one has its own security boundary and failure-handling needs.

    The main value of multi-capability interfaces is that they let developers organize these capabilities into a reliable business workflow. Adding input types is only part of that value. Understanding this shift requires three layers:

    • Capability layer: provides foundational functions such as text recognition (OCR), speech recognition, speech synthesis, retrieval, and model inference.
    • Orchestration layer: decides which capabilities to call, in what order, and how to handle timeouts and errors.
    • Application layer: handles user interaction, identity authentication, permission checks, and business rules.

    Being able to call foundational capabilities does not mean an application is ready for delivery. Developers still need to add state management, data governance, quality evaluation, and operations mechanisms.

    2. How the Unified Dialogue Entry and Standalone APIs Divide the Work

    Multimodal applications usually follow one of two integration patterns. In the first, tasks are submitted through a unified dialogue entry, and the server coordinates the relevant capabilities. In the second, the application calls standalone capability APIs directly and handles the orchestration itself. The exact supported scope, calling methods, and parameters should be taken from the official documentation of the service you integrate.

    1. The unified entry suits interaction-driven scenarios

    The unified entry works best for continuous Q&A, file-assisted conversations, and interactive tasks that need less process control. The application mainly manages session state, input content, and output display, which reduces the work of passing data between modules.

    A unified entry does not mean that internal behavior is uniform. Different tasks may trigger different processing paths, which changes response time, resource consumption, and error types. Developers should still check whether each capability is enabled, whether the input is supported, whether the result includes usable evidence, and whether processing stops when a user cancels a request.

    2. Standalone APIs suit clear, reusable business steps

    Text recognition, speech recognition, and speech synthesis can each serve a specific purpose, such as receipt entry, meeting transcription, or spoken playback, without running through a full dialogue flow.

    Standalone calls offer finer control. The application can set separate timeouts, retry policies, caching, and access permissions for each stage, and it can reuse completed results. For example, after a document has been recognized, several rounds of Q&A can share its parsed output instead of recognizing the original pages again.

    In production systems, both patterns can coexist. Simple tasks can go through the unified entry, while complex or high-risk tasks are orchestrated explicitly by the application. The choice should depend on controllability, maintenance cost, and audit requirements, not only on minimizing the number of calls.

    A general logical structure looks like this:

    User interface → Business access layer → Task orchestration layer → Retrieval, file processing, speech processing, and generation capabilities

    Identity authentication, permission management, object storage, task queues, and monitoring and alerting act as supporting modules that protect the entire pipeline.

    The business access layer validates requests, associates them with user identity, and limits input size. It should not take on heavy document parsing. The task orchestration layer identifies what each task needs, tracks execution state, and coordinates the capability modules.

    For long-running file processing, asynchronous tasks are the better choice. After receiving a file, the system returns a task ID, then reports progress through status queries or event notifications. This keeps interactive requests from holding connections for long periods, and it allows recovery from the last completed stage after a failure.

    Orchestration logic should be explicit. For example:

    1. Confirm that the user is allowed to access the input file and the target knowledge scope.
    2. Check the file type, size, and content security risks.
    3. Extract text, running text recognition when necessary.
    4. Retrieve relevant passages based on the question, and keep source information.
    5. Generate an answer based on the evidence, and note any information gaps.
    6. If the user wants spoken output, run speech synthesis.
    7. Record each stage’s status, duration, and errors, but do not save sensitive body text by default.

    This design makes the task process easier to explain. It also helps pinpoint whether a failure came from parsing, missed retrieval, or the generation stage.

    4. Retrieval and Analysis: Establish Evidence First, Then Draw Conclusions

    Retrieval and model analysis serve different roles. Retrieval finds information that may be relevant. The model interprets the question, organizes the evidence, and generates the answer. Fluent writing does not prove that content is accurate, and access to external information does not make a conclusion reliable.

    1. Decide first whether a question needs retrieval

    Rewriting short text that the user provided usually does not require external retrieval. Questions about recent policies, real-time changes, or internal company rules should consider retrieval. Adding a search step to every request can introduce irrelevant information and increase latency and cost.

    Retrieval scope must also be divided. Public materials and internal documents have different permission requirements and should not share the same access rules. Internal retrieval should enforce permission filtering at the recall stage. Hiding unauthorized content only in the final answer is not enough.

    2. Keep traceable information for evidence

    Material passed to the generation stage should include the source title, relevant location, time information, and access scope. When an answer states a key fact, that fact should map to