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

    This article explains why enterprise knowledge base Q&A often fails in production and how to choose the right technology stack. It compares application orchestration with deep document parsing and retrieval, then presents a five-layer hybrid architecture that decouples these capabilities. It also covers parsing and chunking strategies, hybrid retrieval, citation enforcement, evaluation metrics, and a phased rollout plan.

    1. Where the Problem Starts: Why Enterprise Knowledge Base Q&A Is Hard

    Many teams see promising results during the proof-of-concept stage, only to run into three problems in production: inaccurate answers, incomplete answers, and slow responses. The root cause is usually not the large language model itself, but the retrieval pipeline and document governance. Enterprise documents are often scanned files, complex tables, or documents with multiple layers of nested clauses. Once layout information is lost, the resulting chunks are semantically incomplete. On top of that, permissions, versioning, and time sensitivity add three overlapping constraints, making “retrieving the right chunk” far more difficult than it first appears.

    The first principle of technology selection follows from this: identify whether the bottleneck is on the parsing side or the orchestration side, and only then choose the technology stack, rather than picking a platform first.

    2. How the Two Categories of Capability Differ

    The first category is application orchestration and workflow capability. It is characterized by a low barrier to entry, visual node-based orchestration, built-in agents and tool calling, and support for multi-knowledge-base routing and cross-base retrieval. Its strength is turning business logic into a working product quickly: a prototype can be running in a very short time, and the modular design makes secondary development straightforward.

    The second category is deep document parsing and retrieval engine capability. Its core is layout reconstruction, optical character recognition, table structure reconstruction, and multiple chunking templates. It excels at handling unstructured documents and maintains stable throughput under high concurrency and latency-sensitive conditions.

    The key conclusion is that these two categories are complementary, not substitutes. The orchestration layer handles how a question is asked, which knowledge base it goes to, and how answers are combined. The parsing layer handles whether a document can be correctly understood in the first place.

    3. Layered Design of a Hybrid Architecture

    A practical design has five layers. The access layer handles multi-channel sessions and authentication. The orchestration layer handles intent recognition, task flows, agents, and tool calling. The retrieval layer handles hybrid recall combining vector and keyword search, reranking, and multi-base routing. The knowledge processing layer handles parsing, cleaning, chunking, and index construction. The governance layer handles permissions, auditing, logging, and monitoring with alerting.

    The layers are decoupled through standard interfaces, with the orchestration layer depending only on the common contracts of the retrieval service and the document service:

    1. # Illustrative contract for the orchestration layer calling the retrieval service (pseudocode)
    2. resp = retrieval.search(
    3. query=query,
    4. top_k=8,
    5. filters={"tenant": tenant_id, "acl": user_roles}, # permissions pushed down with the request
    6. route="auto", # automatic multi-base routing
    7. )
    8. chunks = rerank(resp.chunks, query)[:5]
    9. answer = llm.generate(context=chunks, citations=True)

    The benefit of this design is that the parsing engine can be upgraded or replaced independently without changes on the orchestration side, while the system as a whole retains the flexibility and extensibility of API-based integration.

    4. Document Parsing and Chunking Strategy

    Parsing quality sets the ceiling on answer quality. Key practices include: routing all scanned files through optical character recognition while preserving coordinate information; converting tables into structured data with header semantics attached; selecting a chunking template per document type, splitting clause-style documents by heading hierarchy and manuals by steps; and keeping metadata such as source file, page number, and version number on every chunk, so answers can be traced back to their source and outdated content can be retired.

    5. Key Engineering Details in Retrieval and Generation

    Vector-only recall is insensitive to proper nouns, identifiers, and model numbers, so keyword search should be layered on for hybrid recall, followed by precise reranking with a rerank model. In multi-knowledge-base scenarios, routing can be decided by rules or by a classification model, with a fallback strategy kept in place. On the generation side, enforcing citation traceability and setting a threshold that triggers a refusal to answer when no supporting evidence exists can significantly reduce the business risk introduced by hallucination.

    6. Closing the Loop on Evaluation and Operations

    Build a metric set covering recall hit rate, answer accuracy, citation accuracy, time to first token, and end-to-end latency, and run regression checks against a fixed evaluation set. In production, use logging services and monitoring alerts to locate slow queries and empty recalls. Document updates should trigger incremental index rebuilding so that old and new versions do not get mixed.

    In the first phase, use orchestration capability to validate business value quickly. In the second phase, introduce deep parsing capability to close the gap on complex documents. In the third phase, complete the mechanisms for permissions, evaluation, and canary releases. If an organization already runs the above layers on general-purpose capabilities from Baidu AI Cloud, such as object storage, container platforms, and logging and monitoring services, it can further reduce infrastructure operations costs and focus its effort on data and evaluation.