Why Low-Code Built-In Knowledge Retrieval Often Falls Short: An External RAG Integration Practice

    This article explains why enterprise question answering on low-code agent platforms often suffers from inaccurate retrieval, and how to fix it by moving retrieval out of the platform into a dedicated external knowledge base service. It covers a layered architecture that decouples retrieval from generation, the preparation work on the retrieval service side, knowledge base construction with parsing and chunking, retrieval API contract design, platform-side orchestration as a single tool call, correct attribution of answer differences, and a tuning checklist with common pitfalls. Readers will learn how to make retrieval quality independently measurable and optimizable while keeping answer generation on the low-code platform.

    1. Problem Background: Why Built-In Knowledge Retrieval Often Feels “Not Accurate Enough”

    When building enterprise question answering on a low-code agent platform, the most common complaint is that “retrieval is inaccurate.” But when you break the problem down, it is rarely a single failing component. Instead, it is usually the accumulation of errors across multiple stages of the pipeline:

    1. Document parsing: Complex layouts, tables, headers and footers, and paragraphs spanning multiple pages get fragmented, breaking semantic units.
    2. Chunking strategy: Fixed-length chunking cuts sentences in half, or chunks that are too large dilute the vector semantics.
    3. Embedding: The embedding model does not match the business corpus and lacks the representational capacity for technical terms, abbreviations, and internal code names.
    4. Recall: Relying only on a single vector similarity channel, with no keyword channel, causes proprietary nouns and identifier-style queries to be missed.
    5. Reranking: Without a reranking model, the Top-K results are mixed with many fragments that are “topically related but do not answer the question.”
    6. Generation: Differences in the large model’s summarization ability and parameters such as temperature can make the same retrieved results yield noticeably different answer quality.

    So instead of repeatedly tuning the “mystical parameters” of the platform’s built-in retrieval, a more engineering-driven approach is to externalize the retrieval capability: let an independent knowledge base retrieval service handle parsing, chunking, embedding, recall, and reranking, while the low-code platform only handles conversation orchestration and answer generation. This both decouples retrieval from generation and turns retrieval quality into a module that can be measured and optimized independently.

    2. Target Architecture: Decoupling Retrieval from Generation

    The recommended layered structure is as follows:

    • Document layer: Private documents are ingested in a unified way, retaining the original files and metadata (source, department, effective date, permission tags).
    • Retrieval service layer: An independent retrieval service that exposes HTTP interfaces externally and internally contains a parser, chunker, embedding model, vector index, and reranking module.
    • Orchestration layer: The low-code agent platform, which accesses the retrieval service through its “external knowledge base / tool invocation” capability.
    • Generation layer: The large language model configured on the platform, which synthesizes answers and adds citations based on the retrieved fragments.

    The core benefit of this structure is that retrieval quality is owned by the retrieval service, which can be replaced, canary-released, and regression-tested; the platform side does not need to care about the underlying index implementation and only consumes structured results.

    3. Preparation on the Retrieval Service Side

    If you adopt a self-built or open-source retrieval solution, you typically need a set of base components working together: a full-text and vector retrieval engine, a relational database, object storage, a cache, and container orchestration. A containerized deployment is recommended, as it makes component dependencies and environment isolation easier.

    Three things to confirm in advance:

    1. Ports and exposure: Define the externally served port, open it only on links that require mutual trust, and in production place it on an internal network with authentication.
    2. Model configuration: Configure the embedding model and the generation/rerank models separately. The embedding model determines the recall ceiling, and the rerank model determines ranking quality.
    3. Permissions and isolation: Partition knowledge bases by business domain, and carry a knowledge base identifier on each API call to avoid cross-domain data mixing.

    4. Knowledge Base Construction: Parsing and Chunking Are Key

    When creating a knowledge base, you need to explicitly select the embedding model and the parsing method. The parsing method determines layout restoration capability, and common requirements include table structuring, heading hierarchy preservation, and header/footer removal. For strongly structured documents such as policies, contracts, and technical manuals, the impact of the parsing strategy is often greater than switching models.

    After documents are ingested, vectorization should be performed, with support for both single-file and batch modes. Engineering recommendations:

    • Keep the mapping between the original text and chunk-level metadata, so answers can be traced back to their source.
    • Record the source position for each chunk, so during evaluation you can quickly tell whether “the chunking was wrong or the recall was wrong.”
    • Establish an incremental update mechanism so that after a document changes, only the affected chunks are rebuilt, controlling rebuild cost.

    An illustrative ingestion call (pseudocode, only expressing the call shape):

    1. # Upload and trigger parsing and vectorization
    2. resp = client.post(
    3. "/api/v1/datasets/{dataset_id}/documents",
    4. files={"file": open(path, "rb")},
    5. data={"parse_method": "general"}
    6. )
    7. doc_id = resp.json()["id"]
    8. # Trigger the parsing task
    9. client.post(
    10. f"/api/v1/datasets/{{dataset_id}}/chunks",
    11. json={"document_ids": [doc_id]}
    12. )

    5. Designing the Retrieval API Contract

    For stable integration on the platform side, the retrieval service should ideally provide an interface that “returns ready-to-use context in a single call,” rather than making the platform assemble a multi-step flow. A practical request/response contract is as follows:

    1. {
    2. "dataset_ids": ["kb_finance_2024"],
    3. "question": "What are the time limits for travel expense reimbursement",
    4. "top_k": 8,
    5. "similarity_threshold": 0.2,
    6. "rerank": true
    7. }
    1. {
    2. "chunks": [
    3. {"content": "...", "score": 0.83, "doc_name": "reimbursement_policy.pdf", "position": 12}
    4. ],
    5. "latency_ms": 420
    6. }

    Design points: returned fragments must carry source and position, so the generation stage can add citations; and a score should be returned, so the platform side can apply threshold filtering and fallbacks.

    6. Platform-Side Orchestration: Wiring Retrieval as a Single Tool

    On a low-code platform, you generally integrate the above interface through an “external knowledge base” or “tool/plugin” capability. Configuration points:

    1. Authentication: Use a service account or token, and avoid writing plaintext keys into prompts.
    2. Parameter mapping: Map the user question to question, and fix the knowledge base identifier or route it per session.
    3. Result handling: Concatenate the chunks into numbered context, and explicitly instruct the model to “answer only based on the given fragments, and state when nothing was retrieved.”
    4. Fallback strategy: On interface timeout or empty recall, fall back to a clarifying follow-up or hand off to a human, rather than letting the model improvise.

    Example prompt skeleton:

    1. You are an enterprise knowledge assistant. Answer only based on the numbered fragments below, and do not introduce external knowledge.
    2. If the fragments are insufficient to answer, reply "No relevant basis was retrieved from the knowledge base" and list the information that needs to be supplemented.
    3. [1] ...
    4. [2] ...

    7. Correctly Attributing Answer Differences

    It is normal for the same question to produce different answers under two paths: the retrieval service’s built-in chat and platform-side generation. Common causes include: different generation models, different temperature and maximum output length, different context concatenation order and truncation strategy, and different system prompt constraint strength. When troubleshooting, fix the variables: unify the model and temperature, unify Top-K, and unify the prompt, then compare whether the retrieved fragments are identical. If the recall is identical but the answers differ, the problem is on the generation side; if the recall differs, go back to the chunking and embedding stages.

    8. Tuning Checklist and Common Pitfalls

    • Insufficient recall: Increase Top-K, lower the similarity threshold, and add a keyword retrieval channel for hybrid recall.
    • Noisy recall: Enable reranking, reduce chunk length, and chunk by heading hierarchy.
    • Inaccurate table question answering: Switch to structured parsing, and keep each table as a separate chunk with its header preserved.
    • High latency: Cache results, control context length, and trigger retrieval and reranking in tiers.
    • Permission risk: API authentication, knowledge-base-level isolation, and call audit logs.

    9. Summary

    Extracting retrieval from the “black box” inside the low-code platform and connecting it to an independent knowledge base retrieval service is the most controllable path to improving question-answering accuracy. In practice, focus on three things: parsing and chunking quality, the API contract and result traceability, and generation-side parameters and prompt constraints. Once retrieval and generation are decoupled, evaluation, canary release, and rollback can all be done independently, and accuracy optimization becomes truly sustainable from an engineering standpoint.