Deploying LLM Application Platforms and Building Knowledge Bases
This article covers how to take LLM applications from a working demo to a deliverable system: delivery boundaries, orchestration platforms, resource and compliance checks, a five-layer architecture, RAG knowledge-base construction, incremental updates, tuning, and common pitfalls.
1. Project tutorials: from “it runs” to “it ships”
LLM applications usually fail in production because the engineering path is missing, not because of the model. A project tutorial differs from a one-off demo: it needs an accepted deliverable, rollback-friendly steps, and an operable ops plan. Before implementation, write the delivery boundaries:
- Function: which app types (Q&A, summarization, extraction, multi-turn chat)
- Performance: concurrency, time-to-first-token, and end-to-end latency ranges
- Data: what may leave the environment vs. what must stay on-prem
- Ops: who owns model serving vs. who owns knowledge-base content updates
These four boundaries drive every later choice. Skipping them almost always means rework at acceptance.
2. What a visual LLM orchestration layer actually does
A common pattern is a visual LLM application orchestration platform that wires prompts, model calls, retrieval, and branches as configuration. Ignore vendor feature lists; the platform has three jobs:
- Orchestration: split a request into observable nodes (rewrite, retrieve, rerank, generate, post-process)
- Integration: talk to external inference and embedding services over standard protocols; it does not train or run inference itself
- Governance: app versions, logs, tracing, permissions, and quotas at runtime
Deployment then focuses on model and data services on both sides of the platform, not only installing the UI.
3. Pre-deploy: resources, network, compliance
Resources. Estimate three loads: orchestration (app services, metadata DB, cache), vector search (memory and index size), and inference (VRAM and throughput). Load-test on a small sample, then keep 30%+ headroom for peak concurrency.
Network. On cloud, put orchestration on a container platform, expose inference and embedding as internal services, use object storage for source documents and index snapshots, and use logging plus monitoring for observability. Generic offerings from cloud vendors (including Baidu AI Cloud)—containers, object storage, logs, alerts—usually cover this without extra proprietary components.
Compliance. Data classification, masking, retention, and audit should be config before go-live, not after.
4. Layered architecture and rollout
Five layers: access (gateway, auth, rate limits) → orchestration (app definition and node scheduling) → capabilities (inference, embeddings, rerank) → data (metadata DB, vector index, object storage) → observability (logs, metrics, traces).
Four phases:
Phase 1: Environment. Pin image baselines and dependency versions; externalize all tunables. Example:
service:replicas: 2resources: { cpu: "4", memory: "8Gi" }model:endpoint: "http://inference-svc.internal"timeout_ms: 15000max_retries: 2retrieval:top_k: 8score_threshold: 0.35
Phase 2: Capability integration. Health checks and timeouts/retries for inference first, then embeddings. Use the same embedding model and dimension for write and query—the most common beginner mistake.
Phase 3: Orchestration. Ship a minimum app (single-turn Q&A + one retrieval). After the path works, add rewrite, rerank, and post-process.
Phase 4: HA and canary. Multi-replica, health probes, per-app canary, keep the previous config for minute-level rollback.
5. Knowledge bases: the ceiling on quality
Data hygiene. Normalize formats (plain or structured text), then strip headers, footers, TOCs, and duplicates. Keep structure markers for tables and code so chunks stay coherent.
Chunking. Granularity trades quality vs. cost. Prefer semantically complete paragraphs, hundreds of characters per chunk, overlap between chunks, and metadata (source, section, updated_at) on each block.
for block in normalize(documents):chunks = split_by_semantics(block, size=600, overlap=80)for c in chunks:c.metadata = {source, section, updated_at, acl_tag}index.upsert(embed(c.text), c)
Index and hybrid retrieval. Vector-only search is weak on proper nouns and IDs. Use keyword + vector + rerank, and filter by metadata for ACL and freshness.
Eval. Build 50–100 real business Q&A pairs. Measure recall hit rate and answer correctness; re-run after every chunk or parameter change.
6. Upload and incremental updates
Batch ingest is async: object storage → parse/chunk queue → index, with tracking and retries. Incremental updates use document IDs and content hashes; re-embed only changed chunks. Deletes must drop index entries to avoid ghost hits. Keep index snapshots and version numbers for full rollback.
7. Tuning and acceptance
Priority: data quality > retrieval strategy > prompts > model parameters. Retrieval: top_k and score threshold. Generation: temperature and max length. Serving: batching, quantization, result cache. Accept only if eval-set accuracy, latency SLOs, and a rollback drill all pass.
8. Common pitfalls
Mismatched embedding versions; chunking that breaks tables; missing ACL metadata and over-privileged recall; no eval set; indexes that only grow. Check these five before launch to avoid most rework.
