Enterprise Knowledge Base Q&A: Architecture Selection and a Fusion Approach

    This article explains why document ingestion, not the chat interface, determines the success of enterprise knowledge base Q&A, and how to combine an orchestration platform with a document parsing engine. It covers the capability profile of both component types, a three-layer fusion architecture with the minimal API contracts between layers, container port planning pitfalls, four levers for retrieval quality, and evaluation, observability, and governance practices.

    1. The Real Bottleneck: Knowledge Ingestion, Not Q&A

    When selecting a stack, many teams focus on the model and the conversational experience. What actually determines whether enterprise Q&A succeeds is the pipeline a document passes through before it enters the system. Corporate corpora are mostly scanned files, reports with complex layouts, contract clauses, and drawing specifications. Once parsing loses layout structure, table alignment, and the semantics of headers and footers, no retrieval algorithm downstream can recover the missing answer.

    So the first principle of architecture design is to decouple document understanding and parsing from application orchestration and interaction, let each side use the implementation it is best at, and compose them through standard interfaces.

    2. Capability Profile of the Two Component Types

    The first type is an application orchestration platform: low barrier to entry, modular, and visual. It typically offers node-based flow orchestration, multi-model access and routing, prompt version management, conversational and task-oriented agents, and exposed interfaces. It suits building a runnable prototype in a very short time and carrying complex business flows such as multi-model collaboration, conditional branching, and human review.

    The second type is a document parsing engine, whose core investment goes into layout reconstruction and semantic chunking: optical character recognition, layout region detection, table structuring, chunking templates, and hybrid retrieval with reranking. It stays stable under heavy load and low-latency batch ingestion and query scenarios.

    This is not an either-or choice. Putting orchestration on top and pushing parsing and retrieval to the bottom is the split that fits engineering reality more closely.

    3. Fusion Architecture: Orchestration Layer + Knowledge Layer + Infrastructure Layer

    A three-layer structure is recommended. The orchestration layer handles sessions, flows, permissions, and integration with business systems. The knowledge layer handles parsing, chunking, vectorization, and retrieval. The infrastructure layer provides the container platform, object storage, message queue, logging service, and monitoring with alerting.

    Only three contracts are needed between the layers: document upload and parsing task submission, task status and progress query, and retrieval request with result return. Sketch (pseudocode, only to show the shape of the contracts):

    1. # 1) Submit a parsing task
    2. task = client.post("/api/v1/documents", files=files, data={"chunk_template": "layout_aware"})
    3. # 2) Poll or receive a callback for status
    4. status = client.get(f"/api/v1/tasks/{task.id}")
    5. # 3) Orchestration layer issues a retrieval request
    6. hits = client.post("/api/v1/retrieval", json={
    7. "dataset_ids": ["kb_contract"],
    8. "question": q, "top_k": 8, "similarity_threshold": 0.35
    9. })

    4. Deployment and Port Planning: The Most Overlooked Pitfall

    Both component types are officially recommended for containerized deployment, and both tend to claim standard web ports by default. For co-located deployment, change the mappings first: remap only the host port and keep the container port unchanged, for example mapping host 80 to container 80 as 8080, and host 443 to container 443 as 8443, so the two do not overwrite each other. If a reverse proxy provides a single entry point in front, have both components listen on non-privileged ports and let the proxy route by path (for example /kb to the knowledge layer and /chat to the orchestration layer), handling transport encryption and access logs centrally. Also reserve a separate data volume and a larger memory limit for the parsing engine, since its resource usage rises noticeably during batch ingestion.

    5. Four Levers for Retrieval Quality

    First, match chunking strategy and templates to document types: layout-aware chunking for formatted reports, short-paragraph chunking for Q&A sets. Second, hybrid retrieval: vector recall covers semantic similarity, keyword recall covers exact strings such as IDs, model numbers, and clause numbers, and a reranking model then scores everything uniformly. Third, metadata filtering: apply hard filters by department, classification level, and time range before computing similarity, which improves accuracy and satisfies permission requirements at the same time. Fourth, traceable citations: results must carry document identifiers and position information, and the frontend displays the original snippet, which significantly reduces the business risk caused by hallucination.

    6. Evaluation, Observability, and Governance

    Before launch, build a regression evaluation set covering four question types: single-hop facts, multi-hop reasoning, table values, and negation and refusal, and record recall hit rate, answer accuracy, and refusal accuracy. During operation, use the logging service and monitoring alerts to observe parsing failure rate, retrieval latency percentiles, and model invocation cost, and set up retry and manual backfill channels for failed documents. Permissions, masking, and auditing should be designed together with knowledge ingestion rather than appended afterward.

    7. Conclusion

    The sensible form of enterprise knowledge base Q&A is an orchestration layer that carries business flows and a parsing layer that carries document understanding, kept replaceable through a small number of standard interfaces. If an enterprise already uses Baidu AI Cloud products, the container platform, object storage, and monitoring with alerting can serve as the infrastructure base, shifting selection focus back to parsing quality and the evaluation loop, and avoiding lock-in to a single framework.